#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct bplus_tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bplus_tree_deinit(struct bplus_tree *);
int /*<<< orphan*/ bplus_tree_get_range(struct bplus_tree *, int, int);
struct bplus_tree *bplus_tree_init(char *, int);
int /*<<< orphan*/ exec_file(char *, struct bplus_tree *);
int /*<<< orphan*/ show_running_info();
int main(void) {
  struct bplus_tree *tree = bplus_tree_init("/tmp/coverage.index", 512);
  exec_file("testcase", tree);
  show_running_info();
  bplus_tree_get_range(tree, 10000, 100000);
  bplus_tree_get_range(tree, 100000, 10000);
  bplus_tree_deinit(tree);
  tree = bplus_tree_init("/tmp/coverage.index", 128);
  bplus_tree_deinit(tree);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
mov    $0x200,%esi
call   1040 <bplus_tree_init@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1030 <exec_file@plt>
mov    $0x0,%al
call   1060 <show_running_info@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2710,%esi
mov    $0x186a0,%edx
call   1050 <bplus_tree_get_range@plt>
mov    -0x10(%rbp),%rdi
mov    $0x186a0,%esi
mov    $0x2710,%edx
call   1050 <bplus_tree_get_range@plt>
mov    -0x10(%rbp),%rdi
call   1070 <bplus_tree_deinit@plt>
lea    0xe3f(%rip),%rdi
mov    $0x80,%esi
call   1040 <bplus_tree_init@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <bplus_tree_deinit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xea5(%rip),%r14
mov    %r14,%rdi
mov    $0x200,%esi
call   1040 <bplus_tree_init@plt>
mov    %rax,%rbx
lea    0xea2(%rip),%rdi
mov    %rax,%rsi
call   1030 <exec_file@plt>
xor    %eax,%eax
call   1060 <show_running_info@plt>
mov    %rbx,%rdi
mov    $0x2710,%esi
mov    $0x186a0,%edx
call   1050 <bplus_tree_get_range@plt>
mov    %rbx,%rdi
mov    $0x186a0,%esi
mov    $0x2710,%edx
call   1050 <bplus_tree_get_range@plt>
mov    %rbx,%rdi
call   1070 <bplus_tree_deinit@plt>
mov    %r14,%rdi
mov    $0x80,%esi
call   1040 <bplus_tree_init@plt>
mov    %rax,%rdi
call   1070 <bplus_tree_deinit@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.bplus_tree = type { i32 }
@.str = [20 x i8] c"/tmp/coverage.index\00"
@.str.1 = [9 x i8] c"testcase\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.bplus_tree*
store i32 0, i32* %1
%3 = call %struct.bplus_tree* @bplus_tree_init(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 512)
store %struct.bplus_tree* %3, %struct.bplus_tree** %2
%4 = load %struct.bplus_tree*, %struct.bplus_tree** %2
%5 = call i32 @exec_file(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), %struct.bplus_tree* %4)
%6 = call i32 (...) @show_running_info()
%7 = load %struct.bplus_tree*, %struct.bplus_tree** %2
%8 = call i32 @bplus_tree_get_range(%struct.bplus_tree* %7, i32 10000, i32 100000)
%9 = load %struct.bplus_tree*, %struct.bplus_tree** %2
%10 = call i32 @bplus_tree_get_range(%struct.bplus_tree* %9, i32 100000, i32 10000)
%11 = load %struct.bplus_tree*, %struct.bplus_tree** %2
%12 = call i32 @bplus_tree_deinit(%struct.bplus_tree* %11)
%13 = call %struct.bplus_tree* @bplus_tree_init(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 128)
store %struct.bplus_tree* %13, %struct.bplus_tree** %2
%14 = load %struct.bplus_tree*, %struct.bplus_tree** %2
%15 = call i32 @bplus_tree_deinit(%struct.bplus_tree* %14)
ret i32 0
}

LLVM IR (-O2):
%struct.bplus_tree = type { i32 }
@.str = [20 x i8] c"/tmp/coverage.index\00"
@.str.1 = [9 x i8] c"testcase\00"
define i32 @main() {
%1 = tail call %struct.bplus_tree* @bplus_tree_init(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 512)
%2 = tail call i32 @exec_file(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), %struct.bplus_tree* %1)
%3 = tail call i32 (...) @show_running_info()
%4 = tail call i32 @bplus_tree_get_range(%struct.bplus_tree* %1, i32 10000, i32 100000)
%5 = tail call i32 @bplus_tree_get_range(%struct.bplus_tree* %1, i32 100000, i32 10000)
%6 = tail call i32 @bplus_tree_deinit(%struct.bplus_tree* %1)
%7 = tail call %struct.bplus_tree* @bplus_tree_init(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 128)
%8 = tail call i32 @bplus_tree_deinit(%struct.bplus_tree* %7)
ret i32 0
}