// File: /workspace/github_c_makefile_star2_O0/CarlosLunaMota[P]BinaryTrees/main.c
// Function: main
int main () {

    // Test size:
    int max_size = 1001;//131063;// = 2^17 - 9, which is prime.

    // Timer:
    clock_t timer;

    // Init the random seed:
    srand(time(NULL));

    // BS_Testing:
    timer = clock();
    if      (bs_tree_sequential_test(max_size) == FAIL)      { printf("bs_tree_sequential_test FAILS\n\n"); }
    else if (bs_tree_fast_sequential_test(max_size) == FAIL) { printf("bs_tree_fast_sequential_test FAILS\n\n"); }
    else if (bs_tree_random_test(max_size) == FAIL)          { printf("bs_tree_random_test FAILS\n\n"); }
    else if (bs_tree_set_test(max_size) == FAIL)             { printf("bs_tree_set_test FAILS\n\n"); }
    else { printf("\nALL BS_TESTS PASSING in %.2f sec\n\n", ((double) (clock() - timer)) / CLOCKS_PER_SEC); }

    // RB_Testing:
    timer = clock();
    if      (rb_tree_sequential_test(max_size) == FAIL)      { printf("rb_tree_sequential_test FAILS\n\n"); }
    else if (rb_tree_fast_sequential_test(max_size) == FAIL) { printf("rb_tree_fast_sequential_test FAILS\n\n"); }
    else if (rb_tree_random_test(max_size) == FAIL)          { printf("rb_tree_random_test FAILS\n\n"); }
    else if (rb_tree_set_test(max_size) == FAIL)             { printf("rb_tree_set_test FAILS\n\n"); }
    else { printf("\nALL RB_TESTS PASSING in %.2f sec\n\n", ((double) (clock() - timer)) / CLOCKS_PER_SEC); }

    // SP_Testing:
    timer = clock();
    if      (sp_tree_sequential_test(max_size) == FAIL)      { printf("sp_tree_sequential_test FAILS\n\n"); }
    else if (sp_tree_fast_sequential_test(max_size) == FAIL) { printf("sp_tree_fast_sequential_test FAILS\n\n"); }
    else if (sp_tree_random_test(max_size) == FAIL)          { printf("sp_tree_random_test FAILS\n\n"); }
    else if (sp_tree_set_test(max_size) == FAIL)             { printf("sp_tree_set_test FAILS\n\n"); }
    else { printf("\nALL SP_TESTS PASSING in %.2f sec\n\n", ((double) (clock() - timer)) / CLOCKS_PER_SEC); }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl $0x3e9, -0x8(%rbp)      # imm = 0x3E9
xorl %eax, %eax
movl %eax, %edi
callq 0x1090
movl %eax, %edi
callq 0x1070
callq 0x1030
movq %rax, -0x10(%rbp)
movl -0x8(%rbp), %edi
callq 0x1270
cmpl $0x1, %eax
jne 0xc3cf
leaq 0x9c52(%rip), %rdi      # 0x16015
movb $0x0, %al
callq 0x1050
jmp 0xc454
movl -0x8(%rbp), %edi
callq 0x1c50
cmpl $0x1, %eax
jne 0xc3ec
leaq 0x9c52(%rip), %rdi      # 0x16035
movb $0x0, %al
callq 0x1050
jmp 0xc452
movl -0x8(%rbp), %edi
callq 0x2760
cmpl $0x1, %eax
jne 0xc409
leaq 0x9c5a(%rip), %rdi      # 0x1605a
movb $0x0, %al
callq 0x1050
jmp 0xc450
movl -0x8(%rbp), %edi
callq 0x2bc0
cmpl $0x1, %eax
jne 0xc426
leaq 0x9c59(%rip), %rdi      # 0x16076
movb $0x0, %al
callq 0x1050
jmp 0xc44e
callq 0x1030
subq -0x10(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x9bcc(%rip), %xmm1     # 0x16008
divsd %xmm1, %xmm0
leaq 0x9c48(%rip), %rdi      # 0x1608f
movb $0x1, %al
callq 0x1050
jmp 0xc450
jmp 0xc452
jmp 0xc454
callq 0x1030
movq %rax, -0x10(%rbp)
movl -0x8(%rbp), %edi
callq 0x4d70
cmpl $0x1, %eax
jne 0xc47d
leaq 0x9c42(%rip), %rdi      # 0x160b3
movb $0x0, %al
callq 0x1050
jmp 0xc502
movl -0x8(%rbp), %edi
callq 0x5750
cmpl $0x1, %eax
jne 0xc49a
leaq 0x9c42(%rip), %rdi      # 0x160d3
movb $0x0, %al
callq 0x1050
jmp 0xc500
movl -0x8(%rbp), %edi
callq 0x6260
cmpl $0x1, %eax
jne 0xc4b7
leaq 0x9c4a(%rip), %rdi      # 0x160f8
movb $0x0, %al
callq 0x1050
jmp 0xc4fe
movl -0x8(%rbp), %edi
callq 0x66c0
cmpl $0x1, %eax
jne 0xc4d4
leaq 0x9c49(%rip), %rdi      # 0x16114
movb $0x0, %al
callq 0x1050
jmp 0xc4fc
callq 0x1030
subq -0x10(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x9b1e(%rip), %xmm1     # 0x16008
divsd %xmm1, %xmm0
leaq 0x9c38(%rip), %rdi      # 0x1612d
movb $0x1, %al
callq 0x1050
jmp 0xc4fe
jmp 0xc500
jmp 0xc502
callq 0x1030
movq %rax, -0x10(%rbp)
movl -0x8(%rbp), %edi
callq 0x8870
cmpl $0x1, %eax
jne 0xc52b
leaq 0x9c32(%rip), %rdi      # 0x16151
movb $0x0, %al
callq 0x1050
jmp 0xc5b0
movl -0x8(%rbp), %edi
callq 0x9250
cmpl $0x1, %eax
jne 0xc548
leaq 0x9c32(%rip), %rdi      # 0x16171
movb $0x0, %al
callq 0x1050
jmp 0xc5ae
movl -0x8(%rbp), %edi
callq 0x9d60
cmpl $0x1, %eax
jne 0xc565
leaq 0x9c3a(%rip), %rdi      # 0x16196
movb $0x0, %al
callq 0x1050
jmp 0xc5ac
movl -0x8(%rbp), %edi
callq 0xa1d0
cmpl $0x1, %eax
jne 0xc582
leaq 0x9c39(%rip), %rdi      # 0x161b2
movb $0x0, %al
callq 0x1050
jmp 0xc5aa
callq 0x1030
subq -0x10(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x9a70(%rip), %xmm1     # 0x16008
divsd %xmm1, %xmm0
leaq 0x9c28(%rip), %rdi      # 0x161cb
movb $0x1, %al
callq 0x1050
jmp 0xc5ac
jmp 0xc5ae
jmp 0xc5b0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)