LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/db_bitmap.c
// Function: bitmap_bits_free
void bitmap_bits_free(struct db_bitmap *db_bitmap, ext4_fsblk_t bit, uint32_t bcnt)
{
    ext4_fsblk_t i = bit;
    uint8_t *bitmap = db_bitmap->bitmap;

    while(i & 7){

        if(!bcnt)
            return;

        __bitmap_bits_clr(db_bitmap, bitmap, i);

        bcnt--;
        i++;
    }
    bit  = i;
    bitmap += (bit >> 3);

    while(bcnt >= 32){
        *(uint32_t *)bitmap = 0;
        bitmap += 4;
        bcnt -= 32;
        bit += 32;
    }

    while(bcnt >= 16){
        *(uint16_t *)bitmap = 0;
        bitmap += 2;
        bcnt -= 16;
        bit += 16;
    }

    while(bcnt >= 8){
        *bitmap = 0;
        bitmap += 1;
        bcnt -= 8;
        bit += 8;
    }

    for (i = 0; i < bcnt; ++i) {
        __bitmap_bits_clr(db_bitmap, bitmap, i);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testb $0x7, %sil
je 0x3fef
movl %esi, %eax
andb $0x7, %al
subl $0x1, %r15d
jb 0x40cd
movq %r14, %rdx
subq 0x8(%rbx), %rdx
movq (%rbx), %rcx
movl 0x8(%rcx), %ecx
sarq %cl, %rdx
shll $0x3, %ecx
movq %rsi, %rdi
shrq %cl, %rdi
movb $-0x2, %r8b
movl %eax, %ecx
rolb %cl, %r8b
addl %edx, %edi
movq %rsi, %rcx
shrq $0x3, %rcx
andb %r8b, (%r14,%rcx)
movq 0x10(%rbx), %rcx
movslq %edi, %rdx
orb $0x1, (%rcx,%rdx,4)
incq %rsi
incb %al
testb $0x7, %sil
jne 0x3fa1
shrq $0x3, %rsi
addq %rsi, %r14
cmpl $0x20, %r15d
jb 0x4029
addl $-0x20, %r15d
movl %r15d, %eax
shrl $0x5, %eax
leal 0x4(,%rax,4), %edx
movl %eax, %r12d
shll $0x2, %r12d
movq %r14, %rdi
xorl %esi, %esi
callq 0x20d0
addq %r12, %r14
addq $0x4, %r14
andl $0x1f, %r15d
cmpl $0x10, %r15d
jb 0x4058
addl $-0x10, %r15d
movl %r15d, %r12d
shrl $0x4, %r12d
leaq 0x2(,%r12,2), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20d0
leaq (%r14,%r12,2), %r14
addq $0x2, %r14
andl $0xf, %r15d
cmpl $0x8, %r15d
jb 0x4082
addl $-0x8, %r15d
movl %r15d, %r12d
shrl $0x3, %r12d
leaq 0x1(%r12), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20d0
addq %r12, %r14
incq %r14
andl $0x7, %r15d
testl %r15d, %r15d
je 0x40cd
movl %r15d, %edx
xorl %eax, %eax
movq %r14, %rsi
subq 0x8(%rbx), %rsi
movq (%rbx), %rcx
movl 0x8(%rcx), %ecx
sarq %cl, %rsi
shll $0x3, %ecx
movq %rax, %rdi
shrq %cl, %rdi
movb $-0x2, %r8b
movl %eax, %ecx
rolb %cl, %r8b
addl %esi, %edi
movq %rax, %rcx
shrq $0x3, %rcx
andb %r8b, (%r14,%rcx)
movq 0x10(%rbx), %rcx
movslq %edi, %rsi
orb $0x1, (%rcx,%rsi,4)
incq %rax
cmpq %rax, %rdx
jne 0x408c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/db_bitmap.c
// Function: bitmap_find_bits_clr
int bitmap_find_bits_clr(struct db_bitmap *db_bitmap, ext4_fsblk_t bit, ext4_fsblk_t ebit,
    ext4_fsblk_t *bit_id)
{
    ext4_fsblk_t i;
    uint64_t bcnt = ebit - bit + 1;
    uint8_t *bitmap = db_bitmap->bitmap;

    i = bit;

    while(i & 7){

        if(!bcnt)
            return -ENOSPC;

        if(bitmap_is_bit_clr(bitmap, i)){
            *bit_id = bit;
            return 0;
        }

        i++;
        bcnt--;
    }

    bit  = i;
    bitmap += (bit >> 3);


    while(bcnt >= 32){
        if(*(uint32_t *)bitmap != 0xFFFFFFFF)
            goto finish_it;

        bitmap += 4;
        bcnt -= 32;
        bit += 32;
    }

    while(bcnt >= 16){
        if(*(uint16_t *)bitmap != 0xFFFF)
            goto finish_it;

        bitmap += 2;
        bcnt -= 16;
        bit += 16;
    }

    finish_it:
    while(bcnt >= 8){
        if(*bitmap != 0xFF){
            for (i = 0; i < 8; ++i) {
                if(bitmap_is_bit_clr(bitmap, i)){
                    *bit_id = bit + i;
                    return 0;
                }
            }
        }

        bitmap += 1;
        bcnt -= 8;
        bit += 8;
    }

    for (i = 0; i < bcnt; ++i) {
        if(bitmap_is_bit_clr(bitmap, i)){
            *bit_id = bit + i;
            return 0;
        }
    }

    return -ENOSPC;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rdi
testb $0x7, %sil
je 0x4123
leaq 0x1(%rdx), %r8
movq %rsi, %rax
cmpq %rax, %r8
je 0x41f3
movq %rax, %r9
shrq $0x3, %r9
movzbl (%rdi,%r9), %r9d
movl %eax, %r10d
andl $0x7, %r10d
btl %r10d, %r9d
jae 0x41fd
incq %rax
testb $0x7, %al
jne 0x40eb
subq %rax, %rdx
incq %rdx
movq %rax, %rsi
jmp 0x4129
subq %rsi, %rdx
incq %rdx
movq %rsi, %rax
shrq $0x3, %rax
addq %rax, %rdi
cmpq $0x20, %rdx
jb 0x4150
cmpl $-0x1, (%rdi)
jne 0x416e
addq $0x4, %rdi
addq $-0x20, %rdx
addq $0x20, %rsi
cmpq $0x1f, %rdx
ja 0x4139
cmpq $0x10, %rdx
jb 0x416e
cmpw $-0x1, (%rdi)
jne 0x416e
addq $0x2, %rdi
addq $-0x10, %rdx
addq $0x10, %rsi
cmpq $0xf, %rdx
ja 0x4156
cmpq $0x8, %rdx
jb 0x41bb
leaq -0x8(%rdx), %rax
shrq $0x3, %rax
addq %rdi, %rax
incq %rax
movq %rsi, %r8
negq %r8
cmpb $-0x1, (%rdi)
je 0x41a3
movzbl (%rdi), %r10d
xorl %r9d, %r9d
btl %r9d, %r10d
jae 0x41eb
incq %r9
cmpq $0x8, %r9
jne 0x4194
incq %rdi
addq $-0x8, %rdx
addq $0x8, %rsi
addq $-0x8, %r8
cmpq $0x7, %rdx
ja 0x4188
movq %rax, %rdi
movl $0xffffffe4, %eax       # imm = 0xFFFFFFE4
testq %rdx, %rdx
je 0x4202
xorl %r8d, %r8d
movq %r8, %r9
shrq $0x3, %r9
movzbl (%rdi,%r9), %r9d
movl %r8d, %r10d
andl $0x7, %r10d
btl %r10d, %r9d
jae 0x41fa
incq %r8
cmpq %r8, %rdx
jne 0x41c8
jmp 0x4202
subq %r8, %r9
movq %r9, %rsi
jmp 0x41fd
movl $0xffffffe4, %eax       # imm = 0xFFFFFFE4
jmp 0x4202
addq %r8, %rsi
movq %rsi, (%rcx)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/db.c
// Function: db_open
struct db_handle *db_open(struct super_block *sb)
{
	struct buffer_head *bh;
	struct db_header *bhdr;
	struct db_handle *db_handle;
	struct db_bitmap *db_bitmap;
	int err = 0;
	db_handle = xzalloc(sizeof(struct db_handle));
	if (!db_handle)
		return NULL;

	bh = fs_bread(sb, 0, &err);
	if (!bh) {
		err = -ENOMEM;
		goto out;
	}
	bhdr = (struct db_header *)bh->b_data;
	db_handle->sb = sb;
	db_handle->db_header = (struct db_header *)bhdr;
	db_bitmap = load_all_bitmap(sb, bhdr->db_nrblocks, bhdr->db_bitmap_block);
	if (!db_handle) {
		err = -ENOMEM;
		goto out;
	}
	db_handle->db_bitmap = db_bitmap;
	db_handle->sb_bh = bh;
out:
	if (err) {
		if (db_bitmap)
			free_all_bitmap(db_bitmap);
		if (db_handle)
			xfree(db_handle);

		db_handle = NULL;
	}
	return db_handle;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x0, -0x1c(%rbp)
movl $0x1, %edi
movl $0x28, %esi
callq 0x2140
testq %rax, %rax
je 0x428c
movq %rax, %rbx
leaq -0x1c(%rbp), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
testq %rax, %rax
je 0x426a
movq %rax, %r15
movq 0x18(%rax), %rax
movq %r14, (%rbx)
movq %rax, 0x10(%rbx)
movq 0x4(%rax), %rsi
movq 0xc(%rax), %rdx
movq %r14, %rdi
callq 0x3c93
movq %rax, 0x18(%rbx)
movq %r15, 0x20(%rbx)
jmp 0x4271
movl $0xfffffff4, -0x1c(%rbp) # imm = 0xFFFFFFF4
cmpl $0x0, -0x1c(%rbp)
je 0x428e
testq %rax, %rax
je 0x4284
movq %rax, %rdi
callq 0x3e0a
movq %rbx, %rdi
callq 0x2030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/db.c
// Function: db_close
void db_close(struct db_handle *db_handle)
{
	save_all_bitmap(db_handle->sb, db_handle->db_bitmap);
	free_all_bitmap(db_handle->db_bitmap);
	fs_brelse(db_handle->sb_bh);
	xfree(db_handle);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x18(%rbx), %rsi
callq 0x3e6a
movq 0x18(%rbx), %rdi
callq 0x3e0a
movq 0x20(%rbx), %rdi
callq 0x2853
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2030
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: extcursor_alloc_block
static int
extcursor_alloc_block(struct ext4_ext_cursor *cur, ext4_fsblk_t *nblockp)
{
	int ret;
	ext4_lblk_t count = 1;
	*nblockp = ext4_new_meta_blocks((struct inode *)cur->c_fsinfo, 0, 0,
					&count, &ret);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x8(%rdi), %r15
leaq -0x20(%rbp), %rcx
movq $0x0, (%rcx)
movq 0x18(%r15), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rdi
movq 0x4(%rdx), %rdx
decq %rdx
xorl %esi, %esi
callq 0x40d6
movl %eax, %r14d
testl %eax, %eax
jne 0x4330
movq 0x18(%r15), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x3f19
movq -0x20(%rbp), %rax
movq %rax, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_cursor_alloc
struct ext4_ext_cursor *
ext4_ext_cursor_alloc(struct super_block *sb, void *root, void *fsinfo,
		      size_t blocksz)
{
	struct ext4_ext_path *paths;
	struct ext4_extent_header *hdr;
	int i;
	int rootdepth;
	struct ext4_ext_cursor *cur;

	hdr = root;
	rootdepth = ext4_ext_header_depth(hdr);

	cur = (struct ext4_ext_cursor *)ext4_malloc(
	    sizeof(struct ext4_ext_cursor));
	if (!cur)
		return NULL;

	paths = (struct ext4_ext_path *)ext4_zalloc(
	    sizeof(struct ext4_ext_path) * (rootdepth + 1));
	if (!paths) {
		ext4_free(cur);
		return NULL;
	}
	for (i = 0; i <= rootdepth; i++)
		paths[i].p_ptr = -1;
	cur->c_superblock = sb;
	cur->c_root = root;
	cur->c_fsinfo = fsinfo;
	cur->c_cursor_op = ext4_test_cursor_op;
	cur->c_paths = paths;
	cur->c_maxdepth = rootdepth;
	cur->c_blocksz = blocksz;

	cur->c_paths[rootdepth].p_bcb = NULL;
	cur->c_paths[rootdepth].p_hdr = cur->c_root;
	cur->c_paths[rootdepth].p_ptr = -1;
	return cur;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, -0x38(%rbp)
movq %rsi, %r14
movq %rdi, %r13
movzwl 0x6(%rsi), %r15d
movl $0x48, %edi
callq 0x21c0
testq %rax, %rax
je 0x4447
movq %rax, %rbx
movq %r12, -0x30(%rbp)
leaq (%r15,%r15,2), %r12
leaq 0x18(,%r12,8), %rsi
movl $0x1, %edi
callq 0x2140
testq %rax, %rax
je 0x443f
movl %r15d, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq 0x18(,%rcx,8), %rcx
xorl %edx, %edx
movq $-0x1, 0x10(%rax,%rdx)
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x43e0
movq %r13, 0x10(%rbx)
movq %r14, (%rbx)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rbx)
leaq 0x6d70(%rip), %rcx      # 0xb178
movups (%rcx), %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x10(%rcx), %rcx
movq %rcx, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movl %r15d, 0x40(%rbx)
movq -0x30(%rbp), %rcx
movq %rcx, 0x38(%rbx)
movq $0x0, (%rax,%r12,8)
movq %r14, 0x8(%rax,%r12,8)
movq $-0x1, 0x10(%rax,%r12,8)
jmp 0x4449
movq %rbx, %rdi
callq 0x2030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_cursor_unpin
void
ext4_ext_cursor_unpin(struct ext4_ext_cursor *cur, int depth, int nrlevel)
{
	int i;
	int maxdepth;

	maxdepth = cur->c_maxdepth;

	if (depth < 0) {
		for (i = 0; i <= maxdepth; i++)
			ext4_ext_path_unpin(cur->c_paths + i);

	} else {
		for (i = depth; i <= maxdepth && i < depth + nrlevel; i++)
			ext4_ext_path_unpin(cur->c_paths + i);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x40(%rdi), %r14d
testl %esi, %esi
js 0x44e9
movl %esi, %r15d
cmpl %esi, %r14d
setl %al
testl %edx, %edx
setle %cl
orb %al, %cl
jne 0x453a
addl %r15d, %edx
movl %r15d, %eax
leaq (%rax,%rax,2), %rax
leaq 0x8(,%rax,8), %r13
movq %rbx, -0x30(%rbp)
movq 0x30(%rbx), %r12
cmpq $0x0, (%r12,%r13)
je 0x44d6
addq %r13, %r12
movq -0x8(%r12), %rdi
testq %rdi, %rdi
je 0x44ce
movl %edx, %ebx
callq 0x2853
movl %ebx, %edx
movq -0x30(%rbp), %rbx
movq $0x0, -0x8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
cmpl %r15d, %r14d
jle 0x453a
incl %r15d
addq $0x18, %r13
cmpl %r15d, %edx
jg 0x44a0
jmp 0x453a
testl %r14d, %r14d
js 0x453a
leaq (%r14,%r14,2), %rax
leaq 0x18(,%rax,8), %r14
xorl %r15d, %r15d
movq 0x30(%rbx), %rax
cmpq $0x0, 0x8(%rax,%r15)
je 0x4531
leaq (%rax,%r15), %r12
addq $0x8, %r12
movq -0x8(%r12), %rdi
testq %rdi, %rdi
je 0x4529
callq 0x2853
movq $0x0, -0x8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
addq $0x18, %r15
cmpq %r15, %r14
jne 0x44fd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_insert_item
static void
ext4_ext_insert_item(struct ext4_ext_cursor *cur, int depth,
		     union ext4_extent_item *nitems, bool updptr)
{
	struct ext4_extent_header *hdr;
	uint16_t nritems;
	ssize_t ptr;
	union ext4_extent_item *item;

	hdr = cur->c_paths[depth].p_hdr;
	nritems = ext4_ext_header_entries(hdr);
	ptr = (nritems) ? cur->c_paths[depth].p_ptr : 0;
	item = EXT_FIRST_ITEM(hdr) + ptr;

	ext4_assert(EXT_HAS_FREE_INDEX(hdr));

	if (nritems) {
		ssize_t shiftnritems;

		if (depth) {
			if (ext4_idx_lblock(&item->i) <
			    ext4_idx_lblock(&nitems->i)) {
				ptr++;
				item++;
			}
		} else {
			if (ext4_ext_lblock(&item->e) + ext4_ext_len(&item->e) -
				1 <
			    ext4_ext_lblock(&nitems->e)) {
				ptr++;
				item++;
			}
		}
		shiftnritems = EXT_LAST_ITEM(hdr) - item + 1;
		if (shiftnritems)
			memmove(item + 1, item,
				shiftnritems * EXT4_EXT_ITEM_SIZE);
		memcpy(item, nitems, EXT4_EXT_ITEM_SIZE);
	} else {
		memcpy(item, nitems, EXT4_EXT_ITEM_SIZE);
	}
	if (updptr)
		cur->c_paths[depth].p_ptr = ptr;
	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
subq $0x18, %rsp
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r8
movq 0x30(%rdi), %rdx
movl %esi, %eax
leaq (%rax,%rax,2), %r10
movq 0x8(%rdx,%r10,8), %r14
movzwl 0x2(%r14), %eax
testq %rax, %rax
je 0x4dfd
movq 0x10(%rdx,%r10,8), %r11
jmp 0x4e00
xorl %r11d, %r11d
cmpw 0x4(%r14), %ax
jae 0x4f06
leaq (%r11,%r11,2), %rdx
leaq (%r14,%rdx,4), %r12
addq $0xc, %r12
testq %rax, %rax
je 0x4e80
leaq 0xc(%r14), %r9
movl (%r12), %edx
testl %ebx, %ebx
je 0x4edd
cmpl (%r15), %edx
jae 0x4e38
incq %r11
addq $0xc, %r12
leaq (%rax,%rax,2), %rax
leaq (%r9,%rax,4), %rdx
subq %r12, %rdx
addq $-0xc, %rdx
cmpq $-0xc, %rdx
je 0x4e80
leaq 0xc(%r12), %rdi
addq $0xc, %rdx
movq %r12, %rsi
movq %r8, -0x40(%rbp)
movl %ecx, %r13d
movq %r10, -0x38(%rbp)
movl %ebx, -0x2c(%rbp)
movq %r11, %rbx
callq 0x2210
movq %rbx, %r11
movl -0x2c(%rbp), %ebx
movq -0x38(%rbp), %r10
movl %r13d, %ecx
movq -0x40(%rbp), %r8
movl 0x8(%r15), %eax
movl %eax, 0x8(%r12)
movq (%r15), %rax
movq %rax, (%r12)
testb %cl, %cl
je 0x4e9d
movq 0x30(%r8), %rax
movq %r11, 0x10(%rax,%r10,8)
incw 0x2(%r14)
movq (%r8), %rax
movzwl 0x6(%rax), %eax
cmpl %ebx, %eax
jne 0x4ec2
movq %r8, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x18(%r8)
movq 0x30(%r8), %rax
movq (%rax,%r10,8), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2863
movzwl 0x4(%r12), %esi
movl %esi, %edi
andl $0x7fff, %edi           # imm = 0x7FFF
cmpl $0x8001, %esi           # imm = 0x8001
cmovbl %esi, %edi
addl %edi, %edx
decl %edx
cmpl (%r15), %edx
jb 0x4e31
jmp 0x4e38
leaq 0x2d21(%rip), %rdi      # 0x7c2e
leaq 0x2aef(%rip), %rsi      # 0x7a03
leaq 0x2d2b(%rip), %rcx      # 0x7c46
movl $0x407, %edx            # imm = 0x407
callq 0x20c0
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_update_index
static void
ext4_ext_update_index(struct ext4_ext_cursor *cur, int depth, int force)
{
	int i;
	int rootdepth;

	rootdepth = ext4_ext_cursor_depth(cur);

	for (i = depth + 1; i <= rootdepth; i++) {
		struct ext4_extent_header *hdr =
		    (cur->c_paths[i].p_hdr);
		struct ext4_extent_header *childhdr =
		    cur->c_paths[i - 1].p_hdr;
		ssize_t ptr = cur->c_paths[i].p_ptr;

		if (cur->c_paths[i - 1].p_ptr)
			break;
		if (i > 1) {
			struct ext4_extent_idx *idx =
			    EXT_FIRST_INDEX(hdr) + ptr;
			struct ext4_extent_idx *childidx =
			    EXT_FIRST_INDEX(childhdr);

			if (ext4_idx_lblock(idx) != ext4_idx_lblock(childidx)) {
				ext4_idx_store_lblock(
				    idx, ext4_idx_lblock(childidx));
				if (i < rootdepth)
					fs_mark_buffer_dirty(
					    cur->c_paths[i].p_bcb);
				else
					cur->c_cursor_op.c_root_dirty_func(cur);
			} else if (!force)
				break;
		} else {
			struct ext4_extent_idx *idx =
			    EXT_FIRST_INDEX(hdr) + ptr;
			struct ext4_extent *childext =
			    EXT_FIRST_EXTENT(childhdr);

			if (ext4_idx_lblock(idx) != ext4_ext_lblock(childext)) {
				ext4_idx_store_lblock(
				    idx, ext4_ext_lblock(childext));
				if (i < rootdepth)
					fs_mark_buffer_dirty(
					    cur->c_paths[i].p_bcb);
				else
					cur->c_cursor_op.c_root_dirty_func(cur);
			} else if (!force)
				break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, -0x2c(%rbp)
movq %rdi, %r14
movq (%rdi), %rax
movzwl 0x6(%rax), %r15d
movslq %esi, %r13
cmpl %r15d, %r13d
movl %r15d, %r12d
cmovgl %r13d, %r12d
leaq (,%r13,2), %rax
addq %r13, %rax
leaq 0x28(,%rax,8), %rbx
cmpq %r13, %r12
je 0x4fde
movq %r13, %rdx
incq %r13
movq 0x30(%r14), %rcx
movl $0x2, %eax
cmpq $0x0, -0x18(%rcx,%rbx)
jne 0x4fd6
movq (%rcx,%rbx), %rax
movq -0x20(%rcx,%rbx), %rsi
movq -0x8(%rcx,%rbx), %rdi
leaq (%rax,%rax,2), %rax
leaq (%rdi,%rax,4), %rax
addq $0xc, %rax
movl (%rax), %edi
movl 0xc(%rsi), %esi
testq %rdx, %rdx
cmpl %esi, %edi
jne 0x4fb2
cmpl $0x0, -0x2c(%rbp)
jne 0x4fcc
movl $0x2, %eax
xorl %ecx, %ecx
jmp 0x4fd0
movl %esi, (%rax)
cmpq %r15, %r13
jge 0x4fc5
movq -0x10(%rcx,%rbx), %rdi
callq 0x2863
jmp 0x4fcc
movq %r14, %rdi
callq *0x18(%r14)
xorl %eax, %eax
movb $0x1, %cl
testb %cl, %cl
je 0x4fd6
xorl %eax, %eax
addq $0x18, %rbx
testl %eax, %eax
je 0x4f61
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_decrement
int
ext4_ext_decrement(struct ext4_ext_cursor *cur, bool *noprevp)
{
	int ret = 0;
	int i;
	int depth;
	ssize_t ptr;
	bool noprev = true;
	int rootdepth;

	rootdepth = ext4_ext_cursor_depth(cur);
	for (i = 0; i <= rootdepth; i++) {
		struct ext4_extent_header *hdr;

		hdr = cur->c_paths[i].p_hdr;
		ptr = cur->c_paths[i].p_ptr;
		if (hdr && ptr && ptr != -1)
			break;
	}
	depth = i;
	if (depth > rootdepth)
		goto out;

	cur->c_paths[depth].p_ptr--;
	ret = ext4_ext_reload_paths(cur, depth, true);
	if (ret)
		goto out;

	noprev = false;
out:
	if (noprevp)
		*noprevp = noprev;
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
movq 0x30(%rdi), %rdx
movzwl 0x6(%rax), %ecx
cmpq $0x0, 0x8(%rdx)
je 0x5267
movq 0x10(%rdx), %rax
decq %rax
cmpq $-0x2, %rax
jae 0x5267
xorl %esi, %esi
xorl %eax, %eax
jmp 0x529b
addq $0x28, %rdx
xorl %eax, %eax
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x52a1
movq %rdx, %r8
incq %rsi
addq $0x18, %rdx
cmpq $0x0, -0x8(%r8)
je 0x526f
movq (%r8), %r8
decq %r8
cmpq $-0x2, %r8
jae 0x526f
leaq -0x1(%rsi), %rax
cmpq %rcx, %rax
setae %al
testb %al, %al
je 0x52a5
xorl %eax, %eax
movb $0x1, %cl
jmp 0x52c3
movq 0x30(%rdi), %rax
movl %esi, %ecx
leaq (%rcx,%rcx,2), %rcx
decq 0x10(%rax,%rcx,8)
movl $0x1, %edx
callq 0x4fed
testl %eax, %eax
setne %cl
testq %rbx, %rbx
je 0x52ca
movb %cl, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_increment
int
ext4_ext_increment(struct ext4_ext_cursor *cur, bool *nonextp)
{
	int ret = 0;
	int i;
	int depth;
	ssize_t ptr;
	bool nonext = true;
	int rootdepth;

	rootdepth = ext4_ext_cursor_depth(cur);
	for (i = 0; i <= rootdepth; i++) {
		struct ext4_extent_header *hdr;

		hdr = cur->c_paths[i].p_hdr;
		ptr = cur->c_paths[i].p_ptr;
		if (hdr && ptr != -1 && ptr < ext4_ext_header_entries(hdr) - 1)
			break;
	}
	depth = i;
	if (depth > rootdepth)
		goto out;

	cur->c_paths[depth].p_ptr++;
	ret = ext4_ext_reload_paths(cur, depth, false);
	if (ret)
		goto out;

	nonext = false;
out:
	if (nonextp)
		*nonextp = nonext;
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
movq 0x30(%rdi), %rcx
movzwl 0x6(%rax), %edx
leaq 0x1(%rdx), %r8
movl $0x10, %eax
xorl %esi, %esi
xorl %r9d, %r9d
movq -0x8(%rcx,%rax), %r11
movq (%rcx,%rax), %r10
testq %r11, %r11
setne %r14b
cmpq $-0x1, %r10
setne %r15b
andb %r14b, %r15b
cmpb $0x1, %r15b
jne 0x5325
movzwl 0x2(%r11), %r11d
decq %r11
cmpq %r11, %r10
jl 0x533e
cmpq %rdx, %rsi
leaq 0x1(%rsi), %r10
setae %r9b
addq $0x18, %rax
movq %r10, %rsi
cmpq %r10, %r8
jne 0x52f7
jmp 0x5344
testb $0x1, %r9b
je 0x535a
xorl %eax, %eax
movb $0x1, %cl
testq %rbx, %rbx
je 0x534f
movb %cl, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%rdi), %rcx
incq (%rcx,%rax)
xorl %edx, %edx
callq 0x4fed
testl %eax, %eax
setne %cl
jmp 0x5348
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/extents.c
// Function: ext4_ext_cursor_reset_rootpath
static int
ext4_ext_cursor_reset_rootpath(struct ext4_ext_cursor *cur)
{
	struct ext4_ext_path *paths;
	int rootdepth;

	rootdepth = ext4_ext_cursor_depth(cur);

	if (rootdepth > cur->c_maxdepth) {
		int nrlevel = cur->c_maxdepth;

		paths = (struct ext4_ext_path *)ext4_malloc(
		    sizeof(struct ext4_ext_path) * (rootdepth + 1));
		if (!paths)
			return ENOMEM;

		memcpy(paths, cur->c_paths,
		       nrlevel * sizeof(struct ext4_ext_path));
		ext4_free(cur->c_paths);
		cur->c_paths = paths;
		cur->c_maxdepth = rootdepth;
	}

	cur->c_paths[rootdepth].p_bcb = NULL;
	cur->c_paths[rootdepth].p_hdr = cur->c_root;
	cur->c_paths[rootdepth].p_ptr = -1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movzwl 0x6(%rax), %r12d
movslq 0x40(%rdi), %r13
cmpl %r12d, %r13d
jge 0x5892
leaq (%r12,%r12,2), %rax
leaq 0x18(,%rax,8), %rdi
callq 0x21c0
testq %rax, %rax
je 0x58c7
movq %rax, %r14
movq 0x30(%rbx), %r15
shlq $0x3, %r13
leaq (,%r13,2), %rdx
addq %r13, %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2180
movq %r15, %rdi
callq 0x2030
movq %r14, 0x30(%rbx)
movl %r12d, 0x40(%rbx)
movq 0x30(%rbx), %rax
movl %r12d, %ecx
leaq (%rcx,%rcx,2), %rcx
movq $0x0, (%rax,%rcx,8)
movq (%rbx), %rdx
movq %rdx, 0x8(%rax,%rcx,8)
movq $-0x1, 0x10(%rax,%rcx,8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xc, %eax
jmp 0x58b8
// File: /workspace/github_c_makefile_star2_O1/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 0x5e0a
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 0x5dbc
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 0x5def
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 0x2863
leaq 0x1faa(%rip), %rdi      # 0x7dbb
leaq 0x1beb(%rip), %rsi      # 0x7a03
leaq 0x1fb9(%rip), %rcx      # 0x7dd8
movl $0x4d0, %edx            # imm = 0x4D0
callq 0x20c0
// File: /workspace/github_c_makefile_star2_O1/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 0x6270
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
cmpl %ecx, %r8d
cmovgl %r8d, %ecx
movl 0xc(%rdx), %r15d
subq %r8, %rcx
incq %rcx
movb $0x1, %r13b
decq %rcx
je 0x6227
movq -0x8(%rax), %r9
movq (%rax), %rdx
movzwl 0x2(%r9), %r8d
decq %r8
cmpq %r8, %rdx
jge 0x621e
leaq (%rdx,%rdx,2), %r10
movl 0x18(%r9,%r10,4), %r15d
xorl %r13d, %r13d
addq $0x18, %rax
cmpq %r8, %rdx
jge 0x61f9
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rax
movq 0x38(%rdi), %rcx
movq %rax, %rdi
callq 0x4377
movq %rax, %r12
testq %rax, %rax
je 0x6252
movq %r12, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x45c1
jmp 0x6257
movl $0xc, %eax
andb $0x1, %r13b
movb %r13b, (%r14)
movq %r12, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b9a(%rip), %rdi      # 0x7e11
leaq 0x1785(%rip), %rsi      # 0x7a03
leaq 0x1b92(%rip), %rcx      # 0x7e17
movl $0x54b, %edx            # imm = 0x54B
callq 0x20c0
// File: /workspace/github_c_makefile_star2_O1/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 $0x48, %rsp
movq %rsi, %r14
movq (%rdi), %rbx
movzwl 0x6(%rbx), %eax
testl %eax, %eax
je 0x62ee
movq %rdi, %r12
movq %rax, %r15
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rdi
movq 0x38(%r12), %rcx
movq %rbx, %rsi
callq 0x4377
testq %rax, %rax
je 0x62fa
xorl %r13d, %r13d
movq %rax, -0x38(%rbp)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x45c1
testl %eax, %eax
je 0x6304
movq -0x38(%rbp), %rdi
jmp 0x63d4
xorl %eax, %eax
xorl %edi, %edi
xorl %r13d, %r13d
jmp 0x63d4
movl $0xc, %eax
jmp 0x63e7
movq %r14, -0x48(%rbp)
movzwl 0x4(%rbx), %eax
movl %eax, -0x3c(%rbp)
movzwl 0x2(%rbx), %ebx
testl %ebx, %ebx
je 0x63c2
decl %r15d
xorl %r13d, %r13d
movq %r15, -0x68(%rbp)
leaq (%r15,%r15,2), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
movq 0x30(%r12), %rax
movq -0x60(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movzwl 0x2(%rax), %eax
movl %eax, -0x38(%rbp)
movq %rdi, %r15
movq -0x68(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0x29(%rbp), %rcx
callq 0x61a8
movl $0x2, %r14d
testl %eax, %eax
je 0x6376
movq %r15, %rdi
addl -0x38(%rbp), %r13d
testl %r14d, %r14d
jne 0x63b1
decl %ebx
jne 0x6331
jmp 0x63c8
cmpb $0x1, -0x29(%rbp)
jne 0x639a
movq -0x50(%rbp), %rdi
movl $0x3, %r14d
testq %rdi, %rdi
je 0x6364
movq %rax, -0x58(%rbp)
callq 0x4592
movq -0x58(%rbp), %rax
jmp 0x6364
movq %r15, %rdi
movq %rax, %r14
callq 0x4592
movq %r14, %rax
xorl %r14d, %r14d
movq -0x50(%rbp), %rdi
jmp 0x6367
cmpl $0x1, %r14d
je 0x63f6
cmpl $0x2, %r14d
jne 0x63c8
xorl %r13d, %r13d
jmp 0x63d0
xorl %eax, %eax
movq -0x38(%rbp), %rdi
cmpl -0x3c(%rbp), %r13d
setle %r13b
movq -0x48(%rbp), %r14
testq %rdi, %rdi
je 0x63e4
movq %rax, %rbx
callq 0x4592
movq %rbx, %rax
movb %r13b, (%r14)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x63e7
// File: /workspace/github_c_makefile_star2_O1/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, %rbx
leaq -0x10080(%rbp), %rdi
callq 0x1050
movl $0x1, %r14d
leaq -0x60(%rbp), %r12
leaq -0x40(%rbp), %r13
movq %rbx, -0x50(%rbp)
cmpq $0x1, %r14
jne 0x197e
leaq -0x10080(%rbp), %rdi
jmp 0x1980
xorl %edi, %edi
leaq 0x4a59(%rip), %rsi      # 0x63e0
callq 0x1190
testq %rax, %rax
je 0x1ab1
movzbl 0xc(%rbx), %esi
movq %rax, %r15
leaq -0x80(%rbp), %rdi
callq 0x20d8
leaq -0x34(%rbp), %rax
movq %rax, (%rsp)
movq %r15, -0x30(%rbp)
movq %r15, %rdi
leaq 0x46cb(%rip), %rsi      # 0x6086
leaq -0x48(%rbp), %r8
leaq -0x68(%rbp), %r15
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r9
xorl %eax, %eax
callq 0x1160
cmpl $0x5, %eax
jne 0x19fa
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movss -0x34(%rbp), %xmm0
movq %rbx, %rdi
callq 0x1b92
jmp 0x1aad
movq -0x30(%rbp), %rdi
leaq 0x4694(%rip), %rsi      # 0x6099
movq %r15, %rdx
movq %r12, %rcx
leaq -0x48(%rbp), %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x1160
cmpl $0x4, %eax
jne 0x1a41
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movss -0x6c(%rbp), %xmm0
movq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x1b92
jmp 0x1a78
movq -0x30(%rbp), %rdi
leaq 0x4646(%rip), %rsi      # 0x6092
leaq -0x58(%rbp), %r13
movq %r13, %rdx
leaq -0x34(%rbp), %rcx
xorl %eax, %eax
callq 0x1160
cmpl $0x2, %eax
movq -0x50(%rbp), %rbx
jne 0x1a7e
movq -0x58(%rbp), %rsi
movss -0x34(%rbp), %xmm0
movq %rbx, %rdi
callq 0x1c05
leaq -0x40(%rbp), %r13
jmp 0x1aad
movq -0x30(%rbp), %rdi
leaq 0x461c(%rip), %rsi      # 0x60a5
movq %r13, %rdx
xorl %eax, %eax
callq 0x1160
cmpl $0x1, %eax
leaq -0x40(%rbp), %r13
jne 0x1ad2
movq -0x58(%rbp), %rsi
movss -0x6c(%rbp), %xmm0
movq %rbx, %rdi
callq 0x1c05
movq -0x30(%rbp), %rax
incq %r14
testq %rax, %rax
jne 0x196f
movq %rbx, %rax
addq $0x10068, %rsp          # imm = 0x10068
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x751f(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x4544(%rip), %rsi      # 0x6027
movq %r14, %rdx
movq -0x30(%rbp), %rcx
xorl %eax, %eax
callq 0x1120
movl $0x1, %edi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O1/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 0x1130
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x1b2b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x74c6(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x4522(%rip), %rsi      # 0x605e
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
movq $-0x1, %rax
jmp 0x1b22
// File: /workspace/github_c_makefile_star2_O1/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 0x2cdc
movq %rax, %r14
cmpq $-0x1, %rax
je 0x1b75
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x747c(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x44ed(%rip), %rsi      # 0x6073
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
jmp 0x1b6d
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rcx, -0x30(%rbp)
movq %rdx, %rbx
movq %rsi, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movl $0x38, %edi
callq 0x1150
movq %rax, %r13
movq %r12, %r14
shlq $0x4, %r14
movq %r14, %rdi
callq 0x1150
movq %rax, %r15
testq %r12, %r12
je 0x1ca4
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x10e0
movq %rbx, 0x10(%r13)
movq -0x30(%rbp), %rax
movq %rax, 0x8(%r13)
movq %r12, 0x18(%r13)
movq %r15, (%r13)
movq -0x38(%rbp), %rax
movq %rax, 0x28(%r13)
movq -0x40(%rbp), %rax
movq %rax, 0x30(%r13)
movq $0x0, 0x20(%r13)
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1150
movq %rax, (%r14)
testq %r13, %r13
je 0x1d2e
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x10e0
testq %r12, %r12
je 0x1d78
xorl %r15d, %r15d
movq %r15, %rax
shlq $0x4, %rax
movq (%rbx,%rax), %r13
testq %r13, %r13
je 0x1d5c
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r14, %rdi
callq 0x1d8e
movq 0x10(%r13), %r13
jmp 0x1d41
incq %r15
cmpq %r12, %r15
jne 0x1d36
movq %rbx, %r14
movq (%r14), %rdi
callq 0x1f05
addq $0x10, %r14
decq %r12
jne 0x1d67
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_O1/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 0x1ddd
movq (%r13), %rsi
movq %r15, %rdi
callq *0x30(%rbx)
testl %eax, %eax
jne 0x1ed6
movq 0x10(%r13), %r13
jmp 0x1dc0
addq %r12, %r14
movl $0x18, %edi
callq 0x1150
movq %rax, %r12
movq %r15, (%rax)
movq -0x30(%rbp), %rax
movq %rax, 0x8(%r12)
movq $0x0, 0x10(%r12)
movq 0x10(%rbx), %r13
movq %r13, %rdi
callq 0x1150
movq %rax, (%r12)
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1140
movq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x1150
movq %rax, 0x8(%r12)
movq %rax, %rdi
movq -0x30(%rbp), %rsi
movq %r15, %rdx
callq 0x1140
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 0x1e6e
cvtsi2ss %rcx, %xmm0
jmp 0x1e83
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
testq %rax, %rax
js 0x1e8f
cvtsi2ss %rax, %xmm1
jmp 0x1ea4
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
ucomiss 0x41fd(%rip), %xmm0     # 0x60ac
jbe 0x1ec7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1ce2
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 0x1140
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 0x1140
// File: /workspace/github_c_makefile_star2_O1/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 0x1f44
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rbx), %r14
cmpq $0x0, 0x8(%rbx)
je 0x1f30
movq (%rbx), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r14, %rbx
testq %r14, %r14
jne 0x1f14
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1f78
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x1f05
incq %r15
addq $0x10, %r14
cmpq 0x18(%rbx), %r15
jb 0x1f5f
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_O1/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 0x1ffb
xorl %r12d, %r12d
movq (%r13), %rsi
movq %r15, %rdi
callq *0x30(%r14)
testl %eax, %eax
jne 0x1fe7
movq 0x10(%r13), %r13
testq %r13, %r13
jne 0x1fcd
jmp 0x1ffb
movq 0x8(%r13), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1140
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_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %r14
movq %rsi, %rdi
callq *0x28(%rbx)
xorl %ecx, %ecx
xorl %edx, %edx
divq 0x18(%rbx)
shlq $0x4, %rdx
leaq (%r14,%rdx), %rax
movq %rax, -0x30(%rbp)
movq (%r14,%rdx), %r12
testq %r12, %r12
je 0x20a0
movq %r12, %r14
movq %rcx, %r13
movq (%r12), %rsi
movq 0x10(%r12), %r12
movq %r15, %rdi
callq *0x30(%rbx)
movq %r14, %rcx
testl %eax, %eax
je 0x2042
leaq 0x10(%r13), %rax
testq %r13, %r13
movq -0x30(%rbp), %rcx
cmoveq %rcx, %rax
movq %r12, (%rax)
testq %r12, %r12
jne 0x207e
movq %r13, 0x8(%rcx)
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x208c
callq 0x1030
movq (%r14), %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
decq 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
incl %eax
movl %eax, 0x4(%rdi)
cmpl 0x8(%rdi), %eax
jbe 0x2161
addl %eax, %eax
movl %eax, 0x8(%rbx)
movq 0x10(%rbx), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x1170
movq %rax, 0x10(%rbx)
movq 0x10(%rbx), %rcx
movl 0x4(%rbx), %eax
decl %eax
leaq (%rax,%rax,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_O1/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), %esi
incl %esi
movl %esi, (%r12)
cmpl 0x4(%r12), %esi
jbe 0x21e0
addl %esi, %esi
movl %esi, 0x4(%r12)
movq 0x10(%r12), %rdi
shlq $0x4, %rsi
movss %xmm0, -0x24(%rbp)
callq 0x1170
movss -0x24(%rbp), %xmm0
movq %rax, 0x10(%r12)
movq 0x10(%r12), %rcx
movl (%r12), %eax
decl %eax
movq %rax, %rdx
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