// File: /workspace/github_cpp_makefile_star2_O3/redpony[P]cpyp/crp_test.cc
// Function: test_mh2()
void test_mh2() {
  cpyp::MT19937 eng;
  cpyp::crp<int> a(0.5, 1.0);
  cpyp::crp<int> b(0.5, 1.0);
  vector<int> hist_a(16, 0);
  vector<int> hist_b(16, 0);
  vector<double> ref_a = {3.70004e-06, 0.0144611, 0.0614236, 0.138702, 0.211308, 0.231733, 0.183865, 0.103685, 0.0409419, 0.0114253, 0.00214592, 0.000281003, 2.33002e-05, 7.00007e-07, 2.12303e-07, 0};
  vector<double> ref_b = {2.90003e-06, 0.00876079, 0.0471061, 0.115841, 0.187615, 0.221488, 0.196102, 0.130352, 0.063905, 0.0224984, 0.00542085, 0.000828908, 7.53008e-05, 4.90005e-06, 1.00001e-07, 0};
  double ref_t0b = 1.53498;

  vector<bool> z(15);
  double c = 0;
  double ac = 0;
  double tmh = 0;
  double zz = 0;
  double t0b = 0;
  for (int s = 0; s < 200000; ++s) {
    for (int i = 0; i < 15; ++i) {
      const unsigned int y_i = i % 3;
      const bool old_z = z[i];
      cpyp::crp<int> old_a = a;
      cpyp::crp<int> old_b = b;
      double lp_old = llh(a, p0_a) + llh(b, p0_b);

      double lq_old = 0;
      double lq_new = 0;
      if (s > 0) (z[i] ? b : a).decrement(y_i, eng, &lq_old);

      double aa = 0.5;  // these can be better estimates
      double bb = 0.5;
      z[i] = cpyp::sample_bernoulli(aa, bb, eng);
      (z[i] ? b : a).increment_no_base(y_i, eng, &lq_new);
      lq_new += log((z[i] ? bb : aa) / (aa + bb));
      lq_old += log((old_z ? bb : aa) / (aa + bb));

      if (s > 0) { 
        double lp_new = llh(a, p0_a) + llh(b, p0_b);
        double acc = exp(lp_new - lp_old + lq_old - lq_new);
        ++tmh;
        if (acc >= 1.0 || cpyp::sample_uniform01<double>(eng) < acc) { // mh accept
          ++ac;
        } else { // mh reject
          std::swap(a, old_a);
          std::swap(b, old_b);
          z[i] = old_z;
        }
      }
    }
    // record sample
    if (s> 200 && s % 10 == 9) {
      assert(a.num_tables() < hist_a.size());
      assert(b.num_tables() < hist_b.size());
      hist_a[a.num_tables()]++; hist_b[b.num_tables()]++; ++c;
      for (int i = 0; i < 15; ++i) {
        unsigned int y_i = i % 3;
        if (!z[i]) { t0b += y_i; ++zz; }
      }
    }
  }
  ac /= tmh;
  cerr << "ACCEPTANCE: " << ac << endl;
  int j =0;
  double te = 0;
  double me = 0;
  for (int i = 0; i < 15; ++i) {
    double a = hist_a[i];
    double b = hist_b[i];
    double err_a = (a / c - ref_a[j]);
    double err_b = (b / c - ref_b[j++]);
    cerr << err_a << "\t" << err_b << endl;
    te += fabs(err_a) + fabs(err_b);
    if (fabs(err_a) > me) { me = fabs(err_a); }
    if (fabs(err_b) > me) { me = fabs(err_b); }
  }
  te /= 30;
  cerr << "t0b = " << (t0b / zz) << endl;
  double ee = fabs((t0b / zz) - ref_t0b);
  cerr << "err t0b = " << ee;
  if (ee > 0.01) { cerr << "  ** TOO HIGH **"; }
  cerr << endl;
  cerr << "Average error: " << te;
  if (te > 0.01) { cerr << "  ** TOO HIGH **"; }
  cerr << endl << "    Max error: " << me;
  if (me > 0.01) { cerr << "  ** TOO HIGH **"; }
  cerr << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1718, %rsp           # imm = 0x1718
leaq 0x390(%rsp), %rdi
callq 0x4bf4
leaq 0x2a0(%rsp), %rdi
movsd 0x5d9d(%rip), %xmm0     # 0x9008
movsd 0x5d9d(%rip), %xmm1     # 0x9010
callq 0x4cb0
leaq 0x1a8(%rsp), %rdi
movsd 0x5d80(%rip), %xmm0     # 0x9008
movsd 0x5d80(%rip), %xmm1     # 0x9010
callq 0x4cb0
movl $0x40, %edi
callq 0x21b0
xorpd %xmm0, %xmm0
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movq %rax, 0x8(%rsp)
movupd %xmm0, (%rax)
movl $0x40, %edi
callq 0x21b0
xorpd %xmm0, %xmm0
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movq %rax, (%rsp)
movupd %xmm0, (%rax)
leaq 0x5f09(%rip), %rsi      # 0x91f0
leaq 0x220(%rsp), %rax
movl $0x10, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x118(%rsp), %rdi
leaq 0x130(%rsp), %rcx
movl $0x10, %edx
movq %rax, %rsi
callq 0x4c72
leaq 0x5f52(%rip), %rsi      # 0x9270
leaq 0x220(%rsp), %rax
movl $0x10, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x100(%rsp), %rdi
leaq 0x130(%rsp), %rcx
movl $0x10, %edx
movq %rax, %rsi
callq 0x4c72
leaq 0x220(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x88(%rsp), %rdi
leaq 0x130(%rsp), %rcx
movl $0xf, %esi
callq 0x7a14
leaq 0x138(%rsp), %r14
leaq 0x2a8(%rsp), %rbp
xorl %r15d, %r15d
xorpd %xmm0, %xmm0
movapd %xmm0, 0x60(%rsp)
leaq 0x390(%rsp), %r13
movapd %xmm0, 0xc0(%rsp)
movapd %xmm0, 0xd0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movapd %xmm0, 0x20(%rsp)
xorl %r12d, %r12d
xorl %ecx, %ecx
movl %r12d, 0x30(%rsp)
movq 0x88(%rsp), %rax
movl $0x1, %edx
movq %rcx, 0x70(%rsp)
shlq %cl, %rdx
movq %rdx, 0x40(%rsp)
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0x2a0(%rsp), %rax
movq 0x2b0(%rsp), %rcx
movq %rax, 0x130(%rsp)
movq %r15, 0x138(%rsp)
movq %rcx, 0x140(%rsp)
movq %r15, 0x148(%rsp)
movq 0x2c0(%rsp), %rax
movq %rax, 0x150(%rsp)
movups 0x20(%rbp), %xmm0
movups %xmm0, 0x20(%r14)
movq %r15, 0x168(%rsp)
movq %r14, 0x220(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movq %rbp, %rbx
leaq 0x220(%rsp), %rbp
movq %rbp, %rdx
callq 0x5a68
movq %r13, %r12
movq 0x68(%rbx), %rax
movq %rax, 0x68(%r14)
movups 0x38(%rbx), %xmm0
movupd 0x48(%rbx), %xmm1
movq %rbx, %r13
movupd 0x58(%rbx), %xmm2
movupd %xmm2, 0x58(%r14)
movupd %xmm1, 0x48(%r14)
movups %xmm0, 0x38(%r14)
movq 0x1a8(%rsp), %rax
movq 0x1b8(%rsp), %rcx
movq %rax, 0x318(%rsp)
movq %r15, 0x320(%rsp)
movq %rcx, 0x328(%rsp)
movq %r15, 0x330(%rsp)
movq 0x1c8(%rsp), %rax
movq %rax, 0x338(%rsp)
leaq 0x1b0(%rsp), %rbx
movupd 0x20(%rbx), %xmm0
xorl %eax, %eax
leaq 0x320(%rsp), %r15
movupd %xmm0, 0x20(%r15)
movq %rax, 0x350(%rsp)
movq %r15, 0x220(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x5a68
movq %rbp, %r14
movq 0x68(%rbx), %rax
movq %rax, 0x68(%r15)
movupd 0x38(%rbx), %xmm0
movupd 0x48(%rbx), %xmm1
movupd 0x58(%rbx), %xmm2
movupd %xmm2, 0x58(%r15)
movupd %xmm1, 0x48(%r15)
movupd %xmm0, 0x38(%r15)
leaq 0x2a0(%rsp), %rdi
leaq 0x5db3(%rip), %rsi      # 0x92f0
callq 0x24b1
movsd %xmm0, 0x58(%rsp)
leaq 0x1a8(%rsp), %rdi
leaq 0x5db9(%rip), %rsi      # 0x9310
callq 0x24b1
movsd %xmm0, 0xf8(%rsp)
movq %r13, %rbx
movq 0x70(%rsp), %rdx
movl %edx, %eax
movl $0xaaaaaaab, %ecx       # imm = 0xAAAAAAAB
imulq %rcx, %rax
shrq $0x21, %rax
leal (%rax,%rax,2), %eax
movl %edx, %ebp
subl %eax, %ebp
xorl %r15d, %r15d
movq %r15, 0x18(%rsp)
movq %r15, 0x10(%rsp)
cmpl $0x0, 0x30(%rsp)
movq %r12, %r13
movq 0x40(%rsp), %r12
je 0x35d5
movq 0x88(%rsp), %rax
testq %r12, (%rax)
leaq 0x1a8(%rsp), %rdi
leaq 0x2a0(%rsp), %rax
cmoveq %rax, %rdi
movl %ebp, 0x220(%rsp)
movq %r14, %rsi
movq %r13, %rdx
leaq 0x18(%rsp), %rcx
callq 0x4d1a
movq %r13, %rdi
callq 0x770d
ucomisd 0x5a23(%rip), %xmm0     # 0x9008
movq 0x88(%rsp), %rax
jbe 0x35f7
movq (%rax), %rcx
orq %r12, %rcx
jmp 0x3600
movq %r12, %rcx
notq %rcx
andq (%rax), %rcx
movq %r12, %rdx
movl 0x30(%rsp), %r12d
movq %rcx, (%rax)
testq %rdx, %rcx
leaq 0x1a8(%rsp), %rdi
leaq 0x2a0(%rsp), %rax
cmoveq %rax, %rdi
movl %ebp, 0x220(%rsp)
movq %r14, %rsi
movq %r13, %rdx
leaq 0x10(%rsp), %rcx
callq 0x4fce
movsd 0x10(%rsp), %xmm0
movsd 0x59e1(%rip), %xmm1     # 0x9028
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
testl %r12d, %r12d
je 0x3734
leaq 0x2a0(%rsp), %rdi
leaq 0x5c77(%rip), %rsi      # 0x92f0
callq 0x24b1
movsd %xmm0, 0xf0(%rsp)
movq %rbx, %rbp
leaq 0x1a8(%rsp), %rdi
leaq 0x5c77(%rip), %rsi      # 0x9310
callq 0x24b1
movsd 0x58(%rsp), %xmm1
addsd 0xf8(%rsp), %xmm1
movsd 0xf0(%rsp), %xmm2
addsd %xmm0, %xmm2
subsd %xmm1, %xmm2
addsd 0x18(%rsp), %xmm2
subsd 0x10(%rsp), %xmm2
movapd %xmm2, %xmm0
callq 0x2280
movapd %xmm0, %xmm2
movsd 0x5931(%rip), %xmm0     # 0x9010
movapd 0xd0(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, 0xd0(%rsp)
movsd %xmm2, 0x58(%rsp)
ucomisd %xmm0, %xmm2
jae 0x3715
movq %r13, %rdi
callq 0x770d
movsd 0x58(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x373c
movapd 0xc0(%rsp), %xmm0
addsd 0x58ea(%rip), %xmm0     # 0x9010
movapd %xmm0, 0xc0(%rsp)
jmp 0x391e
movq %rbx, %rbp
jmp 0x391e
movq 0x2a0(%rsp), %rax
movq %rax, 0x220(%rsp)
leaq 0x228(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
movq %rbp, %rdx
callq 0x799e
movq 0x68(%rbp), %rax
movq %rax, 0x68(%r15)
movups 0x38(%rbp), %xmm0
movups 0x48(%rbp), %xmm1
movups 0x58(%rbp), %xmm2
movups %xmm2, 0x58(%r15)
movups %xmm1, 0x48(%r15)
movups %xmm0, 0x38(%r15)
movq 0x130(%rsp), %rax
movq %rax, 0x2a0(%rsp)
movq %rbp, %rdi
leaq 0x138(%rsp), %rbx
movq %rbx, %rsi
callq 0x22c0
movq 0x68(%rbx), %rax
movq %rax, 0x68(%rbp)
movups 0x38(%rbx), %xmm0
movups 0x48(%rbx), %xmm1
movups 0x58(%rbx), %xmm2
movups %xmm2, 0x58(%rbp)
movups %xmm1, 0x48(%rbp)
movups %xmm0, 0x38(%rbp)
movq 0x220(%rsp), %rax
movq %rax, 0x130(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22c0
movq 0x68(%r15), %rax
movq %rax, 0x68(%rbx)
movups 0x38(%r15), %xmm0
movups 0x48(%r15), %xmm1
movups 0x58(%r15), %xmm2
movups %xmm2, 0x58(%rbx)
movups %xmm1, 0x48(%rbx)
movups %xmm0, 0x38(%rbx)
movq %r15, %rdi
callq 0x5c7a
movq 0x1a8(%rsp), %rax
movq %rax, 0x220(%rsp)
leaq 0x228(%rsp), %r14
movq %r14, %rdi
leaq 0x1b0(%rsp), %rbx
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x799e
movq 0x68(%rbx), %rax
movq %rax, 0x68(%r15)
movups 0x38(%rbx), %xmm0
movups 0x48(%rbx), %xmm1
movups 0x58(%rbx), %xmm2
movups %xmm2, 0x58(%r15)
movups %xmm1, 0x48(%r15)
movups %xmm0, 0x38(%r15)
movq 0x318(%rsp), %rax
movq %rax, 0x1a8(%rsp)
movq %rbx, %rdi
leaq 0x320(%rsp), %r15
movq %r15, %rsi
callq 0x22c0
movq 0x68(%r15), %rax
movq %rax, 0x68(%rbx)
movups 0x38(%r15), %xmm0
movups 0x48(%r15), %xmm1
movups 0x58(%r15), %xmm2
movups %xmm2, 0x58(%rbx)
movups %xmm1, 0x48(%rbx)
movups %xmm0, 0x38(%rbx)
movq 0x220(%rsp), %rax
movq %rax, 0x318(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x22c0
leaq 0x228(%rsp), %rcx
movq 0x68(%rcx), %rax
movq %rax, 0x68(%r15)
movupd 0x38(%rcx), %xmm0
movupd 0x48(%rcx), %xmm1
movupd 0x58(%rcx), %xmm2
movupd %xmm2, 0x58(%r15)
movupd %xmm1, 0x48(%r15)
movupd %xmm0, 0x38(%r15)
movq %r14, %rdi
callq 0x5c7a
movq 0x88(%rsp), %rax
movq 0x40(%rsp), %rcx
testq %rcx, 0xe8(%rsp)
je 0x3915
orq %rcx, (%rax)
jmp 0x391b
notq %rcx
andq %rcx, (%rax)
xorl %r15d, %r15d
leaq 0x320(%rsp), %rdi
callq 0x5c7a
leaq 0x138(%rsp), %r14
movq %r14, %rdi
callq 0x5c7a
movq 0x70(%rsp), %rcx
incq %rcx
cmpq $0xf, %rcx
jne 0x33c3
cmpl $0xc9, %r12d
jb 0x3a27
movl %r12d, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rcx, %rax
shrq $0x23, %rax
addl %eax, %eax
leal (%rax,%rax,4), %eax
movl %r12d, %ecx
subl %eax, %ecx
cmpl $0x9, %ecx
jne 0x3a27
movl 0x2a0(%rsp), %eax
cmpq $0x10, %rax
jae 0x3e29
movl 0x1a8(%rsp), %ecx
cmpq $0x10, %rcx
jae 0x3e48
movq 0x8(%rsp), %rdx
incl (%rdx,%rax,4)
movq (%rsp), %rax
incl (%rax,%rcx,4)
movq 0x88(%rsp), %rax
movq (%rax), %rax
xorl %ecx, %ecx
btq %rcx, %rax
movapd 0xb0(%rsp), %xmm0
addsd 0x5640(%rip), %xmm0     # 0x9010
jb 0x3a0a
movzbl %cl, %edx
imull $0xab, %edx, %edx
shrl $0x9, %edx
leal (%rdx,%rdx,2), %edx
movl %ecx, %esi
subb %dl, %sil
movsbl %sil, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
movapd 0x20(%rsp), %xmm2
addsd %xmm1, %xmm2
movapd %xmm2, 0x20(%rsp)
movapd %xmm0, 0xb0(%rsp)
incq %rcx
cmpq $0xf, %rcx
jne 0x39bb
movapd 0x60(%rsp), %xmm0
addsd 0x55ef(%rip), %xmm0     # 0x9010
movapd %xmm0, 0x60(%rsp)
incl %r12d
cmpl $0x30d40, %r12d         # imm = 0x30D40
jne 0x33bc
movq 0x95b2(%rip), %rdi      # 0xcff0
leaq 0x5993(%rip), %rsi      # 0x93d8
movl $0xc, %edx
callq 0x21c0
movapd 0xc0(%rsp), %xmm0
divsd 0xd0(%rsp), %xmm0
movq 0x9588(%rip), %rdi      # 0xcff0
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movapd 0x60(%rsp), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movapd %xmm0, 0x60(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
xorl %r15d, %r15d
movq 0x9535(%rip), %rbx      # 0xcff0
leaq 0x5923(%rip), %r14      # 0x93e5
movapd %xmm0, 0x40(%rsp)
movq 0x118(%rsp), %rax
movq 0x100(%rsp), %rcx
movq (%rsp), %rdx
movss (%rdx,%r15,4), %xmm0
movq 0x8(%rsp), %rdx
movss (%rdx,%r15,4), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm0
divpd 0x60(%rsp), %xmm0
movsd (%rax,%r15,8), %xmm1
movhpd (%rcx,%r15,8), %xmm1    # xmm1 = xmm1[0],mem[0]
subpd %xmm1, %xmm0
movq %rbx, %rdi
movapd %xmm0, 0x70(%rsp)
callq 0x2230
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21c0
movapd 0x70(%rsp), %xmm0
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
movq %r13, %rdi
callq 0x2230
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
incq %r15
movdqa 0x70(%rsp), %xmm3
pand 0x5528(%rip), %xmm3     # 0x90a0
pshufd $0xee, %xmm3, %xmm0     # xmm0 = xmm3[2,3,2,3]
movdqa %xmm3, %xmm1
addsd %xmm0, %xmm1
movapd 0x40(%rsp), %xmm2
addsd %xmm1, %xmm2
movapd %xmm2, 0x40(%rsp)
maxsd 0x30(%rsp), %xmm3
maxsd %xmm3, %xmm0
movapd %xmm0, 0x30(%rsp)
cmpq $0xf, %r15
jne 0x3ac8
movq 0x943a(%rip), %rdi      # 0xcff0
leaq 0x58b9(%rip), %rsi      # 0x9476
movl $0x6, %edx
callq 0x21c0
movapd 0x20(%rsp), %xmm0
divsd 0xb0(%rsp), %xmm0
movq 0x9413(%rip), %rdi      # 0xcff0
movapd %xmm0, 0x20(%rsp)
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq 0x93d7(%rip), %rdi      # 0xcff0
leaq 0x5852(%rip), %rsi      # 0x9472
movl $0xa, %edx
callq 0x21c0
movapd 0x20(%rsp), %xmm0
addsd 0x5400(%rip), %xmm0     # 0x9038
andpd 0x5460(%rip), %xmm0     # 0x90a0
movapd %xmm0, 0x20(%rsp)
movq 0x93a3(%rip), %rbx      # 0xcff0
movq %rbx, %rdi
movaps 0x20(%rsp), %xmm0
callq 0x2230
movapd 0x20(%rsp), %xmm0
ucomisd 0x53b8(%rip), %xmm0     # 0x9020
jbe 0x3c82
movq 0x937f(%rip), %rdi      # 0xcff0
leaq 0x577f(%rip), %rsi      # 0x93f7
movl $0x10, %edx
callq 0x21c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq 0x9350(%rip), %rdi      # 0xcff0
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq 0x933c(%rip), %rdi      # 0xcff0
leaq 0x572c(%rip), %rsi      # 0x93e7
movl $0xf, %edx
callq 0x21c0
movapd 0x40(%rsp), %xmm0
divsd 0x535d(%rip), %xmm0     # 0x9030
movq 0x9316(%rip), %rbx      # 0xcff0
movq %rbx, %rdi
movapd %xmm0, 0x40(%rsp)
callq 0x2230
movapd 0x40(%rsp), %xmm0
ucomisd 0x532a(%rip), %xmm0     # 0x9020
jbe 0x3d10
movq 0x92f1(%rip), %rdi      # 0xcff0
leaq 0x56f1(%rip), %rsi      # 0x93f7
movl $0x10, %edx
callq 0x21c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq 0x92c2(%rip), %rbx      # 0xcff0
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq %rax, %r14
leaq 0x56c0(%rip), %rsi      # 0x9408
movl $0xf, %edx
movq %rax, %rdi
callq 0x21c0
movq %r14, %rdi
movapd 0x30(%rsp), %xmm0
callq 0x2230
movapd 0x30(%rsp), %xmm0
ucomisd 0x52af(%rip), %xmm0     # 0x9020
jbe 0x3d8b
movq 0x9276(%rip), %rdi      # 0xcff0
leaq 0x5676(%rip), %rsi      # 0x93f7
movl $0x10, %edx
callq 0x21c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq 0x9247(%rip), %rdi      # 0xcff0
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
leaq 0x1b0(%rsp), %rbx
je 0x3dd0
callq 0x2180
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x3de2
callq 0x2180
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x3df4
callq 0x2180
movq (%rsp), %rdi
callq 0x2180
movq 0x8(%rsp), %rdi
callq 0x2180
movq %rbx, %rdi
callq 0x5c7a
movq %rbp, %rdi
callq 0x5c7a
addq $0x1718, %rsp           # imm = 0x1718
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x55e8(%rip), %rdi      # 0x9418
leaq 0x5600(%rip), %rsi      # 0x9437
leaq 0x5605(%rip), %rcx      # 0x9443
movl $0xb7, %edx
callq 0x20e0
leaq 0x5604(%rip), %rdi      # 0x9453
leaq 0x55e1(%rip), %rsi      # 0x9437
leaq 0x55e6(%rip), %rcx      # 0x9443
movl $0xb8, %edx
callq 0x20e0
movq %rax, %r15
jmp 0x3f0d
movq %rax, %r15
jmp 0x3f1f
movq %rax, %r15
jmp 0x3f31
movq %rax, %r15
jmp 0x3f3a
movq %rax, %r15
jmp 0x3f44
movq %rax, %r15
jmp 0x3f51
jmp 0x3eba
jmp 0x3eba
jmp 0x3eba
jmp 0x3ea3
jmp 0x3ea3
jmp 0x3ea3
movq %rax, %rdi
callq 0x58fe
jmp 0x3eba
jmp 0x3ec1
jmp 0x3ec1
jmp 0x3ec1
jmp 0x3ec1
movq %rax, %r15
jmp 0x3ed1
movq %rax, %r15
jmp 0x3ede
jmp 0x3ec1
movq %rax, %r15
leaq 0x320(%rsp), %rdi
callq 0x5c7a
leaq 0x138(%rsp), %rdi
callq 0x5c7a
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x3f0d
callq 0x2180
xorl %eax, %eax
movq %rax, 0x88(%rsp)
movl $0x0, 0x90(%rsp)
movq %rax, 0x98(%rsp)
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x3f1f
callq 0x2180
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x3f31
callq 0x2180
movq (%rsp), %rdi
callq 0x2180
movq 0x8(%rsp), %rdi
callq 0x2180
leaq 0x1b0(%rsp), %rdi
callq 0x5c7a
leaq 0x2a8(%rsp), %rdi
callq 0x5c7a
movq %r15, %rdi
callq 0x2270