// File: /workspace/github_c_makefile_star2_O1/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 0x4872b0
xorl %edi, %edi
callq 0x4e1450
leaq 0x38(%rsp), %rdi
movq %rax, (%rdi)
movq (%r14), %rbx
callq 0x4e13f0
leaq 0x149249(%rip), %rsi    # 0x54a3d7
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4872b0
leaq 0x149244(%rip), %rdi    # 0x54a3e6
leaq 0x14fbd1(%rip), %rsi    # 0x550d7a
callq 0x495da0
testq %rax, %rax
je 0x40135b
movq %rax, %r12
movq $0x0, 0x8(%rsp)
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x4a7d10
movq %rax, 0x10(%rsp)
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x4a7d10
movq %rax, 0x18(%rsp)
leaq 0x40(%rsp), %r13
movq %r13, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r12, %rdx
callq 0x495af0
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 0x4a9160
movq %rax, %rbp
movl $0x3e8, %esi            # imm = 0x3E8
movq %r14, %rdi
callq 0x4a9160
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 0x47d27f
movq %rax, %rbx
movq %r14, %rdi
callq 0x47d27f
movq %rax, %r15
movq %rbp, %rdi
callq 0x4a8050
movq %r14, %rdi
callq 0x4a8050
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 0x4a8050
movq %r15, %rdi
callq 0x4a8050
movq %r13, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r12, %rdx
callq 0x495af0
testq %rax, %rax
jne 0x401213
movq %r12, %rdi
callq 0x495800
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 0x4872b0
movq (%r14), %rdi
leaq 0x1490e3(%rip), %rsi    # 0x54a41f
movq 0x18(%rsp), %r15
movq %r15, %rdx
xorl %eax, %eax
callq 0x4872b0
movq %rbx, %rdi
callq 0x4a8050
movq %r15, %rdi
callq 0x4a8050
movq (%r14), %rdi
leaq 0x148fec(%rip), %rsi    # 0x54a351
pushq $0x10
popq %rdx
xorl %eax, %eax
callq 0x4872b0
movq (%r14), %rdi
movq $0x5a4850, %rbx         # imm = 0x5A4850
movl (%rbx), %edx
leaq 0x148fea(%rip), %rsi    # 0x54a36c
xorl %eax, %eax
callq 0x4872b0
movq (%r14), %rdi
movl 0x1a346a(%rip), %edx    # 0x5a47fc
leaq 0x148fee(%rip), %rsi    # 0x54a387
xorl %eax, %eax
callq 0x4872b0
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 0x4872b0
movq (%r14), %rcx
leaq 0x149055(%rip), %rdi    # 0x54a42f
pushq $0x3f
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x495ea0
movq (%r14), %rcx
leaq 0x149632(%rip), %rdi    # 0x54aa24
pushq $0x31
popq %rsi
movq %rbx, %rdx
callq 0x495ea0
callq 0x402e87
movq $0x5a4840, %rax         # imm = 0x5A4840
movq (%rax), %r12
testq %r12, %r12
je 0x4018d1
pushq $0x1
popq %rbp
leaq 0x170e4e(%rip), %r14    # 0x57226d
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 0x4a9160
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 0x40308e
movq %r15, %rdi
leaq 0x148c19(%rip), %rsi    # 0x54a093
callq 0x4010c8
testl %eax, %eax
movq $0x5a26a8, %r13         # imm = 0x5A26A8
je 0x4015c6
movq %r15, %rdi
leaq 0x148c03(%rip), %rsi    # 0x54a09b
callq 0x4010c8
testl %eax, %eax
je 0x4015dc
movq %r15, %rdi
leaq 0x148bf9(%rip), %rsi    # 0x54a0a8
callq 0x4010c8
testl %eax, %eax
je 0x4015f2
movq %r15, %rdi
leaq 0x148bed(%rip), %rsi    # 0x54a0b3
callq 0x4010c8
testl %eax, %eax
je 0x40160d
movq %r15, %rdi
leaq 0x148be4(%rip), %rsi    # 0x54a0c1
callq 0x4010c8
testl %eax, %eax
je 0x401625
movq %r15, %rdi
leaq 0x148bd7(%rip), %rsi    # 0x54a0cb
callq 0x4010c8
testl %eax, %eax
je 0x401640
movq %r15, %rdi
leaq 0x148bcf(%rip), %rsi    # 0x54a0da
callq 0x4010c8
testl %eax, %eax
je 0x40165e
movq %r15, %rdi
leaq 0x148bc5(%rip), %rsi    # 0x54a0e7
callq 0x4010c8
testl %eax, %eax
je 0x40167a
movq %r15, %rdi
leaq 0x148bba(%rip), %rsi    # 0x54a0f3
callq 0x4010c8
testl %eax, %eax
je 0x40169a
movq %r15, %rdi
leaq 0x148bb0(%rip), %rsi    # 0x54a100
callq 0x4010c8
testl %eax, %eax
je 0x4016ae
movq %r15, %rdi
leaq 0x148ba5(%rip), %rsi    # 0x54a10c
callq 0x4010c8
testl %eax, %eax
je 0x4016f5
movq %r15, %rdi
leaq 0x148b96(%rip), %rsi    # 0x54a114
callq 0x4010c8
testl %eax, %eax
je 0x4016f9
movq %r15, %rdi
leaq 0x148b8a(%rip), %rsi    # 0x54a11f
callq 0x4010c8
testl %eax, %eax
je 0x401704
cmpb $0x0, (%r15)
je 0x4018a0
movq (%r13), %rdi
leaq 0x148b75(%rip), %rsi    # 0x54a12c
movq %r15, %rdx
xorl %eax, %eax
callq 0x4872b0
jmp 0x4018a0
movl 0x1a3230(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
xorl %esi, %esi
jmp 0x401606
movl 0x1a321a(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
xorl %esi, %esi
jmp 0x401621
movl 0x1a3204(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
movl %ebp, %esi
xorl %edx, %edx
jmp 0x4016ca
movl 0x1a31e9(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
movl %ebp, %esi
xorl %edx, %edx
jmp 0x401656
movl 0x1a31d1(%rip), %ecx    # 0x5a47fc
movq $0x5a4850, %rax         # imm = 0x5A4850
movl (%rax), %r8d
xorl %edi, %edi
movl %ebp, %esi
movl %ebp, %edx
jmp 0x4016ca
movl 0x1a31b6(%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 0x4016cd
movl 0x1a3198(%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 0x401694
movl 0x1a317c(%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 0x4016ca
movl 0x1a315c(%rip), %eax    # 0x5a47fc
cltd
movl $0x3e8, %ecx            # imm = 0x3E8
idivl %ecx
xorl %edi, %edi
movl %ebp, %esi
jmp 0x4016c0
movl 0x1a3148(%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 0x403129
movq $0x5a486a, %rax         # imm = 0x5A486A
cmpb $0x1, (%rax)
jne 0x401729
movq 0x1a310b(%rip), %rdi    # 0x5a47f0
xorl %esi, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x413a6a
jmp 0x401729
xorl %edi, %edi
jmp 0x4016fb
movl %ebp, %edi
movl %ebp, %esi
callq 0x4034ef
jmp 0x401729
movl 0x1a30f6(%rip), %ebx    # 0x5a4800
movl %ebx, %eax
cltd
movl $0x3e8, %ecx            # imm = 0x3E8
idivl %ecx
movl %eax, 0x1a30e6(%rip)    # 0x5a4800
movl %ebp, %edi
movl %ebp, %esi
callq 0x4034ef
movl %ebx, 0x1a30d7(%rip)    # 0x5a4800
callq 0x47d21c
movq %rax, %xmm1
punpckldq 0x1488d5(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1488dd(%rip), %xmm1   # 0x54a020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x1488d9(%rip), %xmm0   # 0x54a030
cmpl $0x0, 0x1a308a(%rip)    # 0x5a47e8
jg 0x40176a
movl $0x1, 0x1a307e(%rip)    # 0x5a47e8
movq 0x1a3097(%rip), %rbx    # 0x5a4808
testq %rbx, %rbx
jle 0x401806
pushq $0x64
popq %rdi
movapd %xmm0, 0x20(%rsp)
callq 0x4a7d10
movq %rax, %r13
movq %rax, %rdi
callq 0x401100
cvtsi2sd %rbx, %xmm0
mulsd 0x1488a8(%rip), %xmm0   # 0x54a048
movapd 0x20(%rsp), %xmm1
subsd 0x1a308a(%rip), %xmm1   # 0x5a4838
divsd %xmm1, %xmm0
movq %r13, %rdi
movq %rax, %rsi
leaq 0x148cb0(%rip), %rdx    # 0x54a46f
movb $0x1, %al
callq 0x487370
movq 0x1a3063(%rip), %rbx    # 0x5a4830
testq %rbx, %rbx
je 0x4017f2
cmpb $0x0, (%rbx)
jne 0x4017f2
movq %r13, %rdi
callq 0x401100
movw $0x20, (%r13,%rax)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x401068
movq %r13, 0x1a3037(%rip)    # 0x5a4830
movq $0x5a26a8, %r13         # imm = 0x5A26A8
movapd 0x20(%rsp), %xmm0
subsd 0x1a302a(%rip), %xmm0   # 0x5a4838
movq (%r13), %rdi
mulsd 0x14881e(%rip), %xmm0   # 0x54a038
cvtsi2sdl 0x1a2fc6(%rip), %xmm1 # 0x5a47e8
movq 0x1a3007(%rip), %rax    # 0x5a4830
movq %r14, %r8
movq %r14, %rcx
testq %rax, %rax
je 0x401845
cmpb $0x0, (%rax)
leaq 0x1513c6(%rip), %rcx    # 0x552c04
cmoveq %r14, %rcx
movq %rax, %r8
divsd %xmm1, %xmm0
leaq 0x148c2a(%rip), %rsi    # 0x54a47a
movq %r15, %rdx
movb $0x1, %al
callq 0x4872b0
movq $0x5a4855, %rax         # imm = 0x5A4855
cmpb $0x1, (%rax)
jne 0x40187c
movq $0x5a26b0, %rax         # imm = 0x5A26B0
movq (%rax), %rdi
leaq 0x1a2f59(%rip), %rsi    # 0x5a47d0
callq 0x404430
movq $0x5a4854, %rax         # imm = 0x5A4854
cmpb $0x1, (%rax)
je 0x4018ab
movq $0x5a26b0, %rax         # imm = 0x5A26B0
movq (%rax), %rdi
callq 0x4959f0
movq (%r13), %rdi
callq 0x4959f0
testq %r12, %r12
jne 0x40141f
jmp 0x4018d1
movq (%r13), %rbx
leaq 0x1a2a22(%rip), %rdi    # 0x5a42d8
callq 0x40386b
movq %rbx, %rdi
leaq 0x148bd4(%rip), %rsi    # 0x54a499
movq %rax, %rdx
xorl %eax, %eax
callq 0x4872b0
jmp 0x401888
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq