// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/utils/blanced_binary_tree/test/test_blanced_binary_tree.c
// Function: main
int main() {
    mp_init(1 << 16, mp_exit);
    avl_tree *at = at_init(compare);
    at_add(at, num_init(3), sizeof(int));
    at_add(at, num_init(2), sizeof(int));
    at_add(at, num_init(5), sizeof(int));
    at_add(at, num_init(7), sizeof(int));
    at_add(at, num_init(1), sizeof(int));
    at_add(at, num_init(4), sizeof(int));
    at_add(at, num_init(9), sizeof(int));
    at_add(at, num_init(6), sizeof(int));
    at_add(at, num_init(1), sizeof(int));
    at_add(at, num_init(1), sizeof(int));
    at_add(at, num_init(8), sizeof(int));
    at_add(at, num_init(1), sizeof(int));
    at_add(at, num_init(1), sizeof(int));
    at_add(at, num_init(2), sizeof(int));
    at_add(at, num_init(1), sizeof(int));
    at_add(at, num_init(1), sizeof(int));
    at_add(at, num_init(1), sizeof(int));
    at_add(at, num_init(1), sizeof(int));
    at_add(at, num_init(1), sizeof(int));
    at_add(at, num_init(1), sizeof(int));

    at_print(at);

    boolean pass = T;

    if (at_search(at, (void *)num_init(10)) == T) {
        print_ok("search 10 ok\n");
    } else {
        print_err("search 10 error\n");
        pass = F;
    }
    if (at_search(at, (void *)num_init(100)) == F) {
        print_ok("search 100 ok\n");
    } else {
        print_err("search 100 error\n");
        pass = F;
    }
    if (at_search(at, (void *)num_init(1)) == T) {
        print_ok("search 1 ok\n");
    } else {
        print_err("search 1 error\n");
        pass = F;
    }

    if (pass) {
        print_ok("All testcases passed.\n");
    } else {
        print_err("Error!\n");
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq -0x826(%rip), %rsi      # 0x125c
movl $0x10000, %edi          # imm = 0x10000
callq 0x1267
leaq -0x43(%rip), %rdi       # 0x1a50
callq 0x1544
movq %rax, %rbx
movl $0x4, %edi
callq 0x149c
movl $0x3, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl $0x2, %r14d
movl %r14d, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl $0x5, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl $0x7, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl $0x1, %ebp
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl $0x4, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl $0x9, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl $0x6, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl $0x8, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %r14d, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movl $0x4, %edi
callq 0x149c
movl %ebp, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x157b
movq %rbx, %rdi
callq 0x1590
leaq 0x471(%rip), %rax       # 0x2174
movl (%rax), %ebp
movl $0x4, %edi
callq 0x149c
movl $0xa, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x155f
cmpl %ebp, %eax
jne 0x1d37
leaq 0x451(%rip), %rdi       # 0x217c
xorl %eax, %eax
callq 0x198d
movl %ebp, %r14d
jmp 0x1d4f
leaq 0x44c(%rip), %rdi       # 0x218a
xorl %eax, %eax
callq 0x10a0
leaq 0x42c(%rip), %rax       # 0x2178
movl (%rax), %r14d
movl $0x4, %edi
callq 0x149c
movl $0x64, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x155f
leaq 0x407(%rip), %rcx       # 0x2178
movl (%rcx), %r15d
cmpl %r15d, %eax
jne 0x1d89
leaq 0x41b(%rip), %rdi       # 0x219b
xorl %eax, %eax
callq 0x198d
jmp 0x1d9a
leaq 0x41a(%rip), %rdi       # 0x21aa
xorl %eax, %eax
callq 0x10a0
movl %r15d, %r14d
movl $0x4, %edi
callq 0x149c
movl $0x1, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x155f
cmpl %ebp, %eax
jne 0x1dc9
leaq 0x3fc(%rip), %rdi       # 0x21bc
xorl %eax, %eax
callq 0x198d
jmp 0x1dda
leaq 0x3f9(%rip), %rdi       # 0x21c9
xorl %eax, %eax
callq 0x10a0
movl %r15d, %r14d
testl %r14d, %r14d
je 0x1def
leaq 0x3f3(%rip), %rdi       # 0x21d9
xorl %eax, %eax
callq 0x198d
jmp 0x1dfd
leaq 0x3fa(%rip), %rdi       # 0x21f0
xorl %eax, %eax
callq 0x10a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq