// File: /workspace/github_c_makefile_star2_O3/ukontainer[P]sqlite-bench/benchmark.c
// Function: benchmark_run
void benchmark_run() {
  print_header();
  benchmark_open();

  char* benchmarks = FLAGS_benchmarks;
  while (benchmarks != NULL) {
    char* sep = strchr(benchmarks, ',');
    char* name;
    if (sep == NULL) {
      name = benchmarks;
      benchmarks = NULL;
    } else {
      name = calloc(sizeof(char), (sep - benchmarks + 1));
      strncpy(name, benchmarks, sep - benchmarks);
      benchmarks = sep + 1;
    }
    bytes_ = 0;
    start();
    bool known = true;
    bool write_sync = false;
    if (!strcmp(name, "fillseq")) {
      benchmark_write(write_sync, SEQUENTIAL, FRESH, num_, FLAGS_value_size, 1);
      wal_checkpoint(db_);
    } else if (!strcmp(name, "fillseqbatch")) {
      benchmark_write(write_sync, SEQUENTIAL, FRESH, num_, FLAGS_value_size, 1000);
      wal_checkpoint(db_);
    } else if (!strcmp(name, "fillrandom")) {
      benchmark_write(write_sync, RANDOM, FRESH, num_, FLAGS_value_size, 1);
      wal_checkpoint(db_);
    } else if (!strcmp(name, "fillrandbatch")) {
      benchmark_write(write_sync, RANDOM, FRESH, num_, FLAGS_value_size, 1000);
      wal_checkpoint(db_);
    } else if (!strcmp(name, "overwrite")) {
      benchmark_write(write_sync, RANDOM, EXISTING, num_, FLAGS_value_size, 1);
      wal_checkpoint(db_);
    } else if (!strcmp(name, "overwritebatch")) {
      benchmark_write(write_sync, RANDOM, EXISTING, num_, FLAGS_value_size, 1000);
      wal_checkpoint(db_);
    } else if (!strcmp(name, "fillrandsync")) {
      write_sync = true;
      benchmark_write(write_sync, RANDOM, FRESH, num_ / 100, FLAGS_value_size, 1);
      wal_checkpoint(db_);
    } else if (!strcmp(name, "fillseqsync")) {
      write_sync = true;
      benchmark_write(write_sync, SEQUENTIAL, FRESH, num_ / 100, FLAGS_value_size, 1);
      wal_checkpoint(db_);
    } else if (!strcmp(name, "fillrand100K")) {
      benchmark_write(write_sync, RANDOM, FRESH, num_ / 1000, 100 * 1000, 1);
      wal_checkpoint(db_);
    } else if (!strcmp(name, "fillseq100K")) {
      benchmark_write(write_sync, SEQUENTIAL, FRESH, num_ / 1000, 100 * 1000, 1);
      wal_checkpoint(db_);
    } else if (!strcmp(name, "readseq")) {
      benchmark_read(SEQUENTIAL, 1);
    } else if (!strcmp(name, "readrandom")) {
      benchmark_read(RANDOM, 1);
    } else if (!strcmp(name, "readrand100K")) {
      int n = reads_;
      reads_ /= 1000;
      benchmark_read(RANDOM, 1);
      reads_ = n;
    } else {
      known = false;
      if (strcmp(name, "")) {
        fprintf(stderr, "unknown benchmark '%s'\n", name);
      }
    }
    if (known) {
      stop(name);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq $0x5a26a8, %r14         # imm = 0x5A26A8
movq (%r14), %rdi
leaq 0x149256(%rip), %rsi    # 0x54a3b8
leaq 0x149267(%rip), %rdx    # 0x54a3d0
xorl %eax, %eax
callq 0x486930
xorl %edi, %edi
callq 0x4e0ad0
leaq 0x38(%rsp), %rdi
movq %rax, (%rdi)
movq (%r14), %rbx
callq 0x4e0a70
leaq 0x149249(%rip), %rsi    # 0x54a3d7
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x486930
leaq 0x149244(%rip), %rdi    # 0x54a3e6
leaq 0x14fc59(%rip), %rsi    # 0x550e02
callq 0x495420
testq %rax, %rax
je 0x40135b
movq %rax, %r12
movq $0x0, 0x8(%rsp)
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x4a7390
movq %rax, 0x10(%rsp)
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x4a7390
movq %rax, 0x18(%rsp)
leaq 0x40(%rsp), %r13
movq %r13, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r12, %rdx
callq 0x495170
testq %rax, %rax
je 0x401305
movq $0x0, 0x8(%rsp)
movq %r13, %rax
notq %rax
movq %rax, 0x20(%rsp)
movq %r13, %rdi
pushq $0x3a
popq %rsi
callq 0x401108
testq %rax, %rax
je 0x4012ec
movq %rax, %rbx
movl $0x3e8, %esi            # imm = 0x3E8
pushq $0x1
popq %r14
movq %r14, %rdi
callq 0x4a87e0
movq %rax, %rbp
movl $0x3e8, %esi            # imm = 0x3E8
movq %r14, %rdi
callq 0x4a87e0
movq %rax, %r14
movq 0x20(%rsp), %rax
leaq (%rax,%rbx), %rdx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x401098
incq %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x401020
movq %rbp, %rdi
callq 0x47c8fb
movq %rax, %rbx
movq %r14, %rdi
callq 0x47c8fb
movq %rax, %r15
movq %rbp, %rdi
callq 0x4a76d0
movq %r14, %rdi
callq 0x4a76d0
movq %rbx, %rdi
leaq 0x149154(%rip), %rsi    # 0x54a3f4
callq 0x4010c8
testl %eax, %eax
je 0x4012c3
movq %rbx, %rdi
leaq 0x14914c(%rip), %rsi    # 0x54a3ff
callq 0x4010c8
movq 0x18(%rsp), %rdi
testl %eax, %eax
jne 0x4012dc
jmp 0x4012d4
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x401020
movq %rbx, %rdi
callq 0x4a76d0
movq %r15, %rdi
callq 0x4a76d0
movq %r13, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r12, %rdx
callq 0x495170
testq %rax, %rax
jne 0x401213
movq %r12, %rdi
callq 0x494e80
movq $0x5a26a8, %r14         # imm = 0x5A26A8
movq (%r14), %rdi
leaq 0x1490ec(%rip), %rsi    # 0x54a40a
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rbx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x486930
movq (%r14), %rdi
leaq 0x1490e3(%rip), %rsi    # 0x54a41f
movq 0x18(%rsp), %r15
movq %r15, %rdx
xorl %eax, %eax
callq 0x486930
movq %rbx, %rdi
callq 0x4a76d0
movq %r15, %rdi
callq 0x4a76d0
movq (%r14), %rdi
leaq 0x148fec(%rip), %rsi    # 0x54a351
pushq $0x10
popq %rdx
xorl %eax, %eax
callq 0x486930
movq (%r14), %rdi
movq $0x5a4850, %rbx         # imm = 0x5A4850
movl (%rbx), %edx
leaq 0x148fea(%rip), %rsi    # 0x54a36c
xorl %eax, %eax
callq 0x486930
movq (%r14), %rdi
movl 0x1a346a(%rip), %edx    # 0x5a47fc
leaq 0x148fee(%rip), %rsi    # 0x54a387
xorl %eax, %eax
callq 0x486930
movq (%r14), %rdi
movslq (%rbx), %rax
addq $0x10, %rax
movslq 0x1a344b(%rip), %rcx    # 0x5a47fc
imulq %rax, %rcx
cvtsi2sd %rcx, %xmm0
mulsd 0x148c86(%rip), %xmm0   # 0x54a048
leaq 0x148fce(%rip), %rsi    # 0x54a397
movb $0x1, %al
callq 0x486930
movq (%r14), %rcx
leaq 0x149055(%rip), %rdi    # 0x54a42f
pushq $0x3f
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x495520
movq (%r14), %rcx
leaq 0x149642(%rip), %rdi    # 0x54aa34
pushq $0x31
popq %rsi
movq %rbx, %rdx
callq 0x495520
callq 0x402e97
movq $0x5a4840, %rax         # imm = 0x5A4840
movq (%rax), %r12
testq %r12, %r12
je 0x4018eb
pushq $0x1
popq %rbp
leaq 0x170f2e(%rip), %r14    # 0x57234d
movq %r12, %rdi
pushq $0x2c
popq %rsi
callq 0x401108
testq %rax, %rax
je 0x40145d
movq %rax, %r13
movq %rax, %rbx
subq %r12, %rbx
leaq 0x1(%rbx), %rsi
pushq $0x1
popq %rdi
callq 0x4a87e0
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x401098
incq %r13
movq %r13, %r12
jmp 0x401463
movq %r12, %r15
xorl %r12d, %r12d
andq $0x0, 0x1a339d(%rip)    # 0x5a4808
callq 0x40309e
movq %r15, %rdi
leaq 0x148c19(%rip), %rsi    # 0x54a093
callq 0x4010c8
testl %eax, %eax
je 0x4015c5
movq %r15, %rdi
leaq 0x148c0a(%rip), %rsi    # 0x54a09b
callq 0x4010c8
testl %eax, %eax
je 0x4015db
movq %r15, %rdi
leaq 0x148c00(%rip), %rsi    # 0x54a0a8
callq 0x4010c8
testl %eax, %eax
je 0x4015f1
movq %r15, %rdi
leaq 0x148bf4(%rip), %rsi    # 0x54a0b3
callq 0x4010c8
testl %eax, %eax
je 0x40160c
movq %r15, %rdi
leaq 0x148beb(%rip), %rsi    # 0x54a0c1
callq 0x4010c8
testl %eax, %eax
je 0x401624
movq %r15, %rdi
leaq 0x148bde(%rip), %rsi    # 0x54a0cb
callq 0x4010c8
testl %eax, %eax
je 0x40163f
movq %r15, %rdi
leaq 0x148bd6(%rip), %rsi    # 0x54a0da
callq 0x4010c8
testl %eax, %eax
je 0x40165d
movq %r15, %rdi
leaq 0x148bcc(%rip), %rsi    # 0x54a0e7
callq 0x4010c8
testl %eax, %eax
je 0x401679
movq %r15, %rdi
leaq 0x148bc1(%rip), %rsi    # 0x54a0f3
callq 0x4010c8
testl %eax, %eax
je 0x401699
movq %r15, %rdi
leaq 0x148bb7(%rip), %rsi    # 0x54a100
callq 0x4010c8
testl %eax, %eax
je 0x4016ad
movq %r15, %rdi
leaq 0x148bac(%rip), %rsi    # 0x54a10c
callq 0x4010c8
testl %eax, %eax
je 0x4016f4
movq %r15, %rdi
leaq 0x148b9d(%rip), %rsi    # 0x54a114
callq 0x4010c8
testl %eax, %eax
je 0x4016f8
movq %r15, %rdi
leaq 0x148b91(%rip), %rsi    # 0x54a11f
callq 0x4010c8
testl %eax, %eax
je 0x401703
cmpb $0x0, (%r15)
je 0x4018b4
movq $0x5a26a8, %rax         # imm = 0x5A26A8
movq (%rax), %rdi
leaq 0x148b76(%rip), %rsi    # 0x54a12c
movq %r15, %rdx
xorl %eax, %eax
callq 0x486930
jmp 0x4018b4
movl 0x1a3231(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
xorl %esi, %esi
jmp 0x401605
movl 0x1a321b(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
xorl %esi, %esi
jmp 0x401620
movl 0x1a3205(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
movl %ebp, %esi
xorl %edx, %edx
jmp 0x4016c9
movl 0x1a31ea(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
movl %ebp, %esi
xorl %edx, %edx
jmp 0x401655
movl 0x1a31d2(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
movl %ebp, %esi
movl %ebp, %edx
jmp 0x4016c9
movl 0x1a31b7(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
movl %ebp, %esi
movl %ebp, %edx
movl $0x3e8, %r9d            # imm = 0x3E8
jmp 0x4016cc
movl 0x1a3199(%rip), %eax    # 0x5a47fc
cltd
pushq $0x64
popq %rcx
idivl %ecx
movq $0x5a4850, %rcx         # imm = 0x5A4850
movl (%rcx), %r8d
movl %ebp, %edi
movl %ebp, %esi
jmp 0x401693
movl 0x1a317d(%rip), %eax    # 0x5a47fc
cltd
pushq $0x64
popq %rcx
idivl %ecx
movq $0x5a4850, %rcx         # imm = 0x5A4850
movl (%rcx), %r8d
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
movl %eax, %ecx
jmp 0x4016c9
movl 0x1a315d(%rip), %eax    # 0x5a47fc
cltd
movl $0x3e8, %ecx            # imm = 0x3E8
idivl %ecx
xorl %edi, %edi
movl %ebp, %esi
jmp 0x4016bf
movl 0x1a3149(%rip), %eax    # 0x5a47fc
cltd
movl $0x3e8, %ecx            # imm = 0x3E8
idivl %ecx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
movl %eax, %ecx
movl $0x186a0, %r8d          # imm = 0x186A0
movl %ebp, %r9d
callq 0x403139
movq $0x5a486a, %rax         # imm = 0x5A486A
cmpb $0x1, (%rax)
jne 0x401728
movq 0x1a310c(%rip), %rdi    # 0x5a47f0
xorl %esi, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x413ac4
jmp 0x401728
xorl %edi, %edi
jmp 0x4016fa
movl %ebp, %edi
movl %ebp, %esi
callq 0x403511
jmp 0x401728
movl 0x1a30f7(%rip), %ebx    # 0x5a4800
movl %ebx, %eax
cltd
movl $0x3e8, %ecx            # imm = 0x3E8
idivl %ecx
movl %eax, 0x1a30e7(%rip)    # 0x5a4800
movl %ebp, %edi
movl %ebp, %esi
callq 0x403511
movl %ebx, 0x1a30d8(%rip)    # 0x5a4800
callq 0x47c898
movq %rax, %xmm1
punpckldq 0x1488d6(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1488de(%rip), %xmm1   # 0x54a020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x1488da(%rip), %xmm0   # 0x54a030
movl 0x1a308c(%rip), %eax    # 0x5a47e8
testl %eax, %eax
jg 0x40176c
movl $0x1, 0x1a307e(%rip)    # 0x5a47e8
movl %ebp, %eax
movq 0x1a3095(%rip), %rbx    # 0x5a4808
testq %rbx, %rbx
jle 0x401810
pushq $0x64
popq %rdi
movapd %xmm0, 0x20(%rsp)
callq 0x4a7390
movq %rax, %r13
movq %rax, %rdi
callq 0x401100
cvtsi2sd %rbx, %xmm0
mulsd 0x1488a6(%rip), %xmm0   # 0x54a048
movapd 0x20(%rsp), %xmm1
subsd 0x1a3088(%rip), %xmm1   # 0x5a4838
divsd %xmm1, %xmm0
movq %r13, %rdi
movq %rax, %rsi
leaq 0x148cae(%rip), %rdx    # 0x54a46f
movb $0x1, %al
callq 0x4869f0
movq 0x1a3061(%rip), %rbx    # 0x5a4830
testq %rbx, %rbx
je 0x4017f4
cmpb $0x0, (%rbx)
jne 0x4017f4
movq %r13, %rdi
callq 0x401100
movw $0x20, (%r13,%rax)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x401068
movq %r13, 0x1a3035(%rip)    # 0x5a4830
movl 0x1a2fe7(%rip), %eax    # 0x5a47e8
movq $0x5a26a8, %rcx         # imm = 0x5A26A8
movapd 0x20(%rsp), %xmm0
jmp 0x40181e
movq 0x1a3019(%rip), %r13    # 0x5a4830
movq $0x5a26a8, %rcx         # imm = 0x5A26A8
movq (%rcx), %rdi
subsd 0x1a300f(%rip), %xmm0   # 0x5a4838
mulsd 0x148807(%rip), %xmm0   # 0x54a038
movq %r14, %r8
movq %r14, %rcx
testq %r13, %r13
je 0x40184f
cmpb $0x0, (%r13)
leaq 0x151440(%rip), %rcx    # 0x552c88
cmoveq %r14, %rcx
movq %r13, %r8
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
leaq 0x148c1c(%rip), %rsi    # 0x54a47a
movq %r15, %rdx
movb $0x1, %al
callq 0x486930
movq $0x5a4855, %rax         # imm = 0x5A4855
cmpb $0x1, (%rax)
jne 0x40188a
movq $0x5a26b0, %rax         # imm = 0x5A26B0
movq (%rax), %rdi
leaq 0x1a2f4b(%rip), %rsi    # 0x5a47d0
callq 0x40443e
movq $0x5a4854, %rax         # imm = 0x5A4854
cmpb $0x1, (%rax)
je 0x4018bf
movq $0x5a26b0, %rax         # imm = 0x5A26B0
movq (%rax), %rdi
callq 0x495070
movq $0x5a26a8, %rax         # imm = 0x5A26A8
movq (%rax), %rdi
callq 0x495070
testq %r12, %r12
jne 0x40141f
jmp 0x4018eb
movq $0x5a26a8, %rax         # imm = 0x5A26A8
movq (%rax), %rbx
leaq 0x1a2a08(%rip), %rdi    # 0x5a42d8
callq 0x403892
movq %rbx, %rdi
leaq 0x148bba(%rip), %rsi    # 0x54a499
movq %rax, %rdx
xorl %eax, %eax
callq 0x486930
jmp 0x401896
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq