// File: /workspace/github_c_makefile_star2_O3/ukontainer[P]sqlite-bench/main.c
// Function: main
int main(int argc, char** argv) {
  init();

  char* default_db_path = malloc(sizeof(char) * 1024);
  strcpy(default_db_path, "./");

  for (int i = 1; i < argc; i++) {
    double d;
    int n;
    char junk;
    if (starts_with(argv[i], "--benchmarks=")) {
      FLAGS_benchmarks = argv[i] + strlen("--benchmarks=");
    } else if (sscanf(argv[i], "--histogram=%d%c", &n, &junk) == 1 &&
               (n == 0 || n == 1)) {
      FLAGS_histogram = n;
    } else if (sscanf(argv[i], "--raw=%d%c", &n, &junk) == 1 &&
               (n == 0 || n == 1)) {
      FLAGS_raw = n;
    } else if (sscanf(argv[i], "--compression_ratio=%lf%c", &d, &junk) == 1) {
      FLAGS_compression_ratio = d;
    } else if (sscanf(argv[i], "--use_existing_db=%d%c", &n, &junk) == 1 &&
               (n == 0 || n == 1)) {
      FLAGS_use_existing_db = n;
    } else if (sscanf(argv[i], "--num=%d%c", &n, &junk) == 1) {
      FLAGS_num = n;
    } else if (sscanf(argv[i], "--reads=%d%c", &n, &junk) == 1) {
      FLAGS_reads = n;
    } else if (sscanf(argv[i], "--value_size=%d%c", &n, &junk) == 1) {
      FLAGS_value_size = n;
    } else if (!strcmp(argv[i], "--no_transaction")) {
      FLAGS_transaction = false;
    } else if (sscanf(argv[i], "--page_size=%d%c", &n, &junk) == 1) {
      FLAGS_page_size = n;
    } else if (sscanf(argv[i], "--num_pages=%d%c", &n, &junk) == 1) {
      FLAGS_num_pages = n;
    } else if (sscanf(argv[i], "--WAL_enabled=%d%c", &n, &junk) == 1 &&
               (n == 0 || n == 1)) {
      FLAGS_WAL_enabled = n;
    } else if (strncmp(argv[i], "--db=", 5) == 0) {
      FLAGS_db = argv[i] + 5;
    } else if (!strcmp(argv[i], "--help")) {
      print_usage(argv[0]);
      exit(0);
    } else {
      fprintf(stderr, "Invalid flag '%s'\n", argv[i]);
      exit(1);
    }
  }

  /* Choose a location for the test database if none given with --db=<path>  */
  if (FLAGS_db == NULL)
      FLAGS_db = default_db_path;

  benchmark_init();
  benchmark_run();
  benchmark_fini();

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x146d8c(%rip), %rax    # 0x54aa8d
movq %rax, 0x1a0b38(%rip)    # 0x5a4840
movl $0xf4240, 0x1a0b36(%rip) # imm = 0xF4240
movl $0xffffffff, 0x1a0b30(%rip) # imm = 0xFFFFFFFF
movl $0x64, 0x1a0b2a(%rip)   # 0x5a4850
xorl %r14d, %r14d
movb %r14b, 0x1a0b24(%rip)   # 0x5a4854
movb %r14b, 0x1a0b1e(%rip)   # 0x5a4855
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, 0x1a0b10(%rip)    # 0x5a4858
movl $0x400, 0x1a0b0e(%rip)  # imm = 0x400
movl $0x1000, 0x1a0b08(%rip) # imm = 0x1000
movb %r14b, 0x1a0b05(%rip)   # 0x5a4868
movb $0x1, %al
movb %al, 0x1a0afe(%rip)     # 0x5a4869
movb %al, 0x1a0af9(%rip)     # 0x5a486a
movq $0x0, 0x1a0af4(%rip) # 0x5a4870
movl $0x400, %edi            # imm = 0x400
callq 0x4a7390
movb %r14b, 0x2(%rax)
movw $0x2f2e, (%rax)         # imm = 0x2F2E
cmpl $0x2, %ebp
jl 0x404012
movq %rax, 0x18(%rsp)
movl %ebp, %r12d
movl $0x1, %r14d
leaq 0x1472e3(%rip), %r15    # 0x54b090
leaq 0x8(%rsp), %r13
leaq 0xf(%rsp), %rbp
movq (%rbx,%r14,8), %rdi
movq %r15, %rsi
callq 0x47c8bb
movq (%rbx,%r14,8), %rdi
testb %al, %al
je 0x403ddb
addq $0xd, %rdi
movq %rdi, 0x1a0a6a(%rip)    # 0x5a4840
jmp 0x403ff7
leaq 0x1472bc(%rip), %rsi    # 0x54b09e
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x486bb0
cmpl $0x1, %eax
jne 0x403e08
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x403e08
movb %al, 0x1a0a51(%rip)     # 0x5a4854
jmp 0x403ff7
movq (%rbx,%r14,8), %rdi
leaq 0x14729c(%rip), %rsi    # 0x54b0af
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x486bb0
cmpl $0x1, %eax
jne 0x403e39
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x403e39
movb %al, 0x1a0a21(%rip)     # 0x5a4855
jmp 0x403ff7
movq (%rbx,%r14,8), %rdi
leaq 0x147276(%rip), %rsi    # 0x54b0ba
leaq 0x20(%rsp), %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x486bb0
cmpl $0x1, %eax
jne 0x403e6b
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x1a09f2(%rip)   # 0x5a4858
jmp 0x403ff7
movq (%rbx,%r14,8), %rdi
leaq 0x14725e(%rip), %rsi    # 0x54b0d4
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x486bb0
cmpl $0x1, %eax
jne 0x403e9c
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x403e9c
movb %al, 0x1a09d1(%rip)     # 0x5a4868
jmp 0x403ff7
movq (%rbx,%r14,8), %rdi
leaq 0x147244(%rip), %rsi    # 0x54b0eb
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x486bb0
cmpl $0x1, %eax
jne 0x403ec8
movl 0x8(%rsp), %eax
movl %eax, 0x1a0985(%rip)    # 0x5a4848
jmp 0x403ff7
movq (%rbx,%r14,8), %rdi
leaq 0x147223(%rip), %rsi    # 0x54b0f6
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x486bb0
cmpl $0x1, %eax
jne 0x403ef4
movl 0x8(%rsp), %eax
movl %eax, 0x1a095d(%rip)    # 0x5a484c
jmp 0x403ff7
movq (%rbx,%r14,8), %rdi
leaq 0x147204(%rip), %rsi    # 0x54b103
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x486bb0
cmpl $0x1, %eax
jne 0x403f20
movl 0x8(%rsp), %eax
movl %eax, 0x1a0935(%rip)    # 0x5a4850
jmp 0x403ff7
movq (%rbx,%r14,8), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x1471e5(%rip), %rsi    # 0x54b115
callq 0x4010c8
testl %eax, %eax
je 0x403f66
movq 0x10(%rsp), %rdi
leaq 0x1471e1(%rip), %rsi    # 0x54b126
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x486bb0
cmpl $0x1, %eax
jne 0x403f72
movl 0x8(%rsp), %eax
movl %eax, 0x1a08ff(%rip)    # 0x5a4860
jmp 0x403ff7
movb $0x0, 0x1a08fc(%rip)    # 0x5a4869
jmp 0x403ff7
movq (%rbx,%r14,8), %rdi
leaq 0x1471ba(%rip), %rsi    # 0x54b137
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x486bb0
cmpl $0x1, %eax
jne 0x403f9b
movl 0x8(%rsp), %eax
movl %eax, 0x1a08cb(%rip)    # 0x5a4864
jmp 0x403ff7
movq (%rbx,%r14,8), %rdi
leaq 0x1471a2(%rip), %rsi    # 0x54b148
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x486bb0
cmpl $0x1, %eax
jne 0x403fc9
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x403fc9
movb %al, 0x1a08a3(%rip)     # 0x5a486a
jmp 0x403ff7
movq (%rbx,%r14,8), %rdi
movl $0x5, %edx
movq %rdi, 0x10(%rsp)
leaq 0x14717d(%rip), %rsi    # 0x54b15b
callq 0x401090
testl %eax, %eax
jne 0x404039
movq 0x10(%rsp), %rax
addq $0x5, %rax
movq %rax, 0x1a0879(%rip)    # 0x5a4870
incq %r14
cmpq %r14, %r12
jne 0x403db7
cmpq $0x0, 0x1a0865(%rip)    # 0x5a4870
movq 0x18(%rsp), %rax
jne 0x404019
movq %rax, 0x1a0857(%rip)    # 0x5a4870
callq 0x402d74
callq 0x401140
callq 0x402e7d
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x147121(%rip), %rsi    # 0x54b161
movq 0x10(%rsp), %rdi
callq 0x4010c8
testl %eax, %eax
jne 0x404056
movq %rbx, %rdi
callq 0x402204
movq 0x10(%rsp), %rdi
callq 0x4021e0