LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_delete_item
static void
ext4_ext_delete_item(struct ext4_ext_cursor *cur, int depth)
{
	ssize_t ptr;
	ssize_t nritems;
	struct ext4_extent_header *hdr;
	union ext4_extent_item *item;

	ptr = cur->c_paths[depth].p_ptr;
	hdr = cur->c_paths[depth].p_hdr;
	item = EXT_FIRST_ITEM(hdr) + ptr;

	ext4_assert(ext4_ext_header_entries(hdr));

	nritems = EXT_LAST_ITEM(hdr) - (item + 1) + 1;
	if (nritems) {
		memmove(item, item + 1, nritems * EXT4_EXT_ITEM_SIZE);
		memset(EXT_LAST_ITEM(hdr), 0, EXT4_EXT_ITEM_SIZE);
	} else {
		memset(item, 0, EXT4_EXT_ITEM_SIZE);
	}
	ext4_ext_header_set_entries(hdr, ext4_ext_header_entries(hdr) - 1);
	if (depth == ext4_ext_cursor_depth(cur))
		cur->c_cursor_op.c_root_dirty_func(cur);
	else
		fs_mark_buffer_dirty(cur->c_paths[depth].p_bcb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x30(%rdi), %rcx
movslq %esi, %rax
leaq (%rax,%rax,2), %r14
movq 0x8(%rcx,%r14,8), %r15
movzwl 0x2(%r15), %eax
testq %rax, %rax
je 0x5a37
movl %esi, %ebx
movq %rdi, %r8
movq 0x10(%rcx,%r14,8), %rcx
leaq 0xc(%r15), %r12
leaq (%rcx,%rcx,2), %rcx
leaq 0xc(%r15,%rcx,4), %rdi
leaq (%rax,%rax,2), %rax
leaq (%r12,%rax,4), %rdx
leaq 0xc(%rdi), %rsi
subq %rsi, %rdx
addq $-0xc, %rdx
cmpq $-0xc, %rdx
je 0x59e9
addq $0xc, %rdx
movq %r8, %r13
callq 0x2210
movq %r13, %r8
movzwl 0x2(%r15), %eax
leaq (%rax,%rax,2), %rax
leaq (%r12,%rax,4), %rdi
addq $-0xc, %rdi
movl $0x0, 0x8(%rdi)
movq $0x0, (%rdi)
decw 0x2(%r15)
movq (%r8), %rax
movzwl 0x6(%rax), %eax
cmpl %ebx, %eax
jne 0x5a1c
movq %r8, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x18(%r8)
movq 0x30(%r8), %rax
movq (%rax,%r14,8), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27b8
leaq 0x1364(%rip), %rdi      # 0x6da2
leaq 0xfa6(%rip), %rsi       # 0x69eb
leaq 0x1373(%rip), %rcx      # 0x6dbf
movl $0x4d0, %edx            # imm = 0x4D0
callq 0x20c0
// File: /workspace/github_c_makefile_star2_O3/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_right_sibling
static int
ext4_ext_right_sibling(struct ext4_ext_cursor *cur, int depth,
		       struct ext4_ext_cursor **ncurp, bool *nosibp)
{
	int ret = 0;
	int i;
	ext4_lblk_t lblock;
	bool nosib = true;
	struct ext4_ext_cursor *ncur = NULL;
	int rootdepth;
	struct ext4_extent_header *hdr;
	union ext4_extent_item *itemp;

	rootdepth = ext4_ext_cursor_depth(cur);
	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);

	for (i = depth + 1; i <= rootdepth; i++) {
		ssize_t ptr = cur->c_paths[i].p_ptr;

		hdr = cur->c_paths[i].p_hdr;
		if (ptr++ < ext4_ext_header_entries(hdr) - 1) {
			struct ext4_extent_idx *idx =
			    EXT_FIRST_INDEX(hdr) + ptr;
			nosib = false;
			lblock = ext4_idx_lblock(idx);
			break;
		}
	}
	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;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x5e47
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %eax
movq (%rdi), %rsi
movq 0x30(%rdi), %rdx
movzwl 0x6(%rsi), %ecx
movslq %eax, %r8
leaq (%r8,%r8,2), %rax
leaq (%rdx,%rax,8), %rax
addq $0x28, %rax
movq -0x20(%rax), %rdx
movl 0xc(%rdx), %r15d
cmpl %ecx, %r8d
cmovgl %r8d, %ecx
subq %r8, %rcx
incq %rcx
decq %rcx
je 0x5dff
movq -0x8(%rax), %rdx
movq (%rax), %r8
addq $0x18, %rax
movzwl 0x2(%rdx), %r9d
decq %r9
cmpq %r9, %r8
jge 0x5dd4
leaq (%r8,%r8,2), %rax
movl 0x18(%rdx,%rax,4), %r15d
xorl %r13d, %r13d
jmp 0x5e02
movb $0x1, %r13b
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rax
movq 0x38(%rdi), %rcx
movq %rax, %rdi
callq 0x427f
movq %rax, %r12
testq %rax, %rax
je 0x5e2d
movq %r12, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x44c1
jmp 0x5e32
movl $0xc, %eax
movb %r13b, (%r14)
movq %r12, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfaa(%rip), %rdi       # 0x6df8
leaq 0xb96(%rip), %rsi       # 0x69eb
leaq 0xfa2(%rip), %rcx       # 0x6dfe
movl $0x54b, %edx            # imm = 0x54B
callq 0x20c0
// File: /workspace/github_c_makefile_star2_O3/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_shrinkable
static int
ext4_ext_shrinkable(struct ext4_ext_cursor *cur, bool *shrinkablep)
{
	int ret = 0;
	int i = 0;
	int maxnritems;
	int nritems;
	int nnritems = 0;
	int rootdepth;
	struct ext4_extent_header *hdr;
	struct ext4_ext_cursor *ncur = NULL;
	bool shrinkable = false;

	rootdepth = ext4_ext_cursor_depth(cur);
	hdr = cur->c_root;

	if (!rootdepth)
		goto out;

	ncur = ext4_ext_cursor_alloc(cur->c_superblock, cur->c_root,
				     cur->c_fsinfo, cur->c_blocksz);
	if (!ncur)
		return ENOMEM;

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

	maxnritems = ext4_ext_header_max_entries(hdr);
	nritems = ext4_ext_header_entries(hdr);

	for (i = 0; i < nritems; i++) {
		bool nosib;
		struct ext4_ext_cursor *tcur;
		struct ext4_extent_header *nhdr =
		
		nhdr = cur->c_paths[rootdepth - 1].p_hdr;

		nnritems += ext4_ext_header_entries(nhdr);
		ret =
		    ext4_ext_right_sibling(ncur, rootdepth - 1, &tcur, &nosib);
		if (ret)
			goto out;
		if (nosib) {
			if (tcur)
				ext4_ext_cursor_free(tcur);
			break;
		}
		ext4_ext_cursor_free(ncur);
		ncur = tcur;
	}
	if (nnritems <= maxnritems)
		shrinkable = true;

out:
	if (ncur)
		ext4_ext_cursor_free(ncur);
	*shrinkablep = shrinkable;
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq (%rdi), %rbx
movzwl 0x6(%rbx), %eax
movq %rax, -0x38(%rbp)
testl %eax, %eax
je 0x5ec8
movq %rdi, %r12
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rdi
movq 0x38(%r12), %rcx
movq %rbx, %rsi
callq 0x427f
testq %rax, %rax
je 0x5ed3
movq %rax, %r14
movq %r12, -0x60(%rbp)
xorl %r12d, %r12d
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x44c1
testl %eax, %eax
je 0x5ede
movl %eax, %r13d
jmp 0x5f79
xorl %r12d, %r12d
xorl %r13d, %r13d
jmp 0x5f81
movl $0xc, %r13d
jmp 0x5f84
movq %r15, -0x50(%rbp)
movzwl 0x4(%rbx), %eax
movl %eax, -0x3c(%rbp)
movzwl 0x2(%rbx), %ebx
testl %ebx, %ebx
je 0x5f65
movq -0x38(%rbp), %rax
decl %eax
xorl %r12d, %r12d
movq %rax, -0x38(%rbp)
leaq (%rax,%rax,2), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x58(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movzwl 0x2(%rax), %r15d
movq %r14, %rdi
movq -0x38(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x29(%rbp), %rcx
callq 0x5d86
testl %eax, %eax
jne 0x5f4f
addl %r15d, %r12d
cmpb $0x1, -0x29(%rbp)
je 0x5f57
movq %r14, %rdi
callq 0x4492
movq -0x48(%rbp), %r14
decl %ebx
jne 0x5f06
jmp 0x5f65
movl %eax, %r13d
xorl %r12d, %r12d
jmp 0x5f70
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x5f65
callq 0x4492
cmpl -0x3c(%rbp), %r12d
setle %r12b
xorl %r13d, %r13d
testq %r14, %r14
movq -0x50(%rbp), %r15
je 0x5f81
movq %r14, %rdi
callq 0x4492
movb %r12b, (%r15)
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10068, %rsp          # imm = 0x10068
movq %rdi, %r15
leaq -0x10080(%rbp), %rdi
callq 0x1050
movl $0x1, %ebx
leaq -0x60(%rbp), %r14
leaq -0x48(%rbp), %r13
cmpq $0x1, %rbx
jne 0x1989
leaq -0x10080(%rbp), %rdi
jmp 0x198b
xorl %edi, %edi
leaq 0x4a4e(%rip), %rsi      # 0x63e0
callq 0x11a0
movq %rax, %r12
testq %rax, %rax
je 0x1ac8
movq %rbx, -0x40(%rbp)
movzbl 0xc(%r15), %esi
leaq -0x80(%rbp), %rdi
callq 0x20d4
leaq -0x2c(%rbp), %rax
movq %rax, (%rsp)
movq %r12, -0x38(%rbp)
movq %r12, %rdi
leaq 0x46bb(%rip), %rsi      # 0x6086
movq %r15, %rbx
leaq -0x68(%rbp), %r15
movq %r15, %rdx
movq %r14, %rcx
leaq -0x50(%rbp), %r12
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x1170
cmpl $0x5, %eax
jne 0x1a10
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %r8
movss -0x2c(%rbp), %xmm0
movq %rbx, %rdi
callq 0x1b9d
movq %rbx, %r15
jmp 0x1a8b
movq -0x38(%rbp), %rdi
leaq 0x467e(%rip), %rsi      # 0x6099
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x1170
cmpl $0x4, %eax
jne 0x1a55
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %r8
movss -0x6c(%rbp), %xmm0
movq %rbx, %r15
movq %rbx, %rdi
callq 0x1b9d
jmp 0x1a8b
movq -0x38(%rbp), %rdi
leaq 0x4632(%rip), %rsi      # 0x6092
leaq -0x58(%rbp), %r12
movq %r12, %rdx
leaq -0x2c(%rbp), %rcx
xorl %eax, %eax
callq 0x1170
cmpl $0x2, %eax
movq %rbx, %r15
jne 0x1a97
movq -0x58(%rbp), %rsi
movss -0x2c(%rbp), %xmm0
movq %r15, %rdi
callq 0x1c10
movq -0x40(%rbp), %rbx
incq %rbx
jmp 0x197a
movq -0x38(%rbp), %rdi
leaq 0x4603(%rip), %rsi      # 0x60a5
movq %r12, %rdx
xorl %eax, %eax
callq 0x1170
cmpl $0x1, %eax
movq -0x40(%rbp), %rbx
jne 0x1add
movq -0x58(%rbp), %rsi
movss -0x6c(%rbp), %xmm0
movq %r15, %rdi
callq 0x1c10
jmp 0x1a8f
movq %r15, %rax
addq $0x10068, %rsp          # imm = 0x10068
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7514(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x4539(%rip), %rsi      # 0x6027
movq %rbx, %rdx
movq -0x38(%rbp), %rcx
xorl %eax, %eax
callq 0x1130
movl $0x1, %edi
callq 0x11c0
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x18(%rbp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x1140
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x1b36
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x74bb(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x4517(%rip), %rsi      # 0x605e
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1130
movq $-0x1, %rax
jmp 0x1b2d
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x2d09
movq %rax, %r14
cmpq $-0x1, %rax
je 0x1b80
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x7471(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x44e2(%rip), %rsi      # 0x6073
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1130
jmp 0x1b78
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x18(%rdi), %r12
leaq (%r12,%r12), %r13
movq %r13, 0x18(%rdi)
movq $0x0, 0x20(%rdi)
movq %r12, %r15
shlq $0x5, %r15
movq %r15, %rdi
callq 0x1160
movq %rax, (%r14)
testq %r13, %r13
je 0x1d36
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x10e0
testq %r12, %r12
je 0x1d80
xorl %r15d, %r15d
movq %r15, %rax
shlq $0x4, %rax
movq (%rbx,%rax), %r13
testq %r13, %r13
je 0x1d64
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r14, %rdi
callq 0x1d96
movq 0x10(%r13), %r13
jmp 0x1d49
incq %r15
cmpq %r12, %r15
jne 0x1d3e
movq %rbx, %r14
movq (%r14), %rdi
callq 0x1f00
addq $0x10, %r14
decq %r12
jne 0x1d6f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/hash.c
// Function: hash_add
void hash_add(  struct _hash * hash, 
                void * key, 
                void * value) 
{
    size_t bnum = hash->hash_f(key) % hash->size;
    struct _bucket * bucket = &hash->buckets[bnum];

    // check if we allready have that key and update it
    for (
                struct _bitem * bi = bucket->head; 
                bi != NULL; 
                bi = bi->next
    ) {
        if ( hash->cmp_f(key, bi->key) ) {
            memcpy(bi->key, key, hash->key_size);
            memcpy(bi->value, value, hash->item_size);
            return;
        }
    }

    // otherwise

    struct _bitem * bitem = malloc(sizeof(struct _bitem));

    bitem->key = key;
    bitem->value = value;
    bitem->next = NULL;         // sentinel

    bitem->key = malloc(hash->key_size);
    memcpy(bitem->key, key, hash->key_size);

    bitem->value = malloc(hash->item_size);
    memcpy(bitem->value, value, hash->item_size);

    if ( bucket->tail == NULL ) {
        bucket->tail = bucket->head = bitem;
    } else {
        bucket->tail->next = bitem;
        bucket->tail = bitem;
    }

    // warning: could be a recusion while resizing
    ++hash->n_items;
    if ( ( ((float)hash->n_items) / hash->size) > HASH_ALPHA) {
        hash_resize(hash);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, -0x30(%rbp)
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq *0x28(%rbx)
xorl %edx, %edx
divq 0x18(%rbx)
movq %rdx, %r12
movq (%rbx), %r14
shlq $0x4, %r12
movq (%r14,%r12), %r13
testq %r13, %r13
je 0x1de5
movq (%r13), %rsi
movq %r15, %rdi
callq *0x30(%rbx)
testl %eax, %eax
jne 0x1ed1
movq 0x10(%r13), %r13
jmp 0x1dc8
addq %r12, %r14
movl $0x18, %edi
callq 0x1160
movq %rax, %r12
movq $0x0, 0x10(%rax)
movq 0x10(%rbx), %r13
movq %r13, %rdi
callq 0x1160
movq %rax, (%r12)
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1150
movq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x1160
movq %rax, 0x8(%r12)
movq %rax, %rdi
movq -0x30(%rbp), %rsi
movq %r15, %rdx
callq 0x1150
movq 0x8(%r14), %rax
leaq 0x10(%rax), %rcx
testq %rax, %rax
cmoveq %r14, %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%r14)
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
incq %rcx
movq %rcx, 0x20(%rbx)
js 0x1e69
cvtsi2ss %rcx, %xmm0
jmp 0x1e7e
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
testq %rax, %rax
js 0x1e8a
cvtsi2ss %rax, %xmm1
jmp 0x1e9f
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
ucomiss 0x4202(%rip), %xmm0     # 0x60ac
jbe 0x1ec2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1cea
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rdi
movq 0x10(%rbx), %rdx
movq %r15, %rsi
callq 0x1150
movq 0x8(%r13), %rdi
movq 0x8(%rbx), %rdx
movq -0x30(%rbp), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1150
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x1f3f
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rbx), %r14
cmpq $0x0, 0x8(%rbx)
je 0x1f2b
movq (%rbx), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r14, %rbx
testq %r14, %r14
jne 0x1f0f
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
je 0x1f73
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x1f00
incq %r15
addq $0x10, %r14
cmpq 0x18(%rbx), %r15
jb 0x1f5a
movq (%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %r13
movq %rsi, %rdi
callq *0x28(%r14)
xorl %r12d, %r12d
xorl %edx, %edx
divq 0x18(%r14)
shlq $0x4, %rdx
movq (%r13,%rdx), %r13
testq %r13, %r13
je 0x1ff6
xorl %r12d, %r12d
movq (%r13), %rsi
movq %r15, %rdi
callq *0x30(%r14)
testl %eax, %eax
jne 0x1fe2
movq 0x10(%r13), %r13
testq %r13, %r13
jne 0x1fc8
jmp 0x1ff6
movq 0x8(%r13), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1150
movq 0x8(%r13), %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x4(%rdi)
cmpl 0x8(%rdi), %ecx
jbe 0x2168
addl %ecx, %ecx
movl %ecx, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x1180
movq %rax, %rcx
movq %rax, 0x10(%rbx)
movl 0x4(%rbx), %eax
decl %eax
jmp 0x216c
movq 0x10(%rbx), %rcx
movl %eax, %edx
leaq (%rdx,%rdx,2), %rdx
xorps %xmm0, %xmm0
movups %xmm0, (%rcx,%rdx,8)
movq $0x0, 0x10(%rcx,%rdx,8)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebx
movl %ecx, %r14d
movl %edx, %r15d
movq 0x10(%rdi), %rax
movl %esi, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %r12
movl (%r12), %eax
leal 0x1(%rax), %esi
movl %esi, (%r12)
cmpl 0x4(%r12), %esi
jbe 0x21f0
addl %esi, %esi
movl %esi, 0x4(%r12)
movq 0x10(%r12), %rdi
shlq $0x4, %rsi
movss %xmm0, -0x24(%rbp)
callq 0x1180
movss -0x24(%rbp), %xmm0
movq %rax, %rcx
movq %rax, 0x10(%r12)
movl (%r12), %eax
decl %eax
jmp 0x21f5
movq 0x10(%r12), %rcx
movl %eax, %edx
shlq $0x4, %rdx
movl %r15d, (%rcx,%rdx)
movl %r14d, 0x8(%rcx,%rdx)
movl %ebx, 0xc(%rcx,%rdx)
movss %xmm0, 0x4(%rcx,%rdx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
testl %eax, %eax
je 0x2277
movl $0x10, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rcx
movq (%rcx,%r14), %rdi
testq %rdi, %rdi
je 0x2269
callq 0x1030
movl 0x4(%rbx), %eax
incq %r15
movl %eax, %ecx
addq $0x18, %r14
cmpq %rcx, %r15
jb 0x2254
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x2285
callq 0x1030
movl $0x0, 0x8(%rbx)
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3dd7(%rip), %rdi      # 0x60b0
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x11d0
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x11d0
leaq 0x4(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x11d0
movsbl 0xc(%r14), %edi
movq %rbx, %rsi
callq 0x10f0
movsbl 0xd(%r14), %edi
movq %rbx, %rsi
callq 0x10f0
cmpl $0x0, 0x4(%r14)
je 0x23ca
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r14, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %r14
leaq (%r14,%r12), %r15
leaq (%r14,%r12), %rdi
addq $0x8, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x11d0
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x11d0
leaq (%r14,%r12), %r15
addq $0xc, %r15
movq -0x30(%rbp), %r14
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x11d0
movq 0x4(%r15), %rdi
movl -0xc(%r15), %edx
movl $0x10, %esi
movq %rbx, %rcx
callq 0x11d0
incq %r13
movl 0x4(%r14), %eax
addq $0x18, %r12
cmpq %rax, %r13
jb 0x2345
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r12
leaq -0x34(%rbp), %r15
movl $0x0, (%r15)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1080
cmpl $0x66733031, (%r15)     # imm = 0x66733031
jne 0x2555
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x1080
leaq 0x4(%r12), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1080
leaq 0xc(%r12), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1080
leaq 0xd(%r12), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1080
movl 0x4(%r12), %r14d
movl %r14d, 0x8(%r12)
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %rdi
callq 0x1160
movq %rax, 0x10(%r12)
testq %r14, %r14
je 0x2546
xorl %r13d, %r13d
xorl %r14d, %r14d
movq %r12, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %r12
leaq (%r12,%r13), %r15
leaq (%r12,%r13), %rdi
addq $0x8, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1080
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1080
leaq (%r12,%r13), %r15
addq $0xc, %r15
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1080
movl -0xc(%r15), %r12d
movl %r12d, -0x8(%r15)
movq %r12, %rdi
shlq $0x4, %rdi
callq 0x1160
movq %rax, 0x4(%r15)
movl $0x10, %esi
movq %rax, %rdi
movq %r12, %rdx
movq -0x30(%rbp), %r12
movq %rbx, %rcx
callq 0x1080
incq %r14
movl 0x4(%r12), %eax
addq $0x18, %r13
cmpq %rax, %r14
jb 0x24aa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3b75(%rip), %rdi      # 0x60d1
callq 0x1060
movl $0x1, %edi
callq 0x11c0
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3b32(%rip), %rsi      # 0x60b4
movq %r14, %rdi
callq 0x1190
testq %rax, %rax
je 0x25af
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x22be
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1090
movq %r14, %rdi
callq 0x121a
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3b00(%rip), %rsi      # 0x60ce
movq %r14, %rdi
callq 0x1190
testq %rax, %rax
je 0x25fb
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x23d9
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1090
movq %r14, %rdi
callq 0x1241
// File: /workspace/github_c_makefile_star2_O3/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:
movl 0x4(%rdi), %eax
testq %rax, %rax
je 0x262d
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rdi), %rcx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
xorl %esi, %esi
xorl %eax, %eax
addl (%rcx,%rsi), %eax
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0x261f
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %r12d
movl 0x8(%rdi), %ecx
movl 0x4(%rsi), %eax
addl %r12d, %eax
movl %eax, 0x4(%rdi)
cmpl %eax, %ecx
jae 0x2677
movl %eax, 0x8(%rbx)
movq 0x10(%rbx), %rdi
movl %eax, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x1180
movq %rax, 0x10(%rbx)
jmp 0x267b
movq 0x10(%rbx), %rax
leaq (%r12,%r12,2), %rcx
leaq (%rax,%rcx,8), %rdi
movq 0x10(%r14), %rsi
movl 0x4(%r14), %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
callq 0x1150
movl 0x4(%rbx), %eax
movq %rax, -0x38(%rbp)
cmpl %eax, %r12d
jae 0x270e
movq 0x10(%rbx), %rax
movq %rax, -0x30(%rbp)
movq %r12, %r15
leaq (%r15,%r15,2), %r14
movq -0x30(%rbp), %r13
movq 0x10(%r13,%r14,8), %rax
movq %rax, -0x40(%rbp)
movl 0x4(%r13,%r14,8), %edi
shlq $0x4, %rdi
callq 0x1160
movq %rax, %rbx
movq %rax, 0x10(%r13,%r14,8)
movl (%r13,%r14,8), %r13d
movq %r13, %r14
shlq $0x4, %r14
movq %rax, %rdi
movq -0x40(%rbp), %rsi
movq %r14, %rdx
callq 0x1150
testq %r13, %r13
je 0x2705
xorl %eax, %eax
addl %r12d, (%rbx,%rax)
addq $0x10, %rax
cmpq %rax, %r14
jne 0x26f8
incq %r15
cmpq -0x38(%rbp), %r15
jne 0x26af
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsi)
movups (%rdi), %xmm0
movups %xmm0, (%rsi)
movl 0x8(%rdi), %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x1160
movq %rax, %rbx
movq %rax, 0x10(%r15)
movq 0x10(%r12), %r14
movl 0x4(%r12), %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1150
movl 0x4(%r15), %eax
testq %rax, %rax
je 0x27b5
shlq $0x3, %rax
leaq (%rax,%rax,2), %r15
xorl %r12d, %r12d
movl 0x4(%rbx,%r12), %edi
shlq $0x4, %rdi
callq 0x1160
movq %rax, 0x10(%rbx,%r12)
movq 0x10(%r14,%r12), %rsi
movl (%rbx,%r12), %edx
shlq $0x4, %rdx
movq %rax, %rdi
callq 0x1150
addq $0x18, %r12
cmpq %r12, %r15
jne 0x2784
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/fst.c
// Function: fst_relabel
void fst_relabel(struct _fst * fst, label_t old, label_t new, int dir) {
    // change labels through the whole automaton:
    // 0 - input 
    // 1 - output 
    
    struct _state * state;
    struct _arc * arc;

    for (state_t s = 0; s < fst->n_states; ++s) {
        state = &fst->states[s];
        for (arc_t a = 0; a < state->n_arcs; ++a) {
            arc = &state->arcs[a];

            if (dir == 0) {
                if (arc->ilabel == old) arc->ilabel = new; 
            } else {
                if (arc->olabel == old) arc->olabel = new; 
            }
        }
    }
}

// Assembly:
movl 0x4(%rdi), %eax
testq %rax, %rax
je 0x282c
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x10(%rdi), %rdi
xorl %r8d, %r8d
leaq (%r8,%r8,2), %r10
movl (%rdi,%r10,8), %r9d
testq %r9, %r9
je 0x2820
leaq (%rdi,%r10,8), %r10
movq 0x10(%r10), %r10
leaq 0x8(%r10), %r11
xorl %ebx, %ebx
testl %ecx, %ecx
je 0x2809
cmpl %esi, 0x4(%r11)
jne 0x2814
movq %rbx, %r14
shlq $0x4, %r14
addq %r10, %r14
addq $0xc, %r14
jmp 0x2811
movq %r11, %r14
cmpl %esi, (%r11)
jne 0x2814
movl %edx, (%r14)
incq %rbx
addq $0x10, %r11
decq %r9
jne 0x27ef
incq %r8
cmpq %rax, %r8
jne 0x27d4
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/symt.c
// Function: symt_read
struct _symt * symt_read(struct _symt * st, FILE * fin) {
    char p[0xffff];
    char token[TOKEN_SIZE];
    size_t line = 1;
    size_t token_id;

    while (fgets(p, sizeof(p), fin) != NULL) {
        if (sscanf(p, "%s\t%zu", token, &token_id) == 2) {
            symt_add(st, token_id, token);
        }
        else {
                printf("Invalid input line %zd: %s", line, p);
                exit(EXIT_FAILURE);
        }
        ++line;
    }
    return st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10408, %rsp          # imm = 0x10408
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x10430(%rbp), %rdi
movl $0xffff, %esi           # imm = 0xFFFF
movq %r14, %rdx
callq 0x1100
testq %rax, %rax
je 0x28bb
movl $0x1, %r15d
leaq -0x10430(%rbp), %r13
leaq -0x430(%rbp), %r12
movq %r13, %rdi
leaq 0x3862(%rip), %rsi      # 0x60e3
movq %r12, %rdx
leaq -0x30(%rbp), %rcx
xorl %eax, %eax
callq 0x1170
cmpl $0x2, %eax
jne 0x28d0
movq -0x30(%rbp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x28f2
incq %r15
movq %r13, %rdi
movl $0xffff, %esi           # imm = 0xFFFF
movq %r14, %rdx
callq 0x1100
testq %rax, %rax
jne 0x2877
movq %rbx, %rax
addq $0x10408, %rsp          # imm = 0x10408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x372d(%rip), %rdi      # 0x6004
leaq -0x10430(%rbp), %rdx
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/symt.c
// Function: symt_add
char * symt_add(
                        struct _symt * st, 
                        size_t id, 
                        const char * token) {

    // Token should be a C-string
    size_t s = st->n_max;
    char ** p;

    assert(st->sym != NULL);
    assert(st->n_max != 0);

    while (st->n_max <= id) {
        st->n_max *= 2;
    }

    if( st->n_max > s) {
        p = realloc(st->sym, st->n_max * sizeof(char *)); 
        st->sym = p;
    }

    for(size_t i = s; i < st->n_max; ++i)
        st->sym[i] = NULL;

    char * t = malloc(strlen(token) + 1);
    //strncpy(t, token, TOKEN_SIZE);
    strcpy(t, token);
    st->sym[id] = t;
    ++st->n_items;

    return st->sym[id];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rdi), %r12
testq %r12, %r12
je 0x29b0
movq %rdi, %r14
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x29cf
movq %rdx, %r15
movq %rsi, %rbx
cmpq %rsi, %r13
ja 0x2973
movq %r13, %rax
movq %rax, %rsi
addq %rax, %rax
cmpq %rbx, %rax
jbe 0x292b
movq %rax, 0x8(%r14)
cmpq %r13, %rax
jbe 0x2956
shlq $0x4, %rsi
movq %r12, %rdi
callq 0x1180
movq %rax, %r12
movq %rax, 0x10(%r14)
movq 0x8(%r14), %rax
cmpq %rax, %r13
jae 0x2973
movq 0x10(%r14), %rcx
movq $0x0, (%rcx,%r13,8)
incq %r13
cmpq %r13, %rax
jne 0x295b
movq 0x10(%r14), %r12
movq %r15, %rdi
callq 0x10a0
leaq 0x1(%rax), %rdi
callq 0x1160
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
callq 0x1050
movq %r13, (%r12,%rbx,8)
incq (%r14)
movq 0x10(%r14), %rax
movq (%rax,%rbx,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3754(%rip), %rdi      # 0x610b
leaq 0x375d(%rip), %rsi      # 0x611b
leaq 0x3761(%rip), %rcx      # 0x6126
movl $0x7d, %edx
callq 0x10c0
leaq 0x3785(%rip), %rdi      # 0x615b
leaq 0x373e(%rip), %rsi      # 0x611b
leaq 0x3742(%rip), %rcx      # 0x6126
movl $0x7e, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/symt.c
// Function: symt_compile
struct _symt * symt_compile(struct _symt * st, const char * str) {
    char p[0xffff];
    char token[TOKEN_SIZE];
    char * tok;
    size_t line = 1;
    size_t token_id;

    strcpy(p, str);

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

        if (tok) {
            if (sscanf(p, "%s\t%zd", token, &token_id) == 2) {
                symt_add(st, token_id, token);
            }
            else {
                    printf("Invalid input line %zd: %s", line, p);
                    exit(EXIT_FAILURE);
            }
        }
        ++line;
    } while (tok);

    return st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10408, %rsp          # imm = 0x10408
movq %rdi, %rbx
leaq -0x10430(%rbp), %r15
movq %r15, %rdi
callq 0x1050
movl $0x1, %r14d
leaq -0x430(%rbp), %r13
leaq -0x30(%rbp), %r12
cmpq $0x1, %r14
jne 0x2a30
movq %r15, %rdi
jmp 0x2a32
xorl %edi, %edi
leaq 0x39a7(%rip), %rsi      # 0x63e0
callq 0x11a0
testq %rax, %rax
je 0x2a73
movq %r15, %rdi
leaq 0x369d(%rip), %rsi      # 0x60ea
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x1170
cmpl $0x2, %eax
jne 0x2a88
movq -0x30(%rbp), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x28f2
incq %r14
jmp 0x2a25
movq %rbx, %rax
addq $0x10408, %rsp          # imm = 0x10408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3575(%rip), %rdi      # 0x6004
leaq -0x10430(%rbp), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/symt.c
// Function: symt_fread
struct _symt * symt_fread(struct _symt * st, const char * filename) {
    FILE * fin = NULL;
    if (( fin = fopen(filename, "r")) == NULL ) {
        fprintf(stderr, "Error opening file: %s\n", filename);
        exit(EXIT_FAILURE);
    }

    st = symt_read(st, fin);
    if (fin != NULL)
        fclose(fin);
    return st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3630(%rip), %rsi      # 0x60f1
movq %r14, %rdi
callq 0x1190
testq %rax, %rax
je 0x2af2
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2830
movq %r15, %rdi
callq 0x1090
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1268
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/symt.c
// Function: symt_create
struct _symt * symt_create() {
    struct _symt * st = malloc(sizeof(struct _symt));

    st->rev = NULL;
    st->sym = malloc(SYM_INIT_SIZE * sizeof(char *));

    st->n_items = 0;
    st->n_max = SYM_INIT_SIZE;

    for(size_t i=0; i < st->n_max; ++i)
        st->sym[i] = NULL;

    return st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0x20, %edi
callq 0x1160
movq %rax, %rbx
xorl %r14d, %r14d
movq %r14, 0x18(%rax)
movl $0x1, %edi
movl $0x2000, %esi           # imm = 0x2000
callq 0x1110
movq %rax, 0x10(%rbx)
movq %r14, (%rbx)
movq $0x400, 0x8(%rbx)       # imm = 0x400
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/symt.c
// Function: symt_remove
void symt_remove(struct _symt * st) {
    for(size_t i=0; i < st->n_max; ++i) 
        if(st->sym[i] != NULL)  
            free(st->sym[i]);

    if (st->rev != NULL)
        hash_remove(st->rev);

    free(st->sym);
    free(st);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x2b6f
xorl %r14d, %r14d
movq 0x10(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x2b67
callq 0x1030
movq 0x8(%rbx), %rax
incq %r14
cmpq %rax, %r14
jb 0x2b51
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x2b7d
callq 0x1f40
movq 0x10(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/symt.c
// Function: symt_reverse
struct _hash * symt_reverse(struct _symt * st) {
    if(st->rev != NULL)
        hash_remove(st->rev);

    st->rev = hash_create(
                    fnv32,
                    str_cmp,
                    TOKEN_SIZE,
                    sizeof(size_t),
                    st->n_items * 2);

    char token[TOKEN_SIZE] = {0};

    for(size_t i=0; i < st->n_max; ++i) {
        if ( st->sym[i] != NULL ) {
            strncpy(token, st->sym[i], TOKEN_SIZE - 1);
            //strcpy(token, st->sym[i]);
            hash_add(st->rev, token, &i);
            //hash_add(st->rev, st->sym[i], &i);
        }
    } 

    return st->rev;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x2c04
callq 0x1f40
movq (%rbx), %r8
addq %r8, %r8
leaq 0xa0(%rip), %rdi        # 0x2cb1
leaq 0xdd(%rip), %rsi        # 0x2cf5
movl $0x400, %edx            # imm = 0x400
movl $0x8, %ecx
callq 0x1c58
movq %rax, %r14
movq %rax, 0x18(%rbx)
leaq -0x420(%rbp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x10e0
movq $0x0, -0x20(%rbp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x2ca0
xorl %ecx, %ecx
leaq -0x420(%rbp), %r14
leaq -0x20(%rbp), %r15
movq 0x10(%rbx), %rdx
movq (%rdx,%rcx,8), %rsi
testq %rsi, %rsi
je 0x2c90
movl $0x3ff, %edx            # imm = 0x3FF
movq %r14, %rdi
callq 0x1040
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1d96
movq -0x20(%rbp), %rcx
movq 0x8(%rbx), %rax
incq %rcx
movq %rcx, -0x20(%rbp)
cmpq %rax, %rcx
jb 0x2c5f
movq 0x18(%rbx), %r14
movq %r14, %rax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/symt.c
// Function: fnv32
static size_t fnv32(void * str) {

    const char * s = str;
    uint32_t hsh = FNV_OFFSET_32, i;

    for(i = 0; i < strlen(s); i++) {
        // xor next byte into the bottom of the hash
        hsh = hsh ^ (s[i]); 
        // Multiply by prime number found to work well
        hsh = hsh * FNV_PRIME_32; 
    }
    return hsh;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10a0
testq %rax, %rax
je 0x2ce9
movl $0x811c9dc5, %ecx       # imm = 0x811C9DC5
movl $0x1, %edx
xorl %esi, %esi
movsbl (%rbx,%rsi), %esi
xorl %ecx, %esi
imull $0x1000193, %esi, %ecx  # imm = 0x1000193
movl %edx, %esi
incl %edx
cmpq %rsi, %rax
ja 0x2cd0
movl %ecx, %eax
jmp 0x2cee
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/symt.c
// Function: symt_getr
size_t symt_getr(struct _symt * st, char * token) {
    size_t id = -1;
    if (st->rev == NULL)
       symt_reverse(st); 

    hash_get(st->rev, token, &id); 

    return id; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq $-0x1, -0x18(%rbp)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x2d37
movq %r14, %rdi
callq 0x2be3
movq 0x18(%r14), %rdi
leaq -0x18(%rbp), %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1f8d
movq (%r14), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/sort.c
// Function: fst_arc_sort
void fst_arc_sort(struct _fst * fst, int sort_outer) {
    struct _state * state;

    int (*comp)(const void *, const void *);

    if (sort_outer == 0)    {
        comp=icomp;
        fst->flags |= ISORT;
    } else {
        comp=ocomp;
        fst->flags |= OSORT;
    }
    
    for(state_t s = 0; s < fst->n_states; ++s) {
        state = &fst->states[s];
        qsort(  state->arcs, 
                state->n_arcs,
                sizeof(struct _arc),
                comp );
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %esi, %esi
sete %al
leaq 0x56(%rip), %rcx        # 0x2dd5
leaq 0x5b(%rip), %r14        # 0x2de1
cmoveq %rcx, %r14
movb $0x2, %cl
subb %al, %cl
orb %cl, 0xd(%rdi)
cmpl $0x0, 0x4(%rdi)
je 0x2dcc
movq %rdi, %rbx
movl $0x10, %r15d
xorl %r12d, %r12d
movq 0x10(%rbx), %rax
movq (%rax,%r15), %rdi
movl -0x10(%rax,%r15), %esi
movl $0x10, %edx
movq %r14, %rcx
callq 0x1070
incq %r12
movl 0x4(%rbx), %eax
addq $0x18, %r15
cmpq %rax, %r12
jb 0x2da3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/queue.c
// Function: queue_create
struct _queue * queue_create(size_t item_size) {
    struct _queue * q;

    q = (struct _queue *) malloc(sizeof(struct _queue));
    q->item_size = item_size;

    q->n_items = 0;

    q->head = NULL;
    q->tail = NULL;

    return q;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x20, %edi
callq 0x1160
movq %rbx, 0x10(%rax)
movq $0x0, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/c0stya[P]fslib/src/queue.c
// Function: queue_enque
void queue_enque(struct _queue * q, void * item) {
    struct _qnode * node;

    assert ( q != NULL);

    node = (struct _qnode *)malloc(sizeof(struct _qnode) - 1 + q->item_size);
    node->next = NULL;

    memcpy(node->item, item, q->item_size);

    if (q->head == NULL)
        q->head = q->tail = node;
    else {
        q->tail->next = node;  
        q->tail = node;
    }

    ++q->n_items;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x2e81
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %r12
leaq 0xf(%r12), %rdi
callq 0x1160
movq %rax, %r14
movq $0x0, (%rax)
leaq 0x8(%rax), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1150
leaq 0x8(%rbx), %rax
cmpq $0x0, (%rbx)
je 0x2e68
movq (%rax), %rcx
jmp 0x2e6e
movq %rax, %rcx
movq %rbx, %rax
movq %r14, (%rcx)
movq %r14, (%rax)
incq 0x18(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32ea(%rip), %rdi      # 0x6172
leaq 0x32ed(%rip), %rsi      # 0x617c
leaq 0x32f2(%rip), %rcx      # 0x6188
movl $0x1c, %edx
callq 0x10c0