// File: /workspace/github_c_makefile_star2_O2/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
callq 0x403334
movl $0x400, %edi            # imm = 0x400
callq 0x495830
movw $0x2f2e, (%rax)         # imm = 0x2F2E
movq %rax, 0x18(%rsp)
movb $0x0, 0x2(%rax)
movslq %ebp, %r12
pushq $0x1
popq %r14
leaq 0x1359d9(%rip), %r15    # 0x539090
leaq 0x8(%rsp), %r13
leaq 0xf(%rsp), %rbp
cmpq %r12, %r14
jge 0x403910
movq (%rbx,%r14,8), %rdi
movq %r15, %rsi
callq 0x46ad77
movq (%rbx,%r14,8), %rdi
testb %al, %al
je 0x4036ee
addq $0xd, %rdi
movq %rdi, 0x194157(%rip)    # 0x597840
jmp 0x403908
leaq 0x1359a9(%rip), %rsi    # 0x53909e
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x475050
cmpl $0x1, %eax
jne 0x40371b
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x40371b
movb %al, 0x19413e(%rip)     # 0x597854
jmp 0x403908
movq (%rbx,%r14,8), %rdi
leaq 0x135989(%rip), %rsi    # 0x5390af
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x475050
cmpl $0x1, %eax
jne 0x40374c
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x40374c
movb %al, 0x19410e(%rip)     # 0x597855
jmp 0x403908
movq (%rbx,%r14,8), %rdi
leaq 0x135963(%rip), %rsi    # 0x5390ba
leaq 0x20(%rsp), %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x475050
cmpl $0x1, %eax
jne 0x40377e
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x1940df(%rip)   # 0x597858
jmp 0x403908
movq (%rbx,%r14,8), %rdi
leaq 0x13594b(%rip), %rsi    # 0x5390d4
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x475050
cmpl $0x1, %eax
jne 0x4037af
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x4037af
movb %al, 0x1940be(%rip)     # 0x597868
jmp 0x403908
movq (%rbx,%r14,8), %rdi
leaq 0x135931(%rip), %rsi    # 0x5390eb
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x475050
cmpl $0x1, %eax
jne 0x4037db
movl 0x8(%rsp), %eax
movl %eax, 0x194072(%rip)    # 0x597848
jmp 0x403908
movq (%rbx,%r14,8), %rdi
leaq 0x135910(%rip), %rsi    # 0x5390f6
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x475050
cmpl $0x1, %eax
jne 0x403807
movl 0x8(%rsp), %eax
movl %eax, 0x19404a(%rip)    # 0x59784c
jmp 0x403908
movq (%rbx,%r14,8), %rdi
leaq 0x1358f1(%rip), %rsi    # 0x539103
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x475050
cmpl $0x1, %eax
jne 0x403833
movl 0x8(%rsp), %eax
movl %eax, 0x194022(%rip)    # 0x597850
jmp 0x403908
movq (%rbx,%r14,8), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x1358d2(%rip), %rsi    # 0x539115
callq 0x4010c8
testl %eax, %eax
je 0x403879
movq 0x10(%rsp), %rdi
leaq 0x1358ce(%rip), %rsi    # 0x539126
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x475050
cmpl $0x1, %eax
jne 0x403885
movl 0x8(%rsp), %eax
movl %eax, 0x193fec(%rip)    # 0x597860
jmp 0x403908
movb $0x0, 0x193fe9(%rip)    # 0x597869
jmp 0x403908
movq (%rbx,%r14,8), %rdi
leaq 0x1358a7(%rip), %rsi    # 0x539137
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x475050
cmpl $0x1, %eax
jne 0x4038ae
movl 0x8(%rsp), %eax
movl %eax, 0x193fb8(%rip)    # 0x597864
jmp 0x403908
movq (%rbx,%r14,8), %rdi
leaq 0x13588f(%rip), %rsi    # 0x539148
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x475050
cmpl $0x1, %eax
jne 0x4038dc
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
ja 0x4038dc
movb %al, 0x193f90(%rip)     # 0x59786a
jmp 0x403908
movq (%rbx,%r14,8), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x13586f(%rip), %rsi    # 0x53915b
pushq $0x5
popq %rdx
callq 0x401090
testl %eax, %eax
jne 0x403946
movq 0x10(%rsp), %rax
addq $0x5, %rax
movq %rax, 0x193f68(%rip)    # 0x597870
incq %r14
jmp 0x4036c1
cmpq $0x0, 0x193f58(%rip)    # 0x597870
jne 0x403926
movq 0x18(%rsp), %rax
movq %rax, 0x193f4a(%rip)    # 0x597870
callq 0x401d28
callq 0x401e5a
callq 0x401e20
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x135814(%rip), %rsi    # 0x539161
movq 0x10(%rsp), %rdi
callq 0x4010c8
testl %eax, %eax
jne 0x40396a
movq (%rbx), %rdi
callq 0x4033ad
xorl %edi, %edi
callq 0x4742a0
movq $0x5956a8, %rax         # imm = 0x5956A8
movq (%rax), %rdi
leaq 0x1357ed(%rip), %rsi    # 0x539168
movq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x474dd0
pushq $0x1
popq %rdi
callq 0x4742a0
nop