#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
typedef struct AlnIITreeHandle AlnIITreeHandle;
typedef struct CigarHandle CigarHandle;
typedef struct IITreeHandle IITreeHandle;
typedef struct PafRowHandle PafRowHandle;
typedef struct SeqIndexHandle SeqIndexHandle;
typedef struct SxsHandle SxsHandle;
#ifdef __cplusplus
extern "C" {
#endif
const char *seqwish_rust_version(void);
int32_t seqwish_rust_add(int32_t a, int32_t b);
char *temp_file_create(const char *base, const char *suffix);
void temp_file_remove(const char *filename);
void temp_file_set_dir(const char *dir);
char *temp_file_get_dir(void);
void temp_file_set_keep_temp(bool setting);
void temp_file_free_string(char *s);
uint64_t pos_make_pos_t(uint64_t offset, bool is_rev);
uint64_t pos_offset(uint64_t pos);
bool pos_is_rev(uint64_t pos);
void pos_incr_pos(uint64_t *pos);
void pos_incr_pos_by(uint64_t *pos, uintptr_t by);
void pos_decr_pos(uint64_t *pos);
void pos_decr_pos_by(uint64_t *pos, uintptr_t by);
uint64_t pos_rev_pos_t(uint64_t pos);
char *pos_to_string_c(uint64_t pos);
uint8_t dna_complement(uint8_t c);
void dna_reverse_complement(const char *seq, uintptr_t len, char *out);
void dna_reverse_complement_in_place(char *seq, uintptr_t len);
struct CigarHandle *cigar_from_string(const char *s);
char *cigar_to_string(const struct CigarHandle *handle);
uintptr_t cigar_length(const struct CigarHandle *handle);
bool cigar_get_op(const struct CigarHandle *handle,
uintptr_t index,
uint64_t *len_out,
uint8_t *op_out);
void cigar_free(struct CigarHandle *handle);
uintptr_t mmap_open_rust(const char *filename, char **buf_out, int32_t *fd_out);
void mmap_close_rust(char *buf, int32_t fd, uintptr_t size);
bool file_exists(const char *filename);
double handy_parameter(const char *value, double default_value);
uint64_t time_since_epoch_ms(void);
void parse_paf_spec(const char *spec,
void *user_data,
void (*callback)(void*, const char*, uint64_t));
uint64_t match_hash(uint64_t q, uint64_t t, uint64_t l);
bool keep_sparse(uint64_t q, uint64_t t, uint64_t l, float f);
struct PafRowHandle *paf_row_parse(const char *line);
void paf_row_free(struct PafRowHandle *handle);
char *paf_row_query_sequence_name(const struct PafRowHandle *handle);
char *paf_row_target_sequence_name(const struct PafRowHandle *handle);
uint64_t paf_row_query_sequence_length(const struct PafRowHandle *handle);
uint64_t paf_row_query_start(const struct PafRowHandle *handle);
uint64_t paf_row_query_end(const struct PafRowHandle *handle);
bool paf_row_query_target_same_strand(const struct PafRowHandle *handle);
uint64_t paf_row_target_sequence_length(const struct PafRowHandle *handle);
uint64_t paf_row_target_start(const struct PafRowHandle *handle);
uint64_t paf_row_target_end(const struct PafRowHandle *handle);
uint64_t paf_row_num_matches(const struct PafRowHandle *handle);
uint64_t paf_row_alignment_block_length(const struct PafRowHandle *handle);
uint16_t paf_row_mapping_quality(const struct PafRowHandle *handle);
struct CigarHandle *paf_row_cigar(const struct PafRowHandle *handle);
struct SxsHandle *sxs_new(void);
struct SxsHandle *sxs_parse_lines(const char *const *lines, uintptr_t num_lines);
void sxs_free(struct SxsHandle *handle);
char *sxs_query_sequence_name(const struct SxsHandle *handle);
char *sxs_target_sequence_name(const struct SxsHandle *handle);
uint64_t sxs_query_start(const struct SxsHandle *handle);
uint64_t sxs_query_end(const struct SxsHandle *handle);
uint64_t sxs_target_start(const struct SxsHandle *handle);
uint64_t sxs_target_end(const struct SxsHandle *handle);
uint64_t sxs_num_matches(const struct SxsHandle *handle);
uint16_t sxs_mapping_quality(const struct SxsHandle *handle);
struct CigarHandle *sxs_cigar(const struct SxsHandle *handle);
bool sxs_is_good(const struct SxsHandle *handle);
bool sxs_is_reverse(const struct SxsHandle *handle);
int32_t compact_compact_nodes(const struct SeqIndexHandle *seqidx_handle,
uintptr_t graph_size,
const struct IITreeHandle *node_iitree_handle,
const struct IITreeHandle *path_iitree_handle,
uint64_t *seq_id_bv,
uintptr_t seq_id_bv_size,
uintptr_t num_threads);
uintptr_t transclosure_compute(const struct SeqIndexHandle *seqidx_handle,
const struct AlnIITreeHandle *aln_iitree_handle,
const char *seq_v_file,
const struct IITreeHandle *node_iitree_handle,
const struct IITreeHandle *path_iitree_handle,
uint64_t repeat_max,
uint64_t min_repeat_dist,
uint64_t transclose_batch_size,
bool show_progress,
uintptr_t num_threads);
char *version_get_version(void);
char *version_get_release(void);
char *version_get_codename(void);
char *version_get_short(void);
void version_free_string(char *s);
#ifdef __cplusplus
} #endif