LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/trim.c
// Function: lt_ue_rev
int lt_ue_rev(int l1, const char *s1, const char *q1, int l2, const char *s2, const char *q2, int max_pen, int min_len, int max_pos, uint64_t *pos)
{
	int i, n = 0;
	for (i = min_len; i <= l1; ++i) {
		int l;
		l = lt_ue_rev1(i, s1, q1, l2, s2, q2, min_len, max_pen);
		if (l >= min_len && (l == i || l == l2)) {
			pos[n++] = (uint64_t)(l1 - i) << 32 | l;
			if (n == max_pos) return n;
		}
	}
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl 0x68(%rsp), %r15d
xorl %ebx, %ebx
cmpl %edi, %r15d
jg 0x302a
movl %ecx, %ebp
movl %edi, %r13d
movl %edi, %r12d
incl %r13d
shlq $0x20, %r12
movq %r15, %rax
shlq $0x20, %rax
subq %rax, %r12
xorl %ebx, %ebx
movl %r15d, %r14d
movl %r14d, %edi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movl %ebp, %ecx
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
movl 0x60(%rsp), %eax
pushq %rax
pushq %r15
callq 0x2d4e
addq $0x10, %rsp
movb $0x1, %cl
cmpl %r15d, %eax
jl 0x300b
cmpl %eax, %r14d
setne %dl
cmpl %ebp, %eax
setne %sil
testb %sil, %dl
jne 0x300b
cltq
orq %r12, %rax
movslq %ebx, %rcx
incl %ebx
movq 0x78(%rsp), %rdx
movq %rax, (%rdx,%rcx,8)
cmpl 0x70(%rsp), %ebx
setne %cl
movl 0x4(%rsp), %eax
cmovel %ebx, %eax
movl %eax, 0x4(%rsp)
testb %cl, %cl
je 0x3026
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %r12
incl %r14d
cmpl %r14d, %r13d
jne 0x2fa5
jmp 0x302a
movl 0x4(%rsp), %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/trim.c
// Function: lt_ue_contained
int lt_ue_contained(int l1, const char *s1, const char *q1, int l2, const char *s2, const char *q2, int max_pen, int max_pos, uint64_t *pos)
{
	int i, n = 0;
	for (i = 1; i < l2 - l1; ++i) {
		int l;
		l = lt_ue_for1(l1, s1, q1, l2 - i, s2 + i, q2 + i, l1, max_pen);
		if (l == l1) {
			pos[n++] = (uint64_t)i << 32 | l;
			if (n == max_pos) return n;
		}
	}
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %ecx, %eax
subl %edi, %eax
movl $0x0, (%rsp)
cmpl $0x2, %eax
jl 0x310f
movq %r9, %rbx
movq %r8, %r14
movl %ecx, %ebp
movl %edi, %r13d
movabsq $0x100000000, %r15      # imm = 0x100000000
movl %eax, %r12d
decl %ebp
incq %rbx
incq %r14
decq %r12
movl $0x0, (%rsp)
movl %r13d, %edi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movl %ebp, %ecx
movq %r14, %r8
movq %rbx, %r9
movl 0x50(%rsp), %eax
pushq %rax
pushq %r13
callq 0x2c93
addq $0x10, %rsp
movb $0x1, %cl
cmpl %r13d, %eax
jne 0x30e8
cltq
orq %r15, %rax
movl (%rsp), %esi
movslq %esi, %rcx
incl %esi
movq 0x60(%rsp), %rdx
movq %rax, (%rdx,%rcx,8)
cmpl 0x58(%rsp), %esi
setne %cl
movl %esi, (%rsp)
movl 0x4(%rsp), %eax
cmovel %esi, %eax
movl %eax, 0x4(%rsp)
testb %cl, %cl
je 0x3108
decl %ebp
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r15
incq %rbx
incq %r14
decq %r12
jne 0x3091
jmp 0x310f
movl 0x4(%rsp), %eax
movl %eax, (%rsp)
movl (%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/print/print.c
// Function: print_err
int print_err(char *fmt, ...) {
    va_list args;
    va_start(args, fmt);
    begin(RED);
    int ret = vfprintf(stderr, fmt, args);
    end();
    va_end(args);
    return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x1291
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
leaq 0x2f70(%rip), %rdi      # 0x4228
xorl %eax, %eax
callq 0x10b0
movq 0x5d32(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11a0
movl %eax, %ebx
leaq 0x2f83(%rip), %rdi      # 0x4260
xorl %eax, %eax
callq 0x10b0
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/ac_automaton/ac_automaton.c
// Function: ac_init
ac_automaton *ac_init() {
    ac_automaton *ac = mp_new(sizeof(ac_automaton));
    ac->root = ac_tree_node_init('\0');
    ac->match = ac->root;
    return ac;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x18, %edi
callq 0x2788
movq %rax, %rbx
movl $0x20, %edi
callq 0x2788
movq %rax, %r14
movl $0x800, %edi            # imm = 0x800
callq 0x2788
movq %rax, (%r14)
leaq 0x2c31(%rip), %rcx      # 0x40bc
movl (%rcx), %ecx
movl %ecx, 0x18(%r14)
movl $0x0, 0x1c(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movl $0x800, %edx            # imm = 0x800
movq %rax, %rdi
xorl %esi, %esi
callq 0x10c0
movq %r14, (%rbx)
movq %r14, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/ac_automaton/ac_automaton.c
// Function: ac_tree_node_init
ac_tree_node *ac_tree_node_init(char value) {
    ac_tree_node *actn = mp_new(sizeof(ac_tree_node));
    actn->children = mp_new(256 * sizeof(ac_tree_node *));
    actn->is_pattern_end = F;
    // actn->value = value;
    actn->failed = NULL;
    actn->next = NULL;
    actn->match_number = 0;
    memset(actn->children, 0, 256 * sizeof(ac_tree_node *));
    return actn;
}

// Assembly:
pushq %rbx
movl $0x20, %edi
callq 0x2788
movq %rax, %rbx
movl $0x800, %edi            # imm = 0x800
callq 0x2788
movq %rax, (%rbx)
leaq 0x2bd8(%rip), %rcx      # 0x40bc
movl (%rcx), %ecx
movl %ecx, 0x18(%rbx)
movl $0x0, 0x1c(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movl $0x800, %edx            # imm = 0x800
movq %rax, %rdi
xorl %esi, %esi
callq 0x10c0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/ac_automaton/ac_automaton.c
// Function: ac_tree_node_add
ac_tree_node *ac_tree_node_add(ac_tree_node *actn, char *s) {
    int idx = char2int(*s);
    if (compare_char('\0', *(s)) == 0) {
        return actn;
    }
    if (actn->children[idx] == NULL) {
        actn->children[idx] = ac_tree_node_init(*s);
    }
    if (compare_char('\0', *(s + 1)) == 0) {
        actn->children[idx]->is_pattern_end = T;
        return actn->children[idx];
    }
    return ac_tree_node_add(actn->children[idx], s + 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
incq %r14
leaq 0x2b90(%rip), %r12      # 0x40bc
movsbl -0x1(%r14), %r15d
xorl %edi, %edi
movl %r15d, %esi
callq 0x245c
testl %eax, %eax
je 0x15d7
leal 0x100(%r15), %eax
testb %r15b, %r15b
cmovgl %r15d, %eax
movq (%rbx), %rcx
movslq %eax, %r13
cmpq $0x0, (%rcx,%r13,8)
jne 0x15a6
movl $0x20, %edi
callq 0x2788
movq %rax, %r15
movl $0x800, %edi            # imm = 0x800
callq 0x2788
movq %rax, (%r15)
movl (%r12), %ecx
movl %ecx, 0x18(%r15)
movl $0x0, 0x1c(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
movl $0x800, %edx            # imm = 0x800
movq %rax, %rdi
xorl %esi, %esi
callq 0x10c0
movq (%rbx), %rax
movq %r15, (%rax,%r13,8)
movsbl (%r14), %esi
xorl %edi, %edi
callq 0x245c
testl %eax, %eax
je 0x15c4
movq (%rbx), %rax
movq (%rax,%r13,8), %rbx
incq %r14
jmp 0x152c
leaq 0x2aed(%rip), %rax      # 0x40b8
movl (%rax), %eax
movq (%rbx), %rcx
movq (%rcx,%r13,8), %rbx
movl %eax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/ac_automaton/ac_automaton.c
// Function: ac_build
void ac_build(ac_automaton *ac) {
    ac->root->failed = ac->root;
    ac->root->next = ac->root;
    ac->queue = lk_init();

    lk_add(ac->queue, ac->root);

    while (!lk_empty(ac->queue)) {
        ac_tree_node *parent = ac->queue->head->value;
        lk_remove(ac->queue, ac->queue->head);

        for (int i = 0; i < 256; ++i) {
            ac_tree_node *child = parent->children[i];
            if (child != NULL) {
                lk_add(ac->queue, child);

                ac_tree_node *ptr = parent->failed;
                while (
                    (ptr->children[i] == NULL || ptr->children[i] == child) &&
                    ptr != ac->root) {
                    ptr = ptr->failed;
                }
                if (ptr->children[i] != NULL && ptr->children[i] != child) {
                    child->failed = ptr->children[i];
                } else {
                    child->failed = ptr;
                }

                if (child->failed->is_pattern_end == T) {
                    child->next = child->failed;
                } else {
                    child->next = child->failed->next;
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq %rax, 0x8(%rax)
movq %rax, 0x10(%rax)
xorl %eax, %eax
callq 0x2a54
movq %rax, 0x8(%rbx)
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x2aa2
movq 0x8(%rbx), %rdi
callq 0x2b07
testl %eax, %eax
jne 0x16b0
leaq 0x2a90(%rip), %rax      # 0x40b8
movl (%rax), %ebp
movq 0x8(%rbx), %rdi
movq (%rdi), %rsi
movq (%rsi), %r15
callq 0x2b1b
xorl %r12d, %r12d
movq (%r15), %rax
movq (%rax,%r12,8), %r14
testq %r14, %r14
je 0x1693
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x2aa2
movq %r15, %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rax
movq (%rax,%r12,8), %rax
testq %rax, %rax
sete %sil
cmpq %r14, %rax
sete %dl
orb %sil, %dl
cmpb $0x1, %dl
jne 0x1682
cmpq (%rbx), %rcx
jne 0x1657
testb %dl, %dl
cmovneq %rcx, %rax
movq %rax, 0x8(%r14)
cmpl %ebp, 0x18(%rax)
je 0x168f
movq 0x10(%rax), %rax
movq %rax, 0x10(%r14)
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x163c
movq 0x8(%rbx), %rdi
callq 0x2b07
testl %eax, %eax
je 0x162a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/ac_automaton/ac_automaton.c
// Function: ac_match_char
void ac_match_char(ac_automaton *ac, char c) {
    int idx = char2int(c);
    ++compare_number;
    while (ac->match->children[idx] == NULL && ac->match != ac->root) {
        ac->match = ac->match->failed;
        ++compare_number;
    }
    if (ac->match->children[idx] != NULL) {
        ac->match = ac->match->children[idx];
        ac_tree_node *p = ac->match;
        while (p != ac->root) {
            ++p->match_number;
            p = p->next;
            ++compare_number;
        }
    }
}

// Assembly:
leal 0x100(%rsi), %eax
testb %sil, %sil
cmovgl %esi, %eax
movslq %eax, %rsi
leaq 0x5aa1(%rip), %rax      # 0x7170
movq (%rax), %rdx
movq 0x10(%rdi), %r8
incq %rdx
movq (%r8), %rcx
movq (%rcx,%rsi,8), %rcx
testq %rcx, %rcx
sete %r10b
je 0x170e
movq %rdx, (%rax)
movq %rcx, 0x10(%rdi)
movq (%rdi), %rdx
cmpq %rdx, %rcx
je 0x170d
movq (%rax), %rsi
incl 0x1c(%rcx)
movq 0x10(%rcx), %rcx
incq %rsi
cmpq %rdx, %rcx
jne 0x16fb
movq %rsi, (%rax)
retq
movq (%rdi), %r9
cmpq %r9, %r8
je 0x1733
movq 0x8(%r8), %r8
movq %r8, 0x10(%rdi)
incq %rdx
movq (%r8), %rcx
movq (%rcx,%rsi,8), %rcx
testq %rcx, %rcx
sete %r10b
je 0x1711
jmp 0x16e9
movq %rdx, (%rax)
testb %r10b, %r10b
je 0x16ec
jmp 0x170d
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/ac_automaton/ac_automaton.c
// Function: ac_tree_node_print
void ac_tree_node_print(ac_tree_node *actn, ac_tree_node *parent, int value) {
    if (actn != NULL) {
        printf("%1c %3d (%p) failed->%p parent=%p\n", value, value, actn,
               actn->failed, parent);
        for (int i = 0; i < 256; ++i) {
            ac_tree_node_print(actn->children[i], actn, i);
        }
    }
}

// Assembly:
testq %rdi, %rdi
je 0x1797
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r9
movq %rdi, %rbx
movq 0x8(%rdi), %r8
leaq 0x28bd(%rip), %rdi      # 0x4020
xorl %r14d, %r14d
movl %edx, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10b0
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x1749
incq %r14
cmpq $0x100, %r14            # imm = 0x100
jne 0x1772
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bits/bits.c
// Function: bits_init
bits *bits_init() {
    ++_bits_num;
    _bits_mem += sizeof(bits);

    bits *b = mp_new(sizeof(bits));
    b->value = NULL;
    b->start = 0;
    b->end = 0;
    return b;
}

// Assembly:
pushq %rax
incl 0x59a5(%rip)            # 0x7144
addl $0x10, 0x59a2(%rip)     # 0x7148
movl $0x10, %edi
callq 0x2788
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bits/bits.c
// Function: bits_init_with_minimum_bytes
bits *bits_init_with_minimum_bytes(void *value, int start, int end) {
    bits *b = bits_init();
    int   start_byte = start / 8;
    int   end_byte = end / 8 + (end % 8 ? 1 : 0);
    b->value = mp_new(end_byte - start_byte);
    b->start = start - start_byte * 8;
    b->end = end - start_byte * 8;
    memcpy(b->value, value + start_byte, end_byte - start_byte);

    _bits_string_mem += end_byte - start_byte;
    ++_bits_string_num;

    return b;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r12d
incl 0x5975(%rip)            # 0x7144
movq %rdi, (%rsp)
addl $0x10, 0x596e(%rip)     # 0x7148
movl $0x10, %edi
callq 0x2788
movq %rax, %rbx
xorps %xmm0, %xmm0
leal 0x7(%r12), %r13d
testl %r12d, %r12d
cmovnsl %r12d, %r13d
movl %r13d, %r15d
sarl $0x3, %r15d
leal 0x7(%r14), %ebp
testl %r14d, %r14d
cmovnsl %r14d, %ebp
movups %xmm0, (%rax)
sarl $0x3, %ebp
movl %r14d, %eax
andl $0x7, %eax
subl %r15d, %ebp
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movl %ebp, %edi
callq 0x2788
movq %rax, (%rbx)
andl $-0x8, %r13d
subl %r13d, %r12d
movl %r12d, 0x8(%rbx)
subl %r13d, %r14d
movl %r14d, 0xc(%rbx)
movslq %r15d, %rsi
addq (%rsp), %rsi
movslq %ebp, %r14
movq %rax, %rdi
movq %r14, %rdx
callq 0x1130
addl %r14d, 0x58eb(%rip)     # 0x7140
incl 0x58e1(%rip)            # 0x713c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bits/bits.c
// Function: bits_init_with_minimum_bits
bits *bits_init_with_minimum_bits(bits *b, int start, int end) {
    bits *bb = bits_init();
    int   start_byte = start / 8;
    int   end_byte = end / 8 + (end % 8 ? 1 : 0);
    bb->value = mp_new(end_byte - start_byte);
    bb->start = start - start_byte * 8;
    bb->end = end - start_byte * 8;
    memcpy(bb->value, b->value + start_byte, end_byte - start_byte);

    _bits_string_mem += end_byte - start_byte;
    ++_bits_string_num;

    return bb;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r12d
incl 0x58c0(%rip)            # 0x7144
movq %rdi, (%rsp)
addl $0x10, 0x58b9(%rip)     # 0x7148
movl $0x10, %edi
callq 0x2788
movq %rax, %rbx
xorps %xmm0, %xmm0
leal 0x7(%r12), %r13d
testl %r12d, %r12d
cmovnsl %r12d, %r13d
movl %r13d, %r15d
sarl $0x3, %r15d
leal 0x7(%r14), %ebp
testl %r14d, %r14d
cmovnsl %r14d, %ebp
movups %xmm0, (%rax)
sarl $0x3, %ebp
movl %r14d, %eax
andl $0x7, %eax
subl %r15d, %ebp
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movl %ebp, %edi
callq 0x2788
movq %rax, (%rbx)
andl $-0x8, %r13d
subl %r13d, %r12d
movl %r12d, 0x8(%rbx)
subl %r13d, %r14d
movl %r14d, 0xc(%rbx)
movslq %r15d, %rsi
movq (%rsp), %rcx
addq (%rcx), %rsi
movslq %ebp, %r14
movq %rax, %rdi
movq %r14, %rdx
callq 0x1130
addl %r14d, 0x5833(%rip)     # 0x7140
incl 0x5829(%rip)            # 0x713c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bits/bits.c
// Function: bits_sub
bits *bits_sub(bits *b, int start, int end) {
    if (end + b->start >= b->end || start + b->start >= b->end) {
        print_err("bits overflow in bits_sub()\n");
        exit(1);
    }
    bits *bb = bits_init();
    bb->value = b->value;
    bb->start = b->start + start;
    bb->end = b->start + end;
    return bb;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl 0x8(%rdi), %eax
movl 0xc(%rdi), %ecx
leal (%rax,%rbx), %edx
cmpl %ecx, %edx
jge 0x1979
movl %esi, %ebp
addl %esi, %eax
cmpl %ecx, %eax
jge 0x1979
movq %rdi, %r14
incl 0x57fb(%rip)            # 0x7144
addl $0x10, 0x57f8(%rip)     # 0x7148
movl $0x10, %edi
callq 0x2788
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq (%r14), %rcx
movq %rcx, (%rax)
addl 0x8(%r14), %ebp
movl %ebp, 0x8(%rax)
addl 0x8(%r14), %ebx
movl %ebx, 0xc(%rax)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x26c3(%rip), %rdi      # 0x4043
xorl %eax, %eax
callq 0x1230
movl $0x1, %edi
callq 0x11c0
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bits/bits.c
// Function: bits_get
int bits_get(bits *b, int pos) {
    pos += b->start;
    if (pos >= b->end || pos < 0) {
        print_err("bits overflow in bits_get()\n");
        exit(1);
    }
    return (b->value[pos >> 3] >> (pos & 7)) & 1;
}

// Assembly:
addl 0x8(%rdi), %esi
cmpl 0xc(%rdi), %esi
jge 0x19b5
testl %esi, %esi
js 0x19b5
movq (%rdi), %rax
movl %esi, %ecx
shrl $0x3, %ecx
movsbl (%rax,%rcx), %ecx
andl $0x7, %esi
xorl %eax, %eax
btl %esi, %ecx
setb %al
retq
pushq %rax
leaq 0x26a3(%rip), %rdi      # 0x4060
xorl %eax, %eax
callq 0x1230
movl $0x1, %edi
callq 0x11c0
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bits/bits.c
// Function: bits_prefix
int bits_prefix(bits *b1, bits *b2, int group_length) {
    int l1 = bits_len(b1);
    int l2 = bits_len(b2);
    int lmin = l1 < l2 ? l1 : l2;
    int prefix = 0;
    for (int i = 0; i < lmin; i += group_length) {
        int group_match = 0;
        for (int j = i; j - i < group_length && j < lmin; ++j) {
            if (bits_get(b1, j) == bits_get(b2, j)) {
                ++group_match;
            } else {
                break;
            }
        }
        if (group_match == group_length) {
            prefix += group_match;
        } else {
            break;
        }
    }
    return prefix;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0xc(%rdi), %eax
movq %rdi, 0x10(%rsp)
subl 0x8(%rdi), %eax
movl 0xc(%rsi), %ecx
movq %rsi, 0x8(%rsp)
subl 0x8(%rsi), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movl %ecx, (%rsp)
testl %ecx, %ecx
jle 0x1a7a
movl %edx, %ebx
xorl %r14d, %r14d
movl $0x1, %r15d
xorl %eax, %eax
movl %eax, 0x4(%rsp)
movl $0x0, %ebp
testl %ebx, %ebx
jle 0x1a56
xorl %ebp, %ebp
leal (%r14,%rbp), %r12d
movq 0x10(%rsp), %rdi
movl %r12d, %esi
callq 0x1991
movl %eax, %r13d
movq 0x8(%rsp), %rdi
movl %r12d, %esi
callq 0x1991
cmpl %eax, %r13d
jne 0x1a56
leal (%r15,%rbp), %eax
incl %ebp
cmpl (%rsp), %eax
jge 0x1a56
cmpl %ebx, %ebp
jl 0x1a21
cmpl %ebx, %ebp
movl $0x0, %eax
cmovel %ebp, %eax
movl 0x4(%rsp), %ecx
addl %eax, %ecx
movl %ecx, %eax
cmpl %ebx, %ebp
jne 0x1a7c
addl %ebx, %r14d
addl %ebx, %r15d
cmpl (%rsp), %r14d
jl 0x1a12
jmp 0x1a7c
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/blanced_binary_tree/avl_tree.c
// Function: at_init
avl_tree *at_init(compare_function compare) {
    avl_tree *at = mp_new(sizeof(avl_tree));
    at->root = NULL;
    at->compare = compare;
    return at;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x10, %edi
callq 0x2788
movq $0x0, (%rax)
movq %rbx, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/blanced_binary_tree/tree_node.c
// Function: avl_tn_init
avl_tree_node *avl_tn_init(void *value, int size) {
    ++_avl_tree_node_number;

    char *s = mp_new(size);
    memcpy(s, value, size);
    ++_avl_tree_strnum;
    _avl_tree_strmem += size;

    avl_tree_node *avl_tn = mp_new(sizeof(avl_tree_node));
    _avl_tree_nodemem += sizeof(avl_tree_node);

    avl_tn->value = s;
    // avl_tn->parent = NULL;
    avl_tn->left = NULL;
    avl_tn->right = NULL;
    avl_tn->deep = 1;
    return avl_tn;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
incl 0x5604(%rip)            # 0x714c
movl %esi, %edi
callq 0x2788
movq %rax, %r15
movslq %ebx, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1130
incl 0x55ef(%rip)            # 0x7158
addl %ebx, 0x55e1(%rip)      # 0x7150
movl $0x20, %edi
callq 0x2788
addl $0x20, 0x55d4(%rip)     # 0x7154
movq %r15, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movl $0x1, 0x18(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/blanced_binary_tree/tree_node.c
// Function: avl_tn_search
avl_tree_node *avl_tn_search(avl_tree_node *avl_tn, void *value,
                             compare_function compare) {
    if (avl_tn == NULL) {
        return NULL;
    }
    ++compare_number;

    int res = compare(avl_tn->value, value);
    if (res == 0) {
        return avl_tn;
    } else if (res > 0) {
        return avl_tn_search(avl_tn->left, value, compare);
    } else {
        return avl_tn_search(avl_tn->right, value, compare);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x55c1(%rip), %r12      # 0x7170
testq %rbx, %rbx
je 0x1bd2
incq (%r12)
movq (%rbx), %rdi
movq %r15, %rsi
callq *%r14
testl %eax, %eax
je 0x1bd4
setle %al
movzbl %al, %eax
movq 0x8(%rbx,%rax,8), %rbx
jmp 0x1baf
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/blanced_binary_tree/tree_node.c
// Function: avl_tn_add
avl_tree_node *avl_tn_add(avl_tree_node *avl_tn, void *value, int size,
                          compare_function compare) {
    if (avl_tn == NULL) {
        return avl_tn_init(value, size);
    }
    int res = compare(avl_tn->value, value);
    if (res > 0) {
        avl_tn->left = avl_tn_add(avl_tn->left, value, size, compare);
        // avl_tn->left->parent = avl_tn;
    } else if (res < 0) {
        avl_tn->right = avl_tn_add(avl_tn->right, value, size, compare);
        // avl_tn->right->parent = avl_tn;
    } else {
        // same value do nothing
        return avl_tn;
    }

    int l = avl_tn->left ? avl_tn->left->deep : 0;
    int r = avl_tn->right ? avl_tn->right->deep : 0;
    if (abs(l - r) <= 1) {
        avl_tn->deep = (l > r ? l : r) + 1;
    } else {
        if (l - r > 1) {
            return avl_tn_right(avl_tn);
        } else {
            return avl_tn_left(avl_tn);
        }
    }

    return avl_tn;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
testq %rdi, %rdi
je 0x1c5d
movq %rcx, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
movq %r15, %rsi
callq *%rcx
movl $0x8, %r12d
testl %eax, %eax
jle 0x1c84
movq (%rbx,%r12), %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0x1be3
movq %rax, (%rbx,%r12)
movq 0x8(%rbx), %rdx
xorl %eax, %eax
movl $0x0, %ecx
testq %rdx, %rdx
je 0x1c35
movl 0x18(%rdx), %ecx
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x1c41
movl 0x18(%rdx), %eax
movl %ecx, %edx
subl %eax, %edx
movl %edx, %esi
negl %esi
cmovsl %edx, %esi
cmpl $0x1, %esi
ja 0x1c6f
cmpl %eax, %ecx
cmovgl %ecx, %eax
incl %eax
movl %eax, 0x18(%rbx)
jmp 0x1c86
movq %r15, %rdi
movl %ebp, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1b38
movq %rbx, %rdi
cmpl $0x2, %edx
jl 0x1c92
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1caa
js 0x1c9f
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1d3f
movl $0x10, %r12d
jmp 0x1c0d
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/blanced_binary_tree/tree_node.c
// Function: avl_tn_right
avl_tree_node *avl_tn_right(avl_tree_node *avl_tn) {
    // printf("%s r\n", (char *)avl_tn->value);
    avl_tree_node *a = avl_tn;
    avl_tree_node *b = a->left;
    avl_tree_node *c = b->right;

    avl_tree_node *root = b;
    // b->parent = a->parent;

    b->right = a;
    // a->parent = b;

    a->left = c;
    // if (c)
    // c->parent = a;

    avl_tn_update_deep(c);
    avl_tn_update_deep(a);
    avl_tn_update_deep(b);

    return root;
}

// Assembly:
movq 0x8(%rdi), %rax
movq 0x10(%rax), %rcx
movq %rdi, 0x10(%rax)
movq %rcx, 0x8(%rdi)
testq %rcx, %rcx
je 0x1cea
movq 0x8(%rcx), %r8
xorl %edx, %edx
movl $0x0, %esi
testq %r8, %r8
je 0x1cd3
movl 0x18(%r8), %esi
movq 0x10(%rcx), %r8
testq %r8, %r8
je 0x1ce0
movl 0x18(%r8), %edx
cmpl %edx, %esi
cmovgl %esi, %edx
incl %edx
movl %edx, 0x18(%rcx)
testq %rdi, %rdi
je 0x1d14
xorl %edx, %edx
movl $0x0, %esi
testq %rcx, %rcx
je 0x1cfe
movl 0x18(%rcx), %esi
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x1d0a
movl 0x18(%rcx), %edx
cmpl %edx, %esi
cmovgl %esi, %edx
incl %edx
movl %edx, 0x18(%rdi)
testq %rax, %rax
je 0x1d3e
movq 0x8(%rax), %rsi
xorl %ecx, %ecx
movl $0x0, %edx
testq %rsi, %rsi
je 0x1d2c
movl 0x18(%rsi), %edx
testq %rdi, %rdi
je 0x1d34
movl 0x18(%rdi), %ecx
cmpl %ecx, %edx
cmovgl %edx, %ecx
incl %ecx
movl %ecx, 0x18(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/blanced_binary_tree/tree_node.c
// Function: avl_tn_left
avl_tree_node *avl_tn_left(avl_tree_node *avl_tn) {
    // printf("%s l\n", (char *)avl_tn->value);
    avl_tree_node *a = avl_tn;
    avl_tree_node *b = a->right;
    avl_tree_node *c = b->left;

    avl_tree_node *root = b;
    // b->parent = a->parent;

    b->left = a;
    // a->parent = b;

    a->right = c;
    // if (c)
    // c->parent = a;

    avl_tn_update_deep(c);
    avl_tn_update_deep(a);
    avl_tn_update_deep(b);

    return root;
}

// Assembly:
movq 0x10(%rdi), %rax
movq 0x8(%rax), %rcx
movq %rdi, 0x8(%rax)
movq %rcx, 0x10(%rdi)
testq %rcx, %rcx
je 0x1d7f
movq 0x8(%rcx), %r8
xorl %edx, %edx
movl $0x0, %esi
testq %r8, %r8
je 0x1d68
movl 0x18(%r8), %esi
movq 0x10(%rcx), %r8
testq %r8, %r8
je 0x1d75
movl 0x18(%r8), %edx
cmpl %edx, %esi
cmovgl %esi, %edx
incl %edx
movl %edx, 0x18(%rcx)
testq %rdi, %rdi
je 0x1daa
movq 0x8(%rdi), %r8
xorl %edx, %edx
movl $0x0, %esi
testq %r8, %r8
je 0x1d98
movl 0x18(%r8), %esi
testq %rcx, %rcx
je 0x1da0
movl 0x18(%rcx), %edx
cmpl %edx, %esi
cmovgl %esi, %edx
incl %edx
movl %edx, 0x18(%rdi)
testq %rax, %rax
je 0x1dd4
xorl %ecx, %ecx
movl $0x0, %edx
testq %rdi, %rdi
je 0x1dbe
movl 0x18(%rdi), %edx
movq 0x10(%rax), %rsi
testq %rsi, %rsi
je 0x1dca
movl 0x18(%rsi), %ecx
cmpl %ecx, %edx
cmovgl %edx, %ecx
incl %ecx
movl %ecx, 0x18(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/blanced_binary_tree/tree_node.c
// Function: avl_tn_print
char *avl_tn_print(avl_tree_node *avl_tn) {
    if (avl_tn == NULL) {
        return "NULL";
    } else {
        char *t = (char *)(avl_tn->value);
        char *l = avl_tn_print(avl_tn->left);
        char *r = avl_tn_print(avl_tn->right);
        printf("    %s(%d)\n    ↙    ↘\n%s    %s\n\n", t, avl_tn->deep, l, r);
        return t;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1e17
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %rdi
callq 0x1dd5
movq %rax, %r15
movq 0x10(%r14), %rdi
callq 0x1dd5
movl 0x18(%r14), %edx
leaq 0x228b(%rip), %rdi      # 0x4090
movq %rbx, %rsi
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x10b0
jmp 0x1e1e
leaq 0x226d(%rip), %rbx      # 0x408b
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/blanced_binary_tree/tree_node.c
// Function: avl_tn_update_deep
void avl_tn_update_deep(avl_tree_node *avl_tn) {
    if (avl_tn != NULL) {
        int l = avl_tn->left ? avl_tn->left->deep : 0;
        int r = avl_tn->right ? avl_tn->right->deep : 0;
        avl_tn->deep = (l > r ? l : r) + 1;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x1e55
movq 0x8(%rdi), %rdx
xorl %eax, %eax
movl $0x0, %ecx
testq %rdx, %rdx
je 0x1e3f
movl 0x18(%rdx), %ecx
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0x1e4b
movl 0x18(%rdx), %eax
cmpl %eax, %ecx
cmovgl %ecx, %eax
incl %eax
movl %eax, 0x18(%rdi)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bplus_tree/bplus_tree.c
// Function: bpt_init
bplus_tree *bpt_init(int m, compare_function compare) {
    bplus_tree *bpt = mp_new(sizeof(bplus_tree));
    bpt->m = m;
    bpt->root = NULL;
    bpt->compare = compare;
    return bpt;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x18, %edi
callq 0x2788
movl %ebp, (%rax)
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bplus_tree/bplus_tree.c
// Function: bpt_add
void bpt_add(bplus_tree *bpt, void *value, int size) {
    if (bpt->root == NULL) {
        extern int _bplus_string_mem;
        void *     p = mp_new(size);
        memcpy(p, value, size);
        _bplus_string_mem += size;

        bplus_tree_node *root = bptn_init(bpt->m);
        root->keys[0] = p;
        root->pointers[0] = NULL;

        root->is_leaf = T;
        root->num = 1;

        bpt->root = root;
    } else {
        bplus_tree_node *split_node =
            bptn_add(bpt->root, value, bpt->m, bpt->compare);
        if (split_node != NULL) {
            bplus_tree_node *root = bptn_init(bpt->m);
            root->keys[0] = bptn_get_extremum(bpt->root);
            root->pointers[0] = bpt->root;
            root->keys[1] = bptn_get_extremum(split_node);
            root->pointers[1] = split_node;

            root->is_leaf = F;
            root->num = 2;

            bpt->root = root;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x1efb
movl (%rbx), %edx
movq 0x10(%rbx), %rcx
movq %r14, %rsi
callq 0x21a6
testq %rax, %rax
je 0x1f57
movq %rax, %r15
movl (%rbx), %edi
callq 0x1f88
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x219e
movq 0x8(%r14), %rcx
movq %rax, (%rcx)
movq 0x8(%rbx), %rax
movq 0x10(%r14), %rcx
movq %rax, (%rcx)
movq %r15, %rdi
callq 0x219e
movq 0x8(%r14), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%r14), %rax
movq %r15, 0x8(%rax)
movl $0x2, %eax
leaq 0x21c3(%rip), %rcx      # 0x40bc
jmp 0x1f4a
movl %edx, %ebp
movl %edx, %edi
callq 0x2788
movq %rax, %r15
movslq %ebp, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1130
leaq 0x5245(%rip), %rax      # 0x7164
addl %r12d, (%rax)
movl (%rbx), %edi
callq 0x1f88
movq %rax, %r14
movq 0x8(%rax), %rax
movq %r15, (%rax)
movq 0x10(%r14), %rax
movq $0x0, (%rax)
movl $0x1, %eax
leaq 0x216e(%rip), %rcx      # 0x40b8
movl (%rcx), %ecx
movl %ecx, (%r14)
movl %eax, 0x4(%r14)
movq %r14, 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bplus_tree/bplus_tree_node.c
// Function: bptn_init
bplus_tree_node *bptn_init(int max_length) {
    ++_bplus_node_number;
    bplus_tree_node *bptn = mp_new(sizeof(bplus_tree_node));
    bptn->keys = mp_new(sizeof(void *) * (max_length + 1));
    bptn->pointers = mp_new(sizeof(void *) * (max_length + 1));

    _bplus_node_mem +=
        (sizeof(bplus_tree_node) + sizeof(void *) * (max_length + 1) +
         sizeof(void *) * (max_length + 1));
    memset(bptn->pointers, 0, sizeof(void *) * (max_length + 1));
    bptn->num = 0;
    bptn->is_leaf = T;
    return bptn;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %r14d
incl 0x51c6(%rip)            # 0x715c
movl $0x18, %edi
callq 0x2788
movq %rax, %rbx
movslq %r14d, %rax
shll $0x4, %r14d
leaq 0x8(,%rax,8), %r15
movl %r15d, %edi
callq 0x2788
movq %rax, 0x8(%rbx)
movl %r15d, %edi
callq 0x2788
movq %rax, 0x10(%rbx)
movl 0x5190(%rip), %ecx      # 0x7160
addl %r14d, %ecx
addl $0x28, %ecx
movl %ecx, 0x5184(%rip)      # 0x7160
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x10c0
movl $0x0, 0x4(%rbx)
leaq 0x20c1(%rip), %rax      # 0x40b8
movl (%rax), %eax
movl %eax, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bplus_tree/bplus_tree_node.c
// Function: bptn_add_to_node
int bptn_add_to_node(bplus_tree_node *bptn, void *value,
                     compare_function compare) {
    int i = 0;

    // this value has been inserted
    for (i = 0; i < bptn->num; ++i) {
        if (compare(value, bptn->keys[i]) == 0) {
            return -1;
        }
    }

    for (i = bptn->num; i >= 1; --i) {
        int res = compare(value, bptn->keys[i - 1]);
        if (res > 0) {
            break;
        } else {
            bptn->keys[i] = bptn->keys[i - 1];
            bptn->pointers[i] = bptn->pointers[i - 1];
        }
    }
    bptn->keys[i] = value;
    bptn->pointers[i] = i == bptn->num ? NULL : bptn->pointers[i + 1];
    ++bptn->num;
    return i;
    // printf("unexcepted error: can find a appropriate space to add.\n");
    // exit(1);
    // return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movl 0x4(%rdi), %r14d
testl %r14d, %r14d
jle 0x2048
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
movq (%rax,%r13,8), %rsi
movq %r15, %rdi
callq *%r12
testl %eax, %eax
je 0x20bb
incq %r13
movslq 0x4(%rbx), %r14
cmpq %r14, %r13
jl 0x202a
testl %r14d, %r14d
jle 0x208d
movl %r14d, %r14d
movq 0x8(%rbx), %rax
movq -0x8(%rax,%r14,8), %rsi
movq %r15, %rdi
callq *%r12
testl %eax, %eax
jg 0x208d
movq 0x8(%rbx), %rax
movq -0x8(%rax,%r14,8), %rcx
movq %rcx, (%rax,%r14,8)
movq 0x10(%rbx), %rax
movq -0x8(%rax,%r14,8), %rcx
movq %rcx, (%rax,%r14,8)
decq %r14
leaq 0x1(%r14), %rax
cmpq $0x1, %rax
jg 0x2050
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movslq %r14d, %rcx
movq %r15, (%rax,%rcx,8)
movl 0x4(%rbx), %eax
cmpl %eax, %ecx
jne 0x20a3
xorl %edx, %edx
jmp 0x20ac
movq 0x10(%rbx), %rdx
movq 0x8(%rdx,%rcx,8), %rdx
movq 0x10(%rbx), %rsi
movq %rdx, (%rsi,%rcx,8)
incl %eax
movl %eax, 0x4(%rbx)
jmp 0x20c1
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bplus_tree/bplus_tree_node.c
// Function: bptn_split
bplus_tree_node *bptn_split(bplus_tree_node *bptn, int max_length) {
    if (bptn->num > max_length) {
        // need split
        bplus_tree_node *bptn2 = bptn_init(max_length);
        bptn->num = ((max_length + 1) / 2) + ((max_length + 1) % 2);
        bptn2->num = max_length - bptn->num + 1;

        // move data to the new node
        for (int i = 0; i < bptn2->num; ++i) {
            bptn2->keys[i] = bptn->keys[bptn->num + i];
            bptn2->pointers[i] = bptn->pointers[bptn->num + i];
        }

        return bptn2;
    }
    return NULL;
}

// Assembly:
cmpl %esi, 0x4(%rdi)
jle 0x2145
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, %edi
callq 0x1f88
leal 0x1(%r14), %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %r14d, %ecx
incl %ecx
sarl %ecx
subl %ecx, %edx
movl %edx, 0x4(%rbx)
subl %edx, %r14d
leal 0x1(%r14), %edx
movl %edx, 0x4(%rax)
testl %r14d, %r14d
js 0x213d
negl %ecx
movslq 0x4(%rbx), %rdx
negl %ecx
xorl %esi, %esi
movq 0x8(%rbx), %rdi
movq (%rdi,%rdx,8), %rdi
movq 0x8(%rax), %r8
movq %rdi, (%r8,%rsi,8)
movq 0x10(%rbx), %rdi
movq (%rdi,%rdx,8), %rdi
movq 0x10(%rax), %r8
movq %rdi, (%r8,%rsi,8)
incq %rsi
incq %rdx
cmpq %rsi, %rcx
jne 0x2112
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bplus_tree/bplus_tree_node.c
// Function: bptn_search_index
int bptn_search_index(bplus_tree_node *bptn, void *value,
                      compare_function compare) {
    int i = 0;
    for (i = 0; i < bptn->num; ++i) {
        // find the first bigger value and insert
#ifdef MIN_VALUE
        // keys[i] > value
        if (compare(bptn->keys[i], value) > 0) {
            if (i == 0) {
                return 0;
            }
            return i - 1;
        }
#else
        // keys[i] >= value
        if (compare(bptn->keys[i], value) >= 0) {
            if (i == 0) {
                return 0;
            }
            return i;
        }
#endif
    }
    return bptn->num - 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x4(%rdi), %ebx
testl %ebx, %ebx
jle 0x2184
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ebx, %ebx
movq 0x8(%r12), %rax
movq (%rax,%rbx,8), %rdi
movq %r15, %rsi
callq *%r14
testl %eax, %eax
jg 0x2188
incq %rbx
movslq 0x4(%r12), %rax
cmpq %rax, %rbx
jl 0x2162
movl %eax, %ebx
decl %ebx
jmp 0x2190
xorl %eax, %eax
subl $0x1, %ebx
cmovbl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bplus_tree/bplus_tree_node.c
// Function: bptn_print
void bptn_print(bplus_tree_node *bptn) {
    if (bptn == NULL)
        return;
    printf("Node %p | num %d | leaf %d\n", bptn, bptn->num, bptn->is_leaf);
    for (int i = 0; i < bptn->num; ++i) {
        printf("\t%s(%p)  ", (char *)bptn->keys[i], bptn->pointers[i]);
    }
    printf("\n");
    if (!bptn->is_leaf) {
        for (int i = 0; i < bptn->num; ++i) {
            bptn_print(bptn->pointers[i]);
        }
    }
}

// Assembly:
testq %rdi, %rdi
je 0x2385
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %ecx
movl 0x4(%rdi), %edx
leaq 0x1db1(%rip), %rdi      # 0x40c0
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10b0
cmpl $0x0, 0x4(%rbx)
jle 0x234f
leaq 0x1db6(%rip), %r14      # 0x40dc
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq (%rax,%r15,8), %rsi
movq (%rcx,%r15,8), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x10b0
incq %r15
movslq 0x4(%rbx), %rax
cmpq %rax, %r15
jl 0x2329
movl $0xa, %edi
callq 0x1030
cmpl $0x0, (%rbx)
jne 0x2380
cmpl $0x0, 0x4(%rbx)
jle 0x2380
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x22f2
incq %r14
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jl 0x2367
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/bplus_tree/bplus_tree_node.c
// Function: bptn_exist
boolean bptn_exist(bplus_tree_node *bptn, void *value,
                   compare_function compare) {
    ++compare_number;
    int index = bptn_search_index(bptn, value, compare);
    if (compare(bptn->keys[index], value) == 0) {
        return T;
    } else if (bptn->is_leaf) {
        return F;
    }
    return bptn_exist(bptn->pointers[index], value, compare);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x4dcf(%rip), %r12      # 0x7170
xorl %r13d, %r13d
incq (%r12)
movl 0x4(%r15), %ebp
testl %ebp, %ebp
jle 0x23d1
xorl %ebp, %ebp
movq 0x8(%r15), %rax
movq (%rax,%rbp,8), %rdi
movq %r14, %rsi
callq *%rbx
testl %eax, %eax
jg 0x23d5
incq %rbp
movslq 0x4(%r15), %rax
cmpq %rax, %rbp
jl 0x23b2
movl %eax, %ebp
decl %ebp
jmp 0x23dc
subl $0x1, %ebp
cmovbl %r13d, %ebp
movq 0x8(%r15), %rax
movslq %ebp, %rbp
movq (%rax,%rbp,8), %rdi
movq %r14, %rsi
callq *%rbx
testl %eax, %eax
je 0x2400
cmpl $0x0, (%r15)
jne 0x2409
movq 0x10(%r15), %rax
movq (%rax,%rbp,8), %r15
jmp 0x23a4
leaq 0x1cb1(%rip), %rax      # 0x40b8
jmp 0x2410
leaq 0x1cac(%rip), %rax      # 0x40bc
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/compare/compare.c
// Function: compare_string
int compare_string(char *a, char *b) {
    char *ptr_a = a, *ptr_b = b;
    while (*ptr_a != '\0' && *ptr_b != '\0') {
        int res = compare_char_macro(*ptr_a, *ptr_b);
        if (res != 0) {
            return res;
        }
        ++ptr_a;
        ++ptr_b;
    }
    if (*ptr_a != '\0') {
        return 1;
    } else if (*ptr_b != '\0') {
        return -1;
    } else {
        return 0;
    }
}

// Assembly:
movq 0x4d01(%rip), %rdx      # 0x7170
incq %rdx
xorl %ecx, %ecx
movb (%rdi,%rcx), %r8b
testb %r8b, %r8b
je 0x24b5
cmpb $0x0, (%rsi,%rcx)
je 0x24ab
leaq (%rdx,%rcx), %r8
movq %r8, 0x4ce2(%rip)       # 0x7170
movsbl (%rdi,%rcx), %r8d
movsbl (%rsi,%rcx), %r9d
movl %r8d, %r10d
subl %r9d, %r10d
incq %rcx
cmpb %r9b, %r8b
cmovnel %r10d, %eax
je 0x2474
retq
movl $0x1, %eax
testb %r8b, %r8b
jne 0x24aa
xorl %eax, %eax
cmpb (%rsi,%rcx), %al
sbbl %eax, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/file/file.c
// Function: open_file
FILE *open_file(const char *filename, const char *type) {
    FILE *f = fopen(filename, type);
    if (f == 0) {
        printf("Error: Can not open file %s.", filename);
        exit(1);
    }
    return f;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1180
testq %rax, %rax
je 0x24d0
popq %rbx
retq
leaq 0x1c19(%rip), %rdi      # 0x40f0
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/file/file.c
// Function: read_file
int read_file(FILE *f, char *s) {
    int   length = 0;
    char *ptr = s;
    char  c;

    while (1) {
        c = fgetc(f);
        if (c == EOF) {
            if (ptr == s) {
                return 0;
            } else {
                *(ptr) = '\0';
                return length;
            }
        }
        if (c == '\n') {
            if (ptr == s) {
                // continue;
                *(ptr++) = '\n';
                *(ptr++) = '\0';
                return 1;
            } else {
                *(ptr) = '\0';
                return length;
            }
        }
        *(ptr++) = c;
        ++length;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x10d0
cmpb $0xa, %al
je 0x2521
movzbl %al, %ecx
cmpl $0xff, %ecx
je 0x2518
movb %al, (%r14,%rbx)
incq %rbx
jmp 0x24f8
testq %rbx, %rbx
jne 0x2526
xorl %ebx, %ebx
jmp 0x253f
testq %rbx, %rbx
je 0x252b
addq %rbx, %r14
jmp 0x253b
addq %rbx, %r14
incq %r14
movb $0xa, -0x1(%r14)
movl $0x1, %ebx
movb $0x0, (%r14)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/hash_search/array_search/../../utils/free/free.c
// Function: mp_init
void mp_init(size_type_big max_pool_length, void (*error_callback)()) {
    mp.bucket_number = max_pool_length / (1 << 30) + 1;
    size_type_big left = max_pool_length;

    mp.head = malloc(mp.bucket_number * sizeof(void *));
    mp.length = malloc(mp.bucket_number * sizeof(size_type_small *));
    mp.max_length = malloc(mp.bucket_number * sizeof(size_type_small *));

    for (int i = 0; i < mp.bucket_number; ++i) {
        mp.length[i] = 0;
        if (left < (1 << 30)) {
            mp.head[i] = malloc(left);
            mp.max_length[i] = left;
            break;
        } else {
            mp.head[i] = malloc((1 << 30));
            left -= (1 << 30);
            mp.max_length[i] = (1 << 30);
        }
        if (mp.head[i] == NULL) {
            printf("init error. need " SIZE_TYPE_BIG_FORMAT " bytes\n",
                   max_pool_length);
            error_callback();
        }
    }

    // mp.head = malloc(mp.max_length);
    // mp.length = 0;
    mp.error_callback = error_callback;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, %rax
shrq $0x1e, %rax
incl %eax
movl %eax, 0x4c21(%rip)      # 0x7194
movslq %eax, %r15
shlq $0x3, %r15
movq %r15, %rdi
callq 0x1150
movq %rax, 0x4bef(%rip)      # 0x7178
movq %r15, %rdi
callq 0x1150
movq %rax, 0x4be8(%rip)      # 0x7180
movq %r15, %rdi
callq 0x1150
movq %rax, 0x4be1(%rip)      # 0x7188
cmpl $0x0, 0x4be6(%rip)      # 0x7194
jle 0x2651
leaq 0x1b5d(%rip), %r15      # 0x4118
xorl %r13d, %r13d
movq %r14, %r12
movq %r14, %rbp
movq 0x4bb5(%rip), %rax      # 0x7180
movl $0x0, (%rax,%r13,4)
subq $0x40000000, %rbp       # imm = 0x40000000
jb 0x2633
movl $0x40000000, %edi       # imm = 0x40000000
callq 0x1150
movq 0x4b8b(%rip), %rcx      # 0x7178
movq %rax, (%rcx,%r13,8)
movq 0x4b90(%rip), %rax      # 0x7188
movl $0x40000000, (%rax,%r13,4) # imm = 0x40000000
movq 0x4b71(%rip), %rax      # 0x7178
cmpq $0x0, (%rax,%r13,8)
jne 0x261f
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x10b0
xorl %eax, %eax
callq *%rbx
incq %r13
movslq 0x4b6b(%rip), %rax      # 0x7194
movq %rbp, %r12
cmpq %rax, %r13
jl 0x25c4
jmp 0x2651
movq %r12, %rdi
callq 0x1150
movq 0x4b36(%rip), %rcx      # 0x7178
movq %rax, (%rcx,%r13,8)
movq 0x4b3b(%rip), %rax      # 0x7188
movl %r12d, (%rax,%r13,4)
movq %rbx, 0x4b40(%rip)      # 0x7198
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq