int test_jnxbtree() {
  jnx_log(0,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/"
          "unit/test_jnxbtree.c",
          __FUNCTION__, 1170, "Running B-tree tests...\n");
  ;
  test_new_node();
  test_new_empty_tree();
  test_insert_first_record_into_tree();
  test_insert_records_into_leaf_root();
  test_growing_to_depth_of_2();
  test_spliting_a_leaf_node_that_is_not_root();
  test_growing_to_depth_of_3();
  test_splitting_inner_node();
  test_alphabet_tree();
  test_lookup_in_empty_tree();
  test_lookup_in_single_record_tree();
  test_lookup_in_leaf_root();
  test_lookup_in_tree_of_depth_3();
  test_lookup_does_not_modify_tree();
  test_removing_key_from_empty_tree();
  test_removing_record_from_single_record_tree();
  test_removing_record_from_leaf_root();
  test_simple_remove_from_leaf();
  test_removing_record_from_inner_node();
  test_removing_key_from_child_that_has_too_few_records();
  test_removing_key_from_root();
  test_tree_level_1_add_and_remove();
  jnx_log(0,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/"
          "unit/test_jnxbtree.c",
          __FUNCTION__, 1201, "B-tree tests completed.\n");
  ;
  return 0;
}


x86 assembly (clang, -O0):
<test_jnxbtree>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xd83(%rip),%rsi
lea    0xe15(%rip),%rdx
mov    $0x492,%ecx
lea    0xe17(%rip),%r8
mov    $0x0,%al
call   1090 <jnx_log@plt>
mov    $0x0,%al
call   1040 <test_new_node@plt>
mov    $0x0,%al
call   1160 <test_new_empty_tree@plt>
mov    $0x0,%al
call   1180 <test_insert_first_record_into_tree@plt>
mov    $0x0,%al
call   1070 <test_insert_records_into_leaf_root@plt>
mov    $0x0,%al
call   1130 <test_growing_to_depth_of_2@plt>
mov    $0x0,%al
call   1110 <test_spliting_a_leaf_node_that_is_not_root@plt>
mov    $0x0,%al
call   1060 <test_growing_to_depth_of_3@plt>
mov    $0x0,%al
call   1050 <test_splitting_inner_node@plt>
mov    $0x0,%al
call   1150 <test_alphabet_tree@plt>
mov    $0x0,%al
call   10d0 <test_lookup_in_empty_tree@plt>
mov    $0x0,%al
call   1030 <test_lookup_in_single_record_tree@plt>
mov    $0x0,%al
call   10c0 <test_lookup_in_leaf_root@plt>
mov    $0x0,%al
call   10b0 <test_lookup_in_tree_of_depth_3@plt>
mov    $0x0,%al
call   1140 <test_lookup_does_not_modify_tree@plt>
mov    $0x0,%al
call   10f0 <test_removing_key_from_empty_tree@plt>
mov    $0x0,%al
call   1100 <test_removing_record_from_single_record_tree@plt>
mov    $0x0,%al
call   1170 <test_removing_record_from_leaf_root@plt>
mov    $0x0,%al
call   10e0 <test_simple_remove_from_leaf@plt>
mov    $0x0,%al
call   1190 <test_removing_record_from_inner_node@plt>
mov    $0x0,%al
call   1080 <test_removing_key_from_child_that_has_too_few_records@plt>
mov    $0x0,%al
call   10a0 <test_removing_key_from_root@plt>
mov    $0x0,%al
call   1120 <test_tree_level_1_add_and_remove@plt>
xor    %edi,%edi
lea    0xcc6(%rip),%rsi
lea    0xd58(%rip),%rdx
mov    $0x4b1,%ecx
lea    0xd73(%rip),%r8
mov    $0x0,%al
call   1090 <jnx_log@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_jnxbtree>:
push   %r14
push   %rbx
push   %rax
lea    0xd85(%rip),%rbx
lea    0xe17(%rip),%r14
lea    0xe1e(%rip),%r8
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x492,%ecx
xor    %eax,%eax
call   1090 <jnx_log@plt>
xor    %eax,%eax
call   1040 <test_new_node@plt>
xor    %eax,%eax
call   1160 <test_new_empty_tree@plt>
xor    %eax,%eax
call   1180 <test_insert_first_record_into_tree@plt>
xor    %eax,%eax
call   1070 <test_insert_records_into_leaf_root@plt>
xor    %eax,%eax
call   1130 <test_growing_to_depth_of_2@plt>
xor    %eax,%eax
call   1110 <test_spliting_a_leaf_node_that_is_not_root@plt>
xor    %eax,%eax
call   1060 <test_growing_to_depth_of_3@plt>
xor    %eax,%eax
call   1050 <test_splitting_inner_node@plt>
xor    %eax,%eax
call   1150 <test_alphabet_tree@plt>
xor    %eax,%eax
call   10d0 <test_lookup_in_empty_tree@plt>
xor    %eax,%eax
call   1030 <test_lookup_in_single_record_tree@plt>
xor    %eax,%eax
call   10c0 <test_lookup_in_leaf_root@plt>
xor    %eax,%eax
call   10b0 <test_lookup_in_tree_of_depth_3@plt>
xor    %eax,%eax
call   1140 <test_lookup_does_not_modify_tree@plt>
xor    %eax,%eax
call   10f0 <test_removing_key_from_empty_tree@plt>
xor    %eax,%eax
call   1100 <test_removing_record_from_single_record_tree@plt>
xor    %eax,%eax
call   1170 <test_removing_record_from_leaf_root@plt>
xor    %eax,%eax
call   10e0 <test_simple_remove_from_leaf@plt>
xor    %eax,%eax
call   1190 <test_removing_record_from_inner_node@plt>
xor    %eax,%eax
call   1080 <test_removing_key_from_child_that_has_too_few_records@plt>
xor    %eax,%eax
call   10a0 <test_removing_key_from_root@plt>
xor    %eax,%eax
call   1120 <test_tree_level_1_add_and_remove@plt>
lea    0xd82(%rip),%r8
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x4b1,%ecx
xor    %eax,%eax
call   1090 <jnx_log@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/unit/test_jnxbtree.c\00"
@__FUNCTION__.test_jnxbtree = [14 x i8] c"test_jnxbtree\00"
@.str.1 = [25 x i8] c"Running B-tree tests...\0A\00"
@.str.2 = [25 x i8] c"B-tree tests completed.\0A\00"
define i32 @test_jnxbtree() {
%1 = call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @jnx_log to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.test_jnxbtree, i64 0, i64 0), i32 1170, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (...) @test_new_node()
%3 = call i32 (...) @test_new_empty_tree()
%4 = call i32 (...) @test_insert_first_record_into_tree()
%5 = call i32 (...) @test_insert_records_into_leaf_root()
%6 = call i32 (...) @test_growing_to_depth_of_2()
%7 = call i32 (...) @test_spliting_a_leaf_node_that_is_not_root()
%8 = call i32 (...) @test_growing_to_depth_of_3()
%9 = call i32 (...) @test_splitting_inner_node()
%10 = call i32 (...) @test_alphabet_tree()
%11 = call i32 (...) @test_lookup_in_empty_tree()
%12 = call i32 (...) @test_lookup_in_single_record_tree()
%13 = call i32 (...) @test_lookup_in_leaf_root()
%14 = call i32 (...) @test_lookup_in_tree_of_depth_3()
%15 = call i32 (...) @test_lookup_does_not_modify_tree()
%16 = call i32 (...) @test_removing_key_from_empty_tree()
%17 = call i32 (...) @test_removing_record_from_single_record_tree()
%18 = call i32 (...) @test_removing_record_from_leaf_root()
%19 = call i32 (...) @test_simple_remove_from_leaf()
%20 = call i32 (...) @test_removing_record_from_inner_node()
%21 = call i32 (...) @test_removing_key_from_child_that_has_too_few_records()
%22 = call i32 (...) @test_removing_key_from_root()
%23 = call i32 (...) @test_tree_level_1_add_and_remove()
%24 = call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @jnx_log to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.test_jnxbtree, i64 0, i64 0), i32 1201, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/unit/test_jnxbtree.c\00"
@__FUNCTION__.test_jnxbtree = [14 x i8] c"test_jnxbtree\00"
@.str.1 = [25 x i8] c"Running B-tree tests...\0A\00"
@.str.2 = [25 x i8] c"B-tree tests completed.\0A\00"
define i32 @test_jnxbtree() {
%1 = tail call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @jnx_log to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.test_jnxbtree, i64 0, i64 0), i32 1170, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @test_new_node()
%3 = tail call i32 (...) @test_new_empty_tree()
%4 = tail call i32 (...) @test_insert_first_record_into_tree()
%5 = tail call i32 (...) @test_insert_records_into_leaf_root()
%6 = tail call i32 (...) @test_growing_to_depth_of_2()
%7 = tail call i32 (...) @test_spliting_a_leaf_node_that_is_not_root()
%8 = tail call i32 (...) @test_growing_to_depth_of_3()
%9 = tail call i32 (...) @test_splitting_inner_node()
%10 = tail call i32 (...) @test_alphabet_tree()
%11 = tail call i32 (...) @test_lookup_in_empty_tree()
%12 = tail call i32 (...) @test_lookup_in_single_record_tree()
%13 = tail call i32 (...) @test_lookup_in_leaf_root()
%14 = tail call i32 (...) @test_lookup_in_tree_of_depth_3()
%15 = tail call i32 (...) @test_lookup_does_not_modify_tree()
%16 = tail call i32 (...) @test_removing_key_from_empty_tree()
%17 = tail call i32 (...) @test_removing_record_from_single_record_tree()
%18 = tail call i32 (...) @test_removing_record_from_leaf_root()
%19 = tail call i32 (...) @test_simple_remove_from_leaf()
%20 = tail call i32 (...) @test_removing_record_from_inner_node()
%21 = tail call i32 (...) @test_removing_key_from_child_that_has_too_few_records()
%22 = tail call i32 (...) @test_removing_key_from_root()
%23 = tail call i32 (...) @test_tree_level_1_add_and_remove()
%24 = tail call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @jnx_log to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.test_jnxbtree, i64 0, i64 0), i32 1201, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}