LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_tree_shrink
static int
ext4_ext_tree_shrink(struct ext4_ext_cursor *cur)
{
	int ret;
	bool shrinkable;

	ret = ext4_ext_shrinkable(cur, &shrinkable);
	if (ret)
		return ret;

	while (shrinkable) {
		ret = __ext4_ext_shrink(cur);
		if (ret)
			break;

		ret = ext4_ext_shrinkable(cur, &shrinkable);
		if (ret)
			break;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x15(%rbp), %rsi
callq 0x9620
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x86fa
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8736
jmp 0x86fc
testb $0x1, -0x15(%rbp)
je 0x8730
movq -0x10(%rbp), %rdi
callq 0x97d0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x8716
jmp 0x8730
movq -0x10(%rbp), %rdi
leaq -0x15(%rbp), %rsi
callq 0x9620
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x872e
jmp 0x8730
jmp 0x86fc
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_init_i_blocks
void
ext4_ext_init_i_blocks(struct ext4_extent_header *hdr)
{
	ext4_ext_header_set_magic(hdr);
	ext4_ext_header_set_depth(hdr, 0);
	ext4_ext_header_set_max_entries(hdr, ext4_ext_root_maxitems());
	ext4_ext_header_set_entries(hdr, 0);
	ext4_ext_header_set_generation(hdr, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x87a0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x80a0
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
callq 0x60f0
movq -0x10(%rbp), %rdi
movzwl %ax, %esi
callq 0x87c0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x87e0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x8800
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_new_meta_blocks
static ext4_fsblk_t
ext4_new_meta_blocks(struct inode *inode, ext4_fsblk_t goal, unsigned int flags,
		     ext4_lblk_t *count, int *errp)
{
	ext4_fsblk_t block = 0;
	ext4_lblk_t nrblocks = (count) ? (*count) : 1;
	UNUSED(flags);

	*errp = ext4_allocate_single_block(inode, goal, &block, nrblocks);
	if (count)
		*count = 1;
	return block;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x8875
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
jmp 0x887f
movl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x887f
movl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x34(%rbp), %ecx
leaq -0x30(%rbp), %rdx
callq 0x88c0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0x88b2
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_allocate_single_block
static inline int
ext4_allocate_single_block(struct inode *inode, ext4_fsblk_t fake,
			   ext4_fsblk_t *blockp, ext4_lblk_t count)
{
	int err;
	UNUSED(fake);
	UNUSED(count);

	err = bitmap_find_bits_clr(inode->i_db->db_bitmap, 0,
				   inode->i_db->db_header->db_nrblocks - 1,
				   blockp);
	if (!err)
		bitmap_bits_set(inode->i_db->db_bitmap, *blockp);

	return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rax), %rax
movq 0x4(%rax), %rdx
subq $0x1, %rdx
movq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x5bf0
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x8925
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x5900
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_lblock_cmp
static inline int
ext4_ext_lblock_cmp(ext4_lblk_t a, ext4_lblk_t b)
{
	if (a < b)
		return -1;
	if (a > b)
		return 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x898b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x89a3
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x899c
movl $0x1, -0x4(%rbp)
jmp 0x89a3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_nrlevel_need_split
static int
ext4_ext_nrlevel_need_split(struct ext4_ext_cursor *cur)
{
	int i;
	int rootdepth;

	rootdepth = ext4_ext_cursor_depth(cur);

	for (i = 0; i <= rootdepth; i++) {
		struct ext4_extent_header *hdr =
		    cur->c_paths[i].p_hdr;

		if (EXT_HAS_FREE_INDEX(hdr))
			break;
	}
	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6720
movl %eax, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0x8a25
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movzwl 0x4(%rcx), %ecx
cmpl %ecx, %eax
jge 0x8a18
jmp 0x8a25
jmp 0x8a1a
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x89df
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_left_sibling
static int
ext4_ext_left_sibling(struct ext4_ext_cursor *cur, int depth,
		      struct ext4_ext_cursor **ncurp, bool *nosibp)
{
	int ret = 0;
	ext4_lblk_t lblock;
	bool nosib = true;
	struct ext4_ext_cursor *ncur = NULL;
	struct ext4_extent_header *hdr;
	union ext4_extent_item *itemp;

	hdr = cur->c_paths[depth].p_hdr;
	itemp = EXT_FIRST_ITEM(hdr);

	ext4_assert(ncurp);

	if (!depth)
		lblock = ext4_ext_lblock(&itemp->e);
	else
		lblock = ext4_idx_lblock(&itemp->i);
	if (lblock)
		lblock--;

	ncur = ext4_ext_cursor_alloc(cur->c_superblock, cur->c_root,
				     cur->c_fsinfo, cur->c_blocksz);
	if (!ncur) {
		ret = ENOMEM;
		goto out;
	}

	ret = ext4_ext_lookup_extent(ncur, lblock, NULL);
	if (ret)
		goto out;

	if (ext4_buf_blocknr(ncur->c_paths[depth].p_bcb) ==
	    ext4_buf_blocknr(cur->c_paths[depth].p_bcb))
		goto out;

	nosib = false;
out:
	*nosibp = nosib;
	*ncurp = ncur;
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movb $0x1, -0x29(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x92ba
jmp 0x92d9
leaq 0x1b28(%rip), %rdi      # 0xade9
leaq 0x1713(%rip), %rsi      # 0xa9db
movl $0x50f, %edx            # imm = 0x50F
leaq 0x1b1b(%rip), %rcx      # 0xadef
callq 0x20c0
cmpl $0x0, -0xc(%rbp)
jne 0x92ed
movq -0x48(%rbp), %rdi
callq 0x69c0
movl %eax, -0x28(%rbp)
jmp 0x92f9
movq -0x48(%rbp), %rdi
callq 0x89b0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x9308
movl -0x28(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rcx
callq 0x6120
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x9340
movl $0xc, -0x24(%rbp)
jmp 0x9397
movq -0x38(%rbp), %rdi
movl -0x28(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x64b0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x935b
jmp 0x9397
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movslq -0xc(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
cmpq 0x8(%rcx), %rax
jne 0x9393
jmp 0x9397
movb $0x0, -0x29(%rbp)
movb -0x29(%rbp), %cl
movq -0x20(%rbp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/compile.c
// Function: fst_compile
struct _fst * fst_compile(
                            struct _fst * fst, 
                            FILE * fin,
                            struct _symt * ist,
                            struct _symt * ost,
                            struct _symt * sst,
                            int is_acc) 
{
    char p[0xffff];
    size_t line = 1;
    int res = 0;

    while (fgets(p, sizeof(p), fin) != NULL) {
        ++line;

        if (is_acc == 0)
            res = _parse_line_sym(fst, p, ist, ost, sst);
        else
            res = _parse_line_sym_acc(fst, p, ist, sst);
        
        if (res != 0) {
                fprintf(stderr, "Invalid input line %zd: %s", line, p);
                exit(EXIT_FAILURE);
        }
    }

    size_t start_state;

    if (sst != NULL) {
        if ( (start_state = symt_getr(sst, START_STATE)) != -1) 
            fst->start = start_state;
    }

    return fst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10050, %rsp          # imm = 0x10050
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq $0x1, -0x10038(%rbp)
movl $0x0, -0x1003c(%rbp)
leaq -0x10030(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x10d0
cmpq $0x0, %rax
je 0x138f
movq -0x10038(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10038(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x1333
movq -0x8(%rbp), %rdi
leaq -0x10030(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x13e0
movl %eax, -0x1003c(%rbp)
jmp 0x1351
movq -0x8(%rbp), %rdi
leaq -0x10030(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x1770
movl %eax, -0x1003c(%rbp)
cmpl $0x0, -0x1003c(%rbp)
je 0x138a
movq 0x9c97(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x10038(%rbp), %rdx
leaq -0x10030(%rbp), %rcx
leaq 0x6c8f(%rip), %rsi      # 0x8008
movb $0x0, %al
callq 0x10f0
movl $0x1, %edi
callq 0x1180
jmp 0x12d8
cmpq $0x0, -0x28(%rbp)
je 0x13c4
movq -0x28(%rbp), %rdi
leaq 0x6c82(%rip), %rsi      # 0x8023
callq 0x3920
movq %rax, -0x10048(%rbp)
cmpq $-0x1, %rax
je 0x13c2
movq -0x10048(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x13c4
movq -0x8(%rbp), %rax
addq $0x10050, %rsp          # imm = 0x10050
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/compile.c
// Function: fst_compile_str
struct _fst * fst_compile_str(struct _fst * fst, const char * str) {
    char p[0xffff];
    char * tok;
    size_t line = 1;

    strcpy(p, str);

    do {
        if (line == 1)
            tok = strtok(p, "\n");
        else {
            tok = strtok(NULL, "\n");
        }

        if (tok)
            if ( _parse_line(fst, tok) != 0) {
                    fprintf(stderr, "Invalid input line %zd: %s\n", line, tok);
                    exit(EXIT_FAILURE);
            }
        ++line;
    } while (tok);

    return fst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10020, %rsp          # imm = 0x10020
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x1, -0x10020(%rbp)
leaq -0x10010(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1050
cmpq $0x1, -0x10020(%rbp)
jne 0x1af4
leaq -0x10010(%rbp), %rdi
leaq 0x6903(%rip), %rsi      # 0x83e9
callq 0x1160
movq %rax, -0x10018(%rbp)
jmp 0x1b0b
xorl %eax, %eax
movl %eax, %edi
leaq 0x68ea(%rip), %rsi      # 0x83e9
callq 0x1160
movq %rax, -0x10018(%rbp)
cmpq $0x0, -0x10018(%rbp)
je 0x1b5c
movq -0x8(%rbp), %rdi
movq -0x10018(%rbp), %rsi
callq 0x1b90
cmpl $0x0, %eax
je 0x1b5a
movq 0x94c7(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x10020(%rbp), %rdx
movq -0x10018(%rbp), %rcx
leaq 0x64e2(%rip), %rsi      # 0x802b
movb $0x0, %al
callq 0x10f0
movl $0x1, %edi
callq 0x1180
jmp 0x1b5c
movq -0x10020(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10020(%rbp)
cmpq $0x0, -0x10018(%rbp)
jne 0x1ace
movq -0x8(%rbp), %rax
addq $0x10020, %rsp          # imm = 0x10020
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/compile.c
// Function: parse_line
static int _parse_line(struct _fst * fst, char * buf) {
    size_t sa, sb, sf, li, lo;
    weight_t w;
    struct _sr sr = sr_get(fst->sr_type);

    if (sscanf(buf, "%zd\t%zd\t%zd\t%zd\t%f",   // TODO: add marcro instead of %f
           &sa, &sb, &li, &lo, &w) == 5) {
        _add_arc(fst, sa, sb, li, lo, w);
    } else {
        if (sscanf(buf, "%zd\t%zd\t%zd\t%zd",   // TODO: add marcro instead of %f
               &sa, &sb, &li, &lo) == 4) {
            _add_arc(fst, sa, sb, li, lo, sr.one);
        } else {
            if (sscanf(buf, "%zd\t%f", &sf, &w) == 2) { // TODO: add macro instead of %f
                _add_final(fst, sf, w);
            } else {
                if (sscanf(buf, "%zd", &sf) == 1)
                    _add_final(fst, sf, sr.one);          // TODO: change to semiring 1!
                else
                    return -1;
            }
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
leaq -0x60(%rbp), %rdi
movzbl 0xc(%rax), %esi
callq 0x26a0
movq -0x18(%rbp), %rdi
leaq 0x64ce(%rip), %rsi      # 0x808a
leaq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
leaq -0x38(%rbp), %r8
leaq -0x40(%rbp), %r9
leaq -0x44(%rbp), %rax
movq %rax, (%rsp)
movb $0x0, %al
callq 0x1130
cmpl $0x5, %eax
jne 0x1c03
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %r8
movss -0x44(%rbp), %xmm0
callq 0x1da0
jmp 0x1cbb
movq -0x18(%rbp), %rdi
leaq 0x648f(%rip), %rsi      # 0x809d
leaq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
leaq -0x38(%rbp), %r8
leaq -0x40(%rbp), %r9
movb $0x0, %al
callq 0x1130
cmpl $0x4, %eax
jne 0x1c4a
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %r8
movss -0x4c(%rbp), %xmm0
callq 0x1da0
jmp 0x1cb9
movq -0x18(%rbp), %rdi
leaq 0x6441(%rip), %rsi      # 0x8096
leaq -0x30(%rbp), %rdx
leaq -0x44(%rbp), %rcx
movb $0x0, %al
callq 0x1130
cmpl $0x2, %eax
jne 0x1c7d
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movss -0x44(%rbp), %xmm0
callq 0x1e40
jmp 0x1cb7
movq -0x18(%rbp), %rdi
leaq 0x6421(%rip), %rsi      # 0x80a9
leaq -0x30(%rbp), %rdx
movb $0x0, %al
callq 0x1130
cmpl $0x1, %eax
jne 0x1cac
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movss -0x4c(%rbp), %xmm0
callq 0x1e40
jmp 0x1cb5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1cc2
jmp 0x1cb7
jmp 0x1cb9
jmp 0x1cbb
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/compile.c
// Function: trn
static size_t trn(char * token, struct _symt * st) {
    char * end;
    long dig = strtol(token, &end, 10);
    if (!*end)
        return (size_t)dig;
    
    fprintf(stderr, "Incorrect token: %s\n", token);

    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x1100
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x1d09
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1d2d
movq 0x92e8(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x6344(%rip), %rsi      # 0x8062
movb $0x0, %al
callq 0x10f0
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/compile.c
// Function: trt
static size_t trt(char * token, struct _symt * st) {
    size_t t = symt_getr(st, token);
    if (-1 == t) {
        fprintf(stderr, "Unknown token: %s\n", token);
    }
    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x3920
movq %rax, -0x18(%rbp)
movq $-0x1, %rax
cmpq -0x18(%rbp), %rax
jne 0x1d8a
movq 0x9283(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x62f4(%rip), %rsi      # 0x8077
movb $0x0, %al
callq 0x10f0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/hash.c
// Function: hash_create
struct _hash * hash_create( hash_func hash_f,
                            cmp_func cmp_f, 
                            size_t key_size, 
                            size_t item_size, 
                            size_t size) 
{
    struct _hash * hash = (struct _hash *) malloc(sizeof(struct _hash));
    struct _bucket * buckets = (struct _bucket *)malloc(
                size * sizeof(struct _bucket));

    for (size_t i = 0; i < size; i++) {
        buckets[i].head = buckets[i].tail = NULL;
    }

    hash->key_size = key_size;
    hash->item_size = item_size;
    hash->size = size;
    hash->buckets = buckets;
    hash->hash_f = hash_f;
    hash->cmp_f = cmp_f;
    hash->n_items = 0;

    return hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x38, %edi
callq 0x1120
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
shlq $0x4, %rdi
callq 0x1120
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x1f18
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1ed3
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/hash.c
// Function: hash_resize
void hash_resize(struct _hash * hash) {
    size_t old_size = hash->size;
    struct _bucket * old_buckets = hash->buckets;

    hash->size *= 2; 
    hash->n_items = 0;

    hash->buckets = (struct _bucket *)malloc(
                hash->size * sizeof(struct _bucket));

    for (size_t i = 0; i < hash->size; i++)
        hash->buckets[i].head = hash->buckets[i].tail = NULL;

    // rehash all the values 
    for (size_t i = 0; i < old_size; i++) { 
        for (   struct _bitem * bi = old_buckets[i].head; 
                bi != NULL;
                bi = bi->next
        ) {
            hash_add(hash, bi->key, bi->value);
        }
    }

    for (size_t i = 0; i < old_size; ++i)
        empty_chain(old_buckets[i].head); 
    free(old_buckets);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
shlq %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
shlq $0x4, %rdi
callq 0x1120
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x2030
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1fe1
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x2095
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x2085
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x20e0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x2058
jmp 0x2087
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2038
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x20cc
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x2330
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x209d
movq -0x18(%rbp), %rdi
callq 0x1030
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/hash.c
// Function: empty_chain
void empty_chain(struct _bitem * bitem) {
    struct _bitem * t_bitem = NULL;
    while(bitem != NULL) {
        t_bitem = bitem;
        bitem = bitem->next;
        if (t_bitem->value) {
            free(t_bitem->key);
            free(t_bitem->value);
        }
        free(t_bitem);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x238e
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2383
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1030
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1030
movq -0x10(%rbp), %rdi
callq 0x1030
jmp 0x2344
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/hash.c
// Function: hash_remove
void hash_remove(struct _hash * hash) {
    for (size_t i = 0; i < hash->size; ++i) {
        empty_chain(hash->buckets[i].head); 
    }
    free(hash->buckets);
    free(hash);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x23ea
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x2330
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x23b4
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/hash.c
// Function: hash_get
void * hash_get(    struct _hash * hash, 
                    void * key, 
                    void * item) 
{
    struct _bucket bucket = hash->buckets[hash->hash_f(key) % hash->size];

    for (
                struct _bitem * bi = bucket.head; 
                bi != NULL; 
                bi = bi->next
    ) {
        if ( hash->cmp_f(key, bi->key) ) {
            memcpy(item, bi->value, hash->item_size);
            return bi->value;
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divq 0x18(%rcx)
movq -0x40(%rbp), %rax
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x24c1
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
cmpl $0x0, %eax
je 0x24b1
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x1110
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x24c9
jmp 0x24b3
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x2469
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/hash.c
// Function: hash_delete
void hash_delete(struct _hash * hash, void * key, void * item) {
    struct _bucket * bucket = &hash->buckets[hash->hash_f(key) % hash->size];
    struct _bitem * bi = bucket->head; 
    struct _bitem * bi_prev = NULL; 
    struct _bitem * bi_next; 

    while(bi != NULL) {
        bi_next = bi->next;
        if ( hash->cmp_f(key, bi->key) ) {
            if (bi_prev == NULL) {
                // seems we are in the head 
                bucket->head = bi_next;
            } else {
                bi_prev->next = bi_next;
            }
            if (bi_next == NULL) {
                // seems we are in the tail
                bucket->tail = bi_prev;
            }

            // free 
            if (bi->value) 
                free(bi->value);
            free(bi->key);
            free(bi);

            --hash->n_items;

            break;
        }

        bi_prev = bi;
        bi = bi_next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rcx
xorl %edx, %edx
divq 0x18(%rcx)
movq -0x40(%rbp), %rax
shlq $0x4, %rdx
addq %rdx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x25f1
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
cmpl $0x0, %eax
je 0x25dc
cmpq $0x0, -0x30(%rbp)
jne 0x257e
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x258a
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x38(%rbp)
jne 0x259d
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x25b5
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1030
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x1030
movq -0x28(%rbp), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x20(%rax)
jmp 0x25f1
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x2539
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/sr.c
// Function: sr_get
struct _sr sr_get(uint8_t sr_type) {
    switch (sr_type) { 
        case SR_REAL:
            return sr_real;
        case SR_TROPICAL:
            return sr_tropical;
        default:
            return sr_tropical;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x18(%rbp)
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
movl %eax, -0x8(%rbp)
testl %eax, %eax
je 0x26ef
jmp 0x26bf
movl -0x8(%rbp), %eax
subl $0x1, %eax
jne 0x2715
jmp 0x26c9
movq -0x18(%rbp), %rax
movq 0x86dc(%rip), %rcx      # 0xadb0
movq %rcx, (%rax)
movq 0x86da(%rip), %rcx      # 0xadb8
movq %rcx, 0x8(%rax)
movq 0x86d7(%rip), %rcx      # 0xadc0
movq %rcx, 0x10(%rax)
jmp 0x2739
movq -0x18(%rbp), %rax
movq 0x86ce(%rip), %rcx      # 0xadc8
movq %rcx, (%rax)
movq 0x86cc(%rip), %rcx      # 0xadd0
movq %rcx, 0x8(%rax)
movq 0x86c9(%rip), %rcx      # 0xadd8
movq %rcx, 0x10(%rax)
jmp 0x2739
movq -0x18(%rbp), %rax
movq 0x86a8(%rip), %rcx      # 0xadc8
movq %rcx, (%rax)
movq 0x86a6(%rip), %rcx      # 0xadd0
movq %rcx, 0x8(%rax)
movq 0x86a3(%rip), %rcx      # 0xadd8
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_create
struct _fst * fst_create() {
    struct _fst * fst;
    fst = malloc(sizeof(struct _fst));

    fst->sr_type = SR_TROPICAL;
    fst->n_states = 0;
    fst->n_max = 0;
    fst->start = 0;

    fst->flags = 0;

    fst->states = NULL;

    return fst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x18, %edi
callq 0x1120
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0xd(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_add_state
state_t fst_add_state(struct _fst * fst) {
    struct _state * state;
    ++fst->n_states;

    if (fst->n_states > fst->n_max) {
        fst->n_max = fst->n_states * 2;
        fst->states = realloc(fst->states, 
            sizeof(struct _state) * fst->n_max);
    }
    
    state = &fst->states[fst->n_states - 1];

    state->n_arcs = 0;
    state->n_max = 0;
    state->final = 0; 
    state->weight = 0;

    state->arcs = NULL;
    
    return fst->n_states - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jbe 0x27fc
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
shll %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
imulq $0x18, %rax, %rsi
callq 0x1140
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_add_arc
arc_t fst_add_arc(
            struct _fst *   fst, 
            state_t         src, 
            state_t         dst, 
            label_t         il,
            label_t         ol,
            weight_t        weight) 
{
    struct _arc * arc;
    struct _state * state = &fst->states[src];

    ++state->n_arcs;

    if (state->n_arcs > state->n_max) {
        state->n_max = state->n_arcs * 2;
        state->arcs = realloc(state->arcs, 
            sizeof(struct _arc) * state->n_max);
    }

    arc = &state->arcs[state->n_arcs - 1];
    arc->state = dst;
    arc->ilabel = il;
    arc->olabel = ol;
    arc->weight = weight;

    return state->n_arcs - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq -0x30(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x28f2
movq -0x30(%rbp), %rax
movl (%rax), %ecx
shll %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %esi
shlq $0x4, %rsi
callq 0x1140
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x10(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x18(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
movss -0x1c(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x30(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_empty
void fst_empty(struct _fst * fst) {
    struct _state * state;

    for(state_t s=0; s < fst->n_states; ++s) {
        state = fst->states + s;
        if (state->arcs != NULL)
            free(state->arcs);
    } 
    
    if ( fst->states != NULL )
        free(fst->states);

    fst->n_states = 0;
    fst->n_max = 0;
    fst->states = NULL;
    fst->start = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x29da
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x29cd
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1030
jmp 0x29cf
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2993
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x29f2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_write
void fst_write(const struct _fst * fst, FILE * fout) {
    struct _state * state;

    fwrite( &_fst_header, sizeof(_fst_header), 1, fout);
    fwrite( &fst->start, sizeof(state_t), 1, fout);
    fwrite( &fst->n_states, sizeof(state_t), 1, fout);
    fwrite( &fst->sr_type, sizeof(uint8_t), 1, fout);
    fwrite( &fst->flags, sizeof(uint8_t), 1, fout);

    for (int s=0; s < fst->n_states; ++s) {
        state = &fst->states[s];  
        
        fwrite( &state->weight, sizeof(weight_t), 1, fout);
        fwrite( &state->n_arcs, sizeof(arc_t), 1, fout);
        fwrite( &state->final, sizeof(int), 1, fout);

        fwrite( state->arcs, sizeof(struct _arc), state->n_arcs, fout);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
leaq 0x561d(%rip), %rdi      # 0x80b8
movl $0x4, %esi
movl $0x1, %edx
callq 0x1190
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1190
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1190
movq -0x8(%rbp), %rdi
addq $0xc, %rdi
movq -0x10(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x1190
movq -0x8(%rbp), %rdi
addq $0xd, %rdi
movq -0x10(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x1190
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x2bb5
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1190
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1190
movq -0x18(%rbp), %rdi
addq $0xc, %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1190
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
movq -0x10(%rbp), %rcx
movl $0x10, %esi
callq 0x1190
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2b15
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_read
void fst_read(struct _fst * fst, FILE * fin) {
    struct _state * state;
    uint32_t header = 0;

    fread( &header, sizeof(header), 1, fin);
    if (header != _fst_header) {
        printf("Wrong file format\n");
        exit(EXIT_FAILURE);
    }

    fread( &fst->start, sizeof(state_t), 1, fin);
    fread( &fst->n_states, sizeof(state_t), 1, fin);
    fread( &fst->sr_type, sizeof(uint8_t), 1, fin);
    fread( &fst->flags, sizeof(uint8_t), 1, fin);

    fst->n_max = fst->n_states;

    fst->states = malloc(sizeof(struct _state) * fst->n_states);

    for (int s=0; s < fst->n_states; ++s) {
        state = &fst->states[s];

        fread ( &state->weight, sizeof(weight_t), 1, fin);
        fread ( &state->n_arcs, sizeof(arc_t), 1, fin);
        fread ( &state->final, sizeof(int), 1, fin);

        state->n_max = state->n_arcs;

        state->arcs = malloc(sizeof(struct _arc) * state->n_arcs);
        fread ( state->arcs, sizeof(struct _arc), state->n_arcs, fin);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x1c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x1070
cmpl $0x66733031, -0x1c(%rbp) # imm = 0x66733031
je 0x2c0f
leaq 0x54be(%rip), %rdi      # 0x80bc
movb $0x0, %al
callq 0x10a0
movl $0x1, %edi
callq 0x1180
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1070
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1070
movq -0x8(%rbp), %rdi
addq $0xc, %rdi
movq -0x10(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x1070
movq -0x8(%rbp), %rdi
addq $0xd, %rdi
movq -0x10(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x1070
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
imulq $0x18, %rax, %rdi
callq 0x1120
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x2d6c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1070
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1070
movq -0x18(%rbp), %rdi
addq $0xc, %rdi
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1070
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
shlq $0x4, %rdi
callq 0x1120
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
movq -0x10(%rbp), %rcx
movl $0x10, %esi
callq 0x1070
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2ca3
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_fwrite
void fst_fwrite(const struct _fst * fst, const char * filename) {
    FILE * fout = NULL;

    if (( fout = fopen(filename, "wb")) == NULL ) {
        fprintf(stderr, "Error opening file: %s", filename);
        exit(EXIT_FAILURE);
    }
    fst_write(fst, fout);
    fclose(fout); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x532c(%rip), %rsi      # 0x80cf
callq 0x1150
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x2dd8
movq 0x823f(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x530b(%rip), %rsi      # 0x80d2
movb $0x0, %al
callq 0x10f0
movl $0x1, %edi
callq 0x1180
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2a80
movq -0x18(%rbp), %rdi
callq 0x1080
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_fread
void fst_fread(struct _fst * fst, const char * filename) {
    FILE * fin = NULL;

    if (( fin = fopen(filename, "rb")) == NULL ) {
        fprintf(stderr, "Error opening file: %s", filename);
        exit(EXIT_FAILURE);
    }
    fst_read(fst, fin);
    fclose(fin); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x52c6(%rip), %rsi      # 0x80e9
callq 0x1150
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x2e58
movq 0x81bf(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x528b(%rip), %rsi      # 0x80d2
movb $0x0, %al
callq 0x10f0
movl $0x1, %edi
callq 0x1180
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2bc0
movq -0x18(%rbp), %rdi
callq 0x1080
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_get_n_arcs
arc_t fst_get_n_arcs(const struct _fst * fst) {
    arc_t n = 0;
    for (state_t s = 0; s < fst->n_states; ++s) {
        n += fst->states[s].n_arcs; 
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x2ec7
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x10(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2e96
movl -0xc(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_stack
void fst_stack(struct _fst * a, const struct _fst * b) {
    struct _state * state;
    struct _arc * arc_tmp;

    state_t offset = a->n_states; 
    a->n_states = a->n_states + b->n_states; 

    /*
    Check if there is enough space for stacking.
    If not then allocate additional space.

    */

    if (a->n_max < a->n_states) {
        a->n_max = a->n_states; 
        a->states = realloc(a->states, a->n_max * sizeof(struct _state));
    }

    memcpy(&a->states[offset], b->states, b->n_states * sizeof(struct _state));

    for(state_t i=offset; i < a->n_states; ++i) {
        state = &a->states[i];
        arc_tmp = state->arcs;
        state->arcs = malloc(state->n_max * sizeof(struct _arc));
        memcpy(state->arcs, arc_tmp, state->n_arcs * sizeof(struct _arc));
        for (arc_t j=0; j < state->n_arcs; ++j)
            (&state->arcs[j])->state += offset;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
addl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x2f40
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
imulq $0x18, %rax, %rsi
callq 0x1140
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x24(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
imulq $0x18, %rax, %rdx
callq 0x1110
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x3022
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
shlq $0x4, %rdi
callq 0x1120
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
shlq $0x4, %rdx
callq 0x1110
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x3012
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x2c(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2fe3
jmp 0x3014
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2f70
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/fst.c
// Function: fst_copy
void fst_copy(const struct _fst * orig, struct _fst * copy) {
    struct _state * so, * sc;

    memcpy(copy, orig, sizeof(struct _fst));
    
    copy->states = malloc(sizeof(struct _state) * orig->n_max);
    memcpy(copy->states, orig->states, sizeof(struct _state) * orig->n_states);
    
    for(state_t s=0; s < copy->n_states; ++s) {
        sc = &copy->states[s];
        so = &orig->states[s];
        sc->arcs = malloc(sizeof(struct _arc) * sc->n_max);
        memcpy(sc->arcs, so->arcs, sizeof(struct _arc) * sc->n_arcs);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
imulq $0x18, %rax, %rdi
callq 0x1120
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
imulq $0x18, %rax, %rdx
callq 0x1110
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x3124
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
shlq $0x4, %rdi
callq 0x1120
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
shlq $0x4, %rdx
callq 0x1110
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x30a0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)