// File: romkatv[P]action-chain/src/action_chain_test.cc
// Function: romkatv::(anonymous namespace)::BenchmarkMain(int, char**)
int BenchmarkMain(int argc, char* argv[]) {
  Flags flags = ParseFlags(argv + 1, argv + argc);
  std::unordered_map<std::string, int (*)(const Flags&)> bm = {
      {"ActionChain", Benchmark<ActionChain>},
      {"ActionChainTLS", Benchmark<ActionChainTLS>},
      {"CriticalSection", Benchmark<CriticalSection>},
      {"Unsynchronized", Benchmark<Unsynchronized>},
  };
  CHECK(bm[flags.sync]);
  return bm[flags.sync](flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rsi
addq $0x8, %rsi
movslq -0x4(%rbp), %rcx
leaq (%rax,%rcx,8), %rdx
leaq -0x48(%rbp), %rdi
callq 0x3930
leaq -0x130(%rbp), %rdi
movq %rdi, -0x138(%rbp)
leaq 0x50d(%rip), %rax       # 0x3b20
movq %rax, -0x140(%rbp)
leaq 0x9b1f(%rip), %rsi      # 0xd140
leaq -0x140(%rbp), %rdx
callq 0x3f30
jmp 0x362f
leaq -0x108(%rbp), %rdi
movq %rdi, -0x138(%rbp)
leaq 0x96c(%rip), %rax       # 0x3fb0
movq %rax, -0x158(%rbp)
leaq 0x9afa(%rip), %rsi      # 0xd14c
leaq -0x158(%rbp), %rdx
callq 0x43c0
jmp 0x3660
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x138(%rbp)
leaq 0xdcb(%rip), %rax       # 0x4440
movq %rax, -0x160(%rbp)
leaq 0x9ad8(%rip), %rsi      # 0xd15b
leaq -0x160(%rbp), %rdx
callq 0x4850
jmp 0x3691
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x138(%rbp)
leaq 0x122a(%rip), %rax      # 0x48d0
movq %rax, -0x168(%rbp)
leaq 0x9ab7(%rip), %rsi      # 0xd16b
leaq -0x168(%rbp), %rdx
callq 0x43c0
jmp 0x36c2
leaq -0x130(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x4, -0x88(%rbp)
leaq -0x16b(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x4cf0
movq -0x178(%rbp), %rcx
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %rsp, %rax
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %ecx
leaq -0x80(%rbp), %rdi
leaq -0x169(%rbp), %r8
leaq -0x16a(%rbp), %r9
callq 0x4d10
jmp 0x3726
leaq -0x16b(%rbp), %rdi
callq 0x4d70
leaq -0x130(%rbp), %rax
movq %rax, -0x188(%rbp)
addq $0xa0, %rax
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x190(%rbp)
callq 0x4cd0
movq -0x188(%rbp), %rcx
movq -0x190(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x180(%rbp)
jne 0x374d
leaq -0x80(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4d90
movq %rax, -0x198(%rbp)
jmp 0x3794
movq -0x198(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x38c0
movq 0x10824(%rip), %rax     # 0x13fd0
movq (%rax), %rdi
leaq 0x99c4(%rip), %rsi      # 0xd17a
leaq 0x99ce(%rip), %rdx      # 0xd18b
movl $0xde, %ecx
leaq 0x99db(%rip), %r8       # 0xd1a4
movb $0x0, %al
callq 0x3320
callq 0x3140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x148(%rbp)
movl %eax, -0x14c(%rbp)
movq -0x138(%rbp), %rax
leaq -0x130(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1a0(%rbp)
je 0x3832
movq -0x1a0(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x4cd0
movq -0x1a8(%rbp), %rax
leaq -0x130(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1a0(%rbp)
jne 0x3801
jmp 0x3911
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x148(%rbp)
movl %eax, -0x14c(%rbp)
leaq -0x16b(%rbp), %rdi
callq 0x4d70
leaq -0x130(%rbp), %rax
movq %rax, -0x1b8(%rbp)
addq $0xa0, %rax
movq %rax, -0x1b0(%rbp)
movq -0x1b0(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x4cd0
movq -0x1b8(%rbp), %rcx
movq -0x1c0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1b0(%rbp)
jne 0x3870
jmp 0x3911
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x148(%rbp)
movl %eax, -0x14c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x4dc0
jmp 0x3911
jmp 0x38c2
leaq -0x80(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4d90
movq %rax, -0x1c8(%rbp)
jmp 0x38d8
movq -0x1c8(%rbp), %rax
movq (%rax), %rax
leaq -0x48(%rbp), %rdi
callq *%rax
movl %eax, -0x1cc(%rbp)
jmp 0x38f0
leaq -0x80(%rbp), %rdi
callq 0x4dc0
leaq -0x48(%rbp), %rdi
callq 0x4de0
movl -0x1cc(%rbp), %eax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x4de0
movq -0x148(%rbp), %rdi
callq 0x33d0
nopw %cs:(%rax,%rax)