// File: /workspace/github_c_makefile_star2_O1/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 0x146d68(%rip), %rax    # 0x54aa7d
movq %rax, 0x1a0b24(%rip)    # 0x5a4840
movl $0xf4240, 0x1a0b22(%rip) # imm = 0xF4240
movl $0xffffffff, 0x1a0b1c(%rip) # imm = 0xFFFFFFFF
movl $0x64, 0x1a0b16(%rip)   # 0x5a4850
xorl %r14d, %r14d
movb %r14b, 0x1a0b10(%rip)   # 0x5a4854
movb %r14b, 0x1a0b0a(%rip)   # 0x5a4855
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, 0x1a0afc(%rip)    # 0x5a4858
movl $0x400, 0x1a0afa(%rip)  # imm = 0x400
movl $0x1000, 0x1a0af4(%rip) # imm = 0x1000
movb %r14b, 0x1a0af1(%rip)   # 0x5a4868
movb $0x1, %al
movb %al, 0x1a0aea(%rip)     # 0x5a4869
movb %al, 0x1a0ae5(%rip)     # 0x5a486a
movq $0x0, 0x1a0ae0(%rip) # 0x5a4870
movl $0x400, %edi            # imm = 0x400
callq 0x4a7d10
movb %r14b, 0x2(%rax)
movq %rax, 0x18(%rsp)
movw $0x2f2e, (%rax)         # imm = 0x2F2E
cmpl $0x2, %ebp
jl 0x404017
movl %ebp, %r12d
movl $0x1, %r14d
leaq 0x1472bf(%rip), %r15    # 0x54b080
leaq 0x8(%rsp), %r13
leaq 0xf(%rsp), %rbp
movq (%rbx,%r14,8), %rdi
movq %r15, %rsi
callq 0x47d23f
movq (%rbx,%r14,8), %rdi
testb %al, %al
je 0x403def
addq $0xd, %rdi
movq %rdi, 0x1a0a56(%rip)    # 0x5a4840
jmp 0x40400b
leaq 0x147298(%rip), %rsi    # 0x54b08e
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x487530
cmpl $0x1, %eax
jne 0x403e1c
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x403e1c
movb %al, 0x1a0a3d(%rip)     # 0x5a4854
jmp 0x40400b
movq (%rbx,%r14,8), %rdi
leaq 0x147278(%rip), %rsi    # 0x54b09f
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x487530
cmpl $0x1, %eax
jne 0x403e4d
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x403e4d
movb %al, 0x1a0a0d(%rip)     # 0x5a4855
jmp 0x40400b
movq (%rbx,%r14,8), %rdi
leaq 0x147252(%rip), %rsi    # 0x54b0aa
leaq 0x20(%rsp), %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x487530
cmpl $0x1, %eax
jne 0x403e7f
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x1a09de(%rip)   # 0x5a4858
jmp 0x40400b
movq (%rbx,%r14,8), %rdi
leaq 0x14723a(%rip), %rsi    # 0x54b0c4
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x487530
cmpl $0x1, %eax
jne 0x403eb0
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x403eb0
movb %al, 0x1a09bd(%rip)     # 0x5a4868
jmp 0x40400b
movq (%rbx,%r14,8), %rdi
leaq 0x147220(%rip), %rsi    # 0x54b0db
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x487530
cmpl $0x1, %eax
jne 0x403edc
movl 0x8(%rsp), %eax
movl %eax, 0x1a0971(%rip)    # 0x5a4848
jmp 0x40400b
movq (%rbx,%r14,8), %rdi
leaq 0x1471ff(%rip), %rsi    # 0x54b0e6
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x487530
cmpl $0x1, %eax
jne 0x403f08
movl 0x8(%rsp), %eax
movl %eax, 0x1a0949(%rip)    # 0x5a484c
jmp 0x40400b
movq (%rbx,%r14,8), %rdi
leaq 0x1471e0(%rip), %rsi    # 0x54b0f3
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x487530
cmpl $0x1, %eax
jne 0x403f34
movl 0x8(%rsp), %eax
movl %eax, 0x1a0921(%rip)    # 0x5a4850
jmp 0x40400b
movq (%rbx,%r14,8), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x1471c1(%rip), %rsi    # 0x54b105
callq 0x4010c8
testl %eax, %eax
je 0x403f7a
movq 0x10(%rsp), %rdi
leaq 0x1471bd(%rip), %rsi    # 0x54b116
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x487530
cmpl $0x1, %eax
jne 0x403f86
movl 0x8(%rsp), %eax
movl %eax, 0x1a08eb(%rip)    # 0x5a4860
jmp 0x40400b
movb $0x0, 0x1a08e8(%rip)    # 0x5a4869
jmp 0x40400b
movq (%rbx,%r14,8), %rdi
leaq 0x147196(%rip), %rsi    # 0x54b127
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x487530
cmpl $0x1, %eax
jne 0x403faf
movl 0x8(%rsp), %eax
movl %eax, 0x1a08b7(%rip)    # 0x5a4864
jmp 0x40400b
movq (%rbx,%r14,8), %rdi
leaq 0x14717e(%rip), %rsi    # 0x54b138
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x487530
cmpl $0x1, %eax
jne 0x403fdd
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x403fdd
movb %al, 0x1a088f(%rip)     # 0x5a486a
jmp 0x40400b
movq (%rbx,%r14,8), %rdi
movl $0x5, %edx
movq %rdi, 0x10(%rsp)
leaq 0x147159(%rip), %rsi    # 0x54b14b
callq 0x401090
testl %eax, %eax
jne 0x40404d
movq 0x10(%rsp), %rax
addq $0x5, %rax
movq %rax, 0x1a0865(%rip)    # 0x5a4870
incq %r14
cmpq %r14, %r12
jne 0x403dcb
cmpq $0x0, 0x1a0851(%rip)    # 0x5a4870
jne 0x40402d
movq 0x18(%rsp), %rax
movq %rax, 0x1a0843(%rip)    # 0x5a4870
callq 0x402d64
callq 0x401140
callq 0x402e6d
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1470fd(%rip), %rsi    # 0x54b151
movq 0x10(%rsp), %rdi
callq 0x4010c8
testl %eax, %eax
jne 0x40406a
movq %rbx, %rdi
callq 0x4021ea
movq 0x10(%rsp), %rdi
callq 0x4021c6