// File: /workspace/github_c_makefile_star2_O2/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 $0x5956a8, %r14         # imm = 0x5956A8
movq (%r14), %rdi
leaq 0x13653c(%rip), %rsi    # 0x5383b8
leaq 0x13654d(%rip), %rdx    # 0x5383d0
xorl %eax, %eax
callq 0x474dd0
xorl %edi, %edi
callq 0x4cef50
leaq 0x38(%rsp), %rdi
movq %rax, (%rdi)
movq (%r14), %rbx
callq 0x4ceef0
leaq 0x13652f(%rip), %rsi    # 0x5383d7
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x474dd0
leaq 0x13652a(%rip), %rdi    # 0x5383e6
leaq 0x13cec7(%rip), %rsi    # 0x53ed8a
callq 0x4838c0
testq %rax, %rax
je 0x402062
movq %rax, %r12
movq $0x0, 0x8(%rsp)
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x495830
movq %rax, 0x20(%rsp)
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x495830
movq %rax, 0x28(%rsp)
leaq 0x40(%rsp), %r13
pushq $0x3a
popq %rbp
movq %r13, %rax
notq %rax
movq %rax, 0x30(%rsp)
movq %r13, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r12, %rdx
callq 0x483610
testq %rax, %rax
je 0x40200c
movq %r13, %rdi
movl %ebp, %esi
callq 0x401108
testq %rax, %rax
je 0x401f0e
movq %rax, %rbx
movl $0x3e8, %esi            # imm = 0x3E8
pushq $0x1
popq %r15
movq %r15, %rdi
callq 0x496c80
movq %rax, %r14
movl $0x3e8, %esi            # imm = 0x3E8
movq %r15, %rdi
callq 0x496c80
movq %rax, %r15
movq 0x30(%rsp), %rax
leaq (%rax,%rbx), %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x401098
incq %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x401020
movq %r14, %rdi
callq 0x46adb7
movq %rax, %rbx
movq %r15, %rdi
callq 0x46adb7
movq %rax, 0x10(%rsp)
movq %r14, %rdi
callq 0x495b70
movq %r15, %rdi
callq 0x495b70
movq %rbx, %rdi
leaq 0x136443(%rip), %rsi    # 0x5383f4
callq 0x4010c8
testl %eax, %eax
je 0x401fd9
movq %rbx, %rdi
leaq 0x13643b(%rip), %rsi    # 0x5383ff
callq 0x4010c8
movq 0x28(%rsp), %rdi
testl %eax, %eax
movq 0x10(%rsp), %r14
jne 0x401ff7
jmp 0x401fef
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x401020
movq %rbx, %rdi
callq 0x495b70
movq %r14, %rdi
callq 0x495b70
jmp 0x401f0e
movq %r12, %rdi
callq 0x483320
movq $0x5956a8, %r14         # imm = 0x5956A8
movq (%r14), %rdi
leaq 0x1363e5(%rip), %rsi    # 0x53840a
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rbx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x474dd0
movq (%r14), %rdi
leaq 0x1363dc(%rip), %rsi    # 0x53841f
movq 0x28(%rsp), %r15
movq %r15, %rdx
xorl %eax, %eax
callq 0x474dd0
movq %rbx, %rdi
callq 0x495b70
movq %r15, %rdi
callq 0x495b70
movq (%r14), %rdi
leaq 0x1362e5(%rip), %rsi    # 0x538351
pushq $0x10
popq %rdx
xorl %eax, %eax
callq 0x474dd0
movq (%r14), %rdi
movq $0x597850, %rbx         # imm = 0x597850
movl (%rbx), %edx
leaq 0x1362e3(%rip), %rsi    # 0x53836c
xorl %eax, %eax
callq 0x474dd0
movq (%r14), %rdi
movl 0x195763(%rip), %edx    # 0x5977fc
leaq 0x1362e7(%rip), %rsi    # 0x538387
xorl %eax, %eax
callq 0x474dd0
movq (%r14), %rdi
movslq (%rbx), %rax
addq $0x10, %rax
movslq 0x195744(%rip), %rcx    # 0x5977fc
imulq %rax, %rcx
cvtsi2sd %rcx, %xmm0
mulsd 0x135f7f(%rip), %xmm0   # 0x538048
leaq 0x1362c7(%rip), %rsi    # 0x538397
movb $0x1, %al
callq 0x474dd0
movq (%r14), %rcx
leaq 0x13634e(%rip), %rdi    # 0x53842f
pushq $0x3f
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x4839c0
movq (%r14), %rcx
leaq 0x13693b(%rip), %rdi    # 0x538a34
pushq $0x31
popq %rsi
movq %rbx, %rdx
callq 0x4839c0
callq 0x4025f3
movq $0x597840, %rax         # imm = 0x597840
movq (%rax), %rbx
pushq $0x1
popq %r15
leaq 0x15e16f(%rip), %r14    # 0x56028d
testq %rbx, %rbx
je 0x4025e1
movq %rbx, %rdi
pushq $0x2c
popq %rsi
callq 0x401108
testq %rax, %rax
je 0x402165
movq %rax, %r12
movq %rax, %rbp
subq %rbx, %rbp
leaq 0x1(%rbp), %rsi
pushq $0x1
popq %rdi
callq 0x496c80
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x401098
incq %r12
movq %r12, %rbx
jmp 0x40216a
movq %rbx, %r13
xorl %ebx, %ebx
andq $0x0, 0x195696(%rip)    # 0x597808
callq 0x402802
movq %r13, %rdi
leaq 0x135f12(%rip), %rsi    # 0x538093
callq 0x4010c8
testl %eax, %eax
je 0x4022cd
movq %r13, %rdi
leaq 0x135f03(%rip), %rsi    # 0x53809b
callq 0x4010c8
testl %eax, %eax
je 0x4022e3
movq %r13, %rdi
leaq 0x135ef9(%rip), %rsi    # 0x5380a8
callq 0x4010c8
testl %eax, %eax
je 0x4022f9
movq %r13, %rdi
leaq 0x135eed(%rip), %rsi    # 0x5380b3
callq 0x4010c8
testl %eax, %eax
je 0x402315
movq %r13, %rdi
leaq 0x135ee4(%rip), %rsi    # 0x5380c1
callq 0x4010c8
testl %eax, %eax
je 0x40232e
movq %r13, %rdi
leaq 0x135ed7(%rip), %rsi    # 0x5380cb
callq 0x4010c8
testl %eax, %eax
je 0x40234b
movq %r13, %rdi
leaq 0x135ecf(%rip), %rsi    # 0x5380da
callq 0x4010c8
testl %eax, %eax
je 0x40236b
movq %r13, %rdi
leaq 0x135ec5(%rip), %rsi    # 0x5380e7
callq 0x4010c8
testl %eax, %eax
je 0x402389
movq %r13, %rdi
leaq 0x135eba(%rip), %rsi    # 0x5380f3
callq 0x4010c8
testl %eax, %eax
je 0x4023aa
movq %r13, %rdi
leaq 0x135eb0(%rip), %rsi    # 0x538100
callq 0x4010c8
testl %eax, %eax
je 0x4023bf
movq %r13, %rdi
leaq 0x135ea5(%rip), %rsi    # 0x53810c
callq 0x4010c8
testl %eax, %eax
je 0x40257b
movq %r13, %rdi
leaq 0x135e96(%rip), %rsi    # 0x538114
callq 0x4010c8
testl %eax, %eax
je 0x4025a5
movq %r13, %rdi
leaq 0x135e8a(%rip), %rsi    # 0x53811f
callq 0x4010c8
testl %eax, %eax
je 0x4025b5
cmpb $0x0, (%r13)
je 0x40211e
movq $0x5956a8, %rax         # imm = 0x5956A8
movq (%rax), %rdi
leaq 0x135e6e(%rip), %rsi    # 0x53812c
movq %r13, %rdx
xorl %eax, %eax
callq 0x474dd0
jmp 0x40211e
movl 0x195529(%rip), %ecx    # 0x5977fc
movq $0x597850, %rax         # imm = 0x597850
movl (%rax), %r8d
xorl %edi, %edi
xorl %esi, %esi
jmp 0x40230e
movl 0x195513(%rip), %ecx    # 0x5977fc
movq $0x597850, %rax         # imm = 0x597850
movl (%rax), %r8d
xorl %edi, %edi
xorl %esi, %esi
jmp 0x40232a
movl 0x1954fd(%rip), %ecx    # 0x5977fc
movq $0x597850, %rax         # imm = 0x597850
movl (%rax), %r8d
xorl %edi, %edi
movl %r15d, %esi
xorl %edx, %edx
jmp 0x4023db
movl 0x1954e1(%rip), %ecx    # 0x5977fc
movq $0x597850, %rax         # imm = 0x597850
movl (%rax), %r8d
xorl %edi, %edi
movl %r15d, %esi
xorl %edx, %edx
jmp 0x402363
movl 0x1954c8(%rip), %ecx    # 0x5977fc
movq $0x597850, %rax         # imm = 0x597850
movl (%rax), %r8d
xorl %edi, %edi
movl %r15d, %esi
movl %r15d, %edx
jmp 0x4023db
movl 0x1954ab(%rip), %ecx    # 0x5977fc
movq $0x597850, %rax         # imm = 0x597850
movl (%rax), %r8d
xorl %edi, %edi
movl %r15d, %esi
movl %r15d, %edx
movl $0x3e8, %r9d            # imm = 0x3E8
jmp 0x4023de
movl 0x19548b(%rip), %eax    # 0x5977fc
cltd
pushq $0x64
popq %rcx
idivl %ecx
movq $0x597850, %rcx         # imm = 0x597850
movl (%rcx), %r8d
movl %r15d, %edi
movl %r15d, %esi
jmp 0x4023a4
movl 0x19546d(%rip), %eax    # 0x5977fc
cltd
pushq $0x64
popq %rcx
idivl %ecx
movq $0x597850, %rcx         # imm = 0x597850
movl (%rcx), %r8d
movl %r15d, %edi
xorl %esi, %esi
xorl %edx, %edx
movl %eax, %ecx
jmp 0x4023db
movl 0x19544c(%rip), %eax    # 0x5977fc
cltd
movl $0x3e8, %ecx            # imm = 0x3E8
idivl %ecx
xorl %edi, %edi
movl %r15d, %esi
jmp 0x4023d1
movl 0x195437(%rip), %eax    # 0x5977fc
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 %r15d, %r9d
callq 0x402897
movq 0x195406(%rip), %rdi    # 0x5977f0
callq 0x402bcc
callq 0x46ad54
movq %rax, %xmm1
punpckldq 0x135c0f(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x135c17(%rip), %xmm1   # 0x538020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x135c13(%rip), %xmm0   # 0x538030
movl 0x1953c5(%rip), %eax    # 0x5977e8
testl %eax, %eax
jg 0x402434
movl $0x1, 0x1953b7(%rip)    # 0x5977e8
movl %r15d, %eax
movq 0x1953cd(%rip), %rbp    # 0x597808
testq %rbp, %rbp
jle 0x4024d1
pushq $0x64
popq %rdi
movapd %xmm0, 0x10(%rsp)
callq 0x495830
movq %rax, %r12
movq %rax, %rdi
callq 0x401100
cvtsi2sd %rbp, %xmm0
mulsd 0x135bde(%rip), %xmm0   # 0x538048
movapd 0x10(%rsp), %xmm1
subsd 0x1953c0(%rip), %xmm1   # 0x597838
divsd %xmm1, %xmm0
movq %r12, %rdi
movq %rax, %rsi
leaq 0x135fe6(%rip), %rdx    # 0x53846f
movb $0x1, %al
callq 0x474e90
movq 0x195399(%rip), %rbp    # 0x597830
testq %rbp, %rbp
je 0x4024bc
cmpb $0x0, (%rbp)
jne 0x4024bc
movq %r12, %rdi
callq 0x401100
movw $0x20, (%r12,%rax)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x401068
movq %r12, 0x19536d(%rip)    # 0x597830
movl 0x19531f(%rip), %eax    # 0x5977e8
movapd 0x10(%rsp), %xmm0
jmp 0x4024d8
movq 0x195358(%rip), %r12    # 0x597830
movq $0x5956a8, %rcx         # imm = 0x5956A8
movq (%rcx), %rdi
subsd 0x19534e(%rip), %xmm0   # 0x597838
mulsd 0x135b46(%rip), %xmm0   # 0x538038
movq %r14, %r8
movq %r14, %rcx
testq %r12, %r12
je 0x402510
cmpb $0x0, (%r12)
leaq 0x13e707(%rip), %rcx    # 0x540c10
cmoveq %r14, %rcx
movq %r12, %r8
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
leaq 0x135f5b(%rip), %rsi    # 0x53847a
movq %r13, %rdx
movb $0x1, %al
callq 0x474dd0
movq $0x597855, %rax         # imm = 0x597855
cmpb $0x1, (%rax)
jne 0x40254b
movq $0x5956b0, %rax         # imm = 0x5956B0
movq (%rax), %rdi
leaq 0x19528a(%rip), %rsi    # 0x5977d0
callq 0x403d0a
movq $0x597854, %rax         # imm = 0x597854
cmpb $0x1, (%rax)
movq $0x5956a8, %r13         # imm = 0x5956A8
je 0x40257f
movq $0x5956b0, %rax         # imm = 0x5956B0
movq (%rax), %rdi
callq 0x483510
movq (%r13), %rdi
callq 0x483510
jmp 0x40211e
xorl %edi, %edi
jmp 0x4025a8
movq (%r13), %r12
leaq 0x194d4e(%rip), %rdi    # 0x5972d8
callq 0x402f5c
movq %r12, %rdi
leaq 0x135f00(%rip), %rsi    # 0x538499
movq %rax, %rdx
xorl %eax, %eax
callq 0x474dd0
jmp 0x40255e
movl %r15d, %edi
movl %r15d, %esi
callq 0x402be8
jmp 0x4023ef
movl 0x195245(%rip), %ebp    # 0x597800
movl %ebp, %eax
cltd
movl $0x3e8, %ecx            # imm = 0x3E8
idivl %ecx
movl %eax, 0x195235(%rip)    # 0x597800
movl %r15d, %edi
movl %r15d, %esi
callq 0x402be8
movl %ebp, 0x195224(%rip)    # 0x597800
jmp 0x4023ef
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq