// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xd0, %rsp
movl $0x0, -0x4(%rbp)
movl $0x10000, %edi          # imm = 0x10000
leaq -0xd6e(%rip), %rsi      # 0x1190
callq 0x11a0
leaq -0xba(%rip), %rdi       # 0x1e50
callq 0x1580
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl $0x3, %edi
callq 0x1eb0
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl $0x2, %edi
callq 0x1eb0
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl $0x5, %edi
callq 0x1eb0
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl $0x7, %edi
callq 0x1eb0
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movl $0x4, %edi
callq 0x1eb0
movq -0x98(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x9, %edi
callq 0x1eb0
movq -0x90(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x6, %edi
callq 0x1eb0
movq -0x88(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0x80(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0x78(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x8, %edi
callq 0x1eb0
movq -0x70(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x2, %edi
callq 0x1eb0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x1600
movq -0x10(%rbp), %rdi
callq 0x1640
leaq 0xf69(%rip), %rax       # 0x3178
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0xa, %edi
callq 0x1eb0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x15c0
leaq 0xf3f(%rip), %rcx       # 0x3178
cmpl (%rcx), %eax
jne 0x224d
leaq 0xf3c(%rip), %rdi       # 0x3180
movb $0x0, %al
callq 0x1d90
jmp 0x2267
leaq 0xf3a(%rip), %rdi       # 0x318e
movb $0x0, %al
callq 0x1cd0
leaq 0xf1a(%rip), %rax       # 0x317c
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl $0x64, %edi
callq 0x1eb0
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0x15c0
leaq 0xeea(%rip), %rcx       # 0x317c
cmpl (%rcx), %eax
jne 0x22a6
leaq 0xf02(%rip), %rdi       # 0x319f
movb $0x0, %al
callq 0x1d90
jmp 0x22c0
leaq 0xf01(%rip), %rdi       # 0x31ae
movb $0x0, %al
callq 0x1cd0
leaq 0xec1(%rip), %rax       # 0x317c
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl $0x1, %edi
callq 0x1eb0
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
callq 0x15c0
leaq 0xe8d(%rip), %rcx       # 0x3178
cmpl (%rcx), %eax
jne 0x22ff
leaq 0xeca(%rip), %rdi       # 0x31c0
movb $0x0, %al
callq 0x1d90
jmp 0x2319
leaq 0xec7(%rip), %rdi       # 0x31cd
movb $0x0, %al
callq 0x1cd0
leaq 0xe68(%rip), %rax       # 0x317c
movl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x232f
leaq 0xeb7(%rip), %rdi       # 0x31dd
movb $0x0, %al
callq 0x1d90
jmp 0x233d
leaq 0xebe(%rip), %rdi       # 0x31f4
movb $0x0, %al
callq 0x1cd0
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbp
retq