#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ _accept_step(double, double);
double _square(double);
double exp(int);
double gengam(double, double);
scalar_t__ is_positive(double);
double log(double);
int snorm();
double sqrt(double);
double _update_step(double v0, double v1, double v2, double c0, double c1,
                    double c2, int random_walk_stepsize) {
  double a = c1 + c2 - c0;
  double b = (c1 - c0) * v2 + (c2 - c0) * v1;
  double c = -c0 * v1 * v2;
  double v_bar = 0.5 * (-b + sqrt(b * b - 4 * a * c)) / a;
  double h =
      c1 / _square(v_bar + v1) + c2 / _square(v_bar + v2) - c0 / _square(v_bar);
  double k = -h * v_bar * v_bar;
  double theta = -1.0 / (h * v_bar);
  double log_v0 = log(v0);
  double v0_new = 0.0;
  double log_v0_new = 0.0;
  double log_prob_old = 0.0;
  double log_prob_new = 0.0;
  if (is_positive(k) && is_positive(theta)) {
    v0_new = gengam(1.0 / theta, k);
    log_v0_new = log(v0_new);
    if (is_positive(v0_new)) {
      if (v0 == 0) {
        v0 = v0_new;
        log_v0 = log_v0_new;
      } else {
        log_prob_new = (c0 - 1) * log_v0_new - c1 * log(v0_new + v1) -
                       c2 * log(v0_new + v2);
        log_prob_new -= (k - 1) * log_v0_new - v0_new / theta;
        log_prob_old =
            (c0 - 1) * log_v0 - c1 * log(v0 + v1) - c2 * log(v0 + v2);
        log_prob_old -= (k - 1) * log_v0 - v0 / theta;
        if (_accept_step(log_prob_old, log_prob_new)) {
          v0 = v0_new;
          log_v0 = log_v0_new;
        }
      }
    }
  }
  v0_new = v0 * exp(random_walk_stepsize * snorm());
  log_v0_new = log(v0_new);
  if (is_positive(v0_new)) {
    if (v0 == 0) {
      v0 = v0_new;
      log_v0 = log_v0_new;
    } else {
      log_prob_new =
          c0 * log_v0_new - c1 * log(v0_new + v1) - c2 * log(v0_new + v2);
      log_prob_old = c0 * log_v0 - c1 * log(v0 + v1) - c2 * log(v0 + v2);
      if (_accept_step(log_prob_old, log_prob_new)) {
        v0 = v0_new;
        log_v0 = log_v0_new;
      }
    }
  }
  return v0;
}


x86 assembly (clang, -O0):
<_update_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
mov    %edi,-0x34(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0xdc4(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1090 <sqrt@plt>
movsd  -0xc8(%rbp),%xmm1
ff
addsd  %xmm0,%xmm1
movsd  0xd7a(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1050 <_square@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1050 <_square@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xb0(%rbp),%xmm0
ff
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
call   1050 <_square@plt>
movsd  -0xa8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xa0(%rbp),%xmm0
ff
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
movsd  0xc7e(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1070 <log@plt>
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
call   10a0 <is_positive@plt>
cmp    $0x0,%rax
je     170e <_update_step+0x58e>
movsd  -0x70(%rbp),%xmm0
call   10a0 <is_positive@plt>
cmp    $0x0,%rax
je     170e <_update_step+0x58e>
movsd  0xc25(%rip),%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
call   1040 <gengam@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
call   1070 <log@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   10a0 <is_positive@plt>
cmp    $0x0,%rax
je     1709 <_update_step+0x589>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1461 <_update_step+0x2e1>
jp     1461 <_update_step+0x2e1>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
jmp    1704 <_update_step+0x584>
movsd  -0x20(%rbp),%xmm0
movsd  0xbaa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1070 <log@plt>
movsd  -0x118(%rbp),%xmm1
ff
movsd  -0x110(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x108(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1070 <log@plt>
movsd  -0x100(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xf8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm1
movsd  0xac9(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  0xa73(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1070 <log@plt>
movsd  -0xf0(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1070 <log@plt>
movsd  -0xd8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x68(%rbp),%xmm1
movsd  0x995(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
call   1080 <_accept_step@plt>
cmp    $0x0,%rax
je     16ff <_update_step+0x57f>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
jmp    1704 <_update_step+0x584>
jmp    1709 <_update_step+0x589>
jmp    170e <_update_step+0x58e>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
mov    -0x34(%rbp),%eax
mov    %eax,-0x124(%rbp)
mov    $0x0,%al
call   1030 <snorm@plt>
mov    -0x124(%rbp),%edi
imul   %eax,%edi
call   1060 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
call   1070 <log@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   10a0 <is_positive@plt>
cmp    $0x0,%rax
je     198e <_update_step+0x80e>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    17a7 <_update_step+0x627>
jp     17a7 <_update_step+0x627>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
jmp    1989 <_update_step+0x809>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1070 <log@plt>
movsd  -0x178(%rbp),%xmm1
ff
movsd  -0x170(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x168(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1070 <log@plt>
movsd  -0x160(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x158(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1070 <log@plt>
movsd  -0x150(%rbp),%xmm1
ff
movsd  -0x148(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x140(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1070 <log@plt>
movsd  -0x138(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x130(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
call   1080 <_accept_step@plt>
cmp    $0x0,%rax
je     1984 <_update_step+0x804>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
jmp    1989 <_update_step+0x809>
jmp    198e <_update_step+0x80e>
movsd  -0x8(%rbp),%xmm0
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_update_step>:
push   %rbx
sub    $0xb0,%rsp
mov    %edi,%ebx
movsd  %xmm0,0x8(%rsp)
movapd %xmm4,%xmm6
addsd  %xmm5,%xmm6
subsd  %xmm3,%xmm6
movapd %xmm4,0x70(%rsp)
subsd  %xmm3,%xmm4
movsd  %xmm5,0x50(%rsp)
movapd %xmm5,%xmm0
subsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm4
addsd  %xmm0,%xmm4
movapd %xmm3,0x90(%rsp)
movapd %xmm3,%xmm0
movsd  %xmm1,0x40(%rsp)
mulsd  %xmm1,%xmm0
movsd  %xmm2,0x48(%rsp)
mulsd  %xmm2,%xmm0
movsd  0xe17(%rip),%xmm1
mulsd  %xmm6,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     120d <_update_step+0x8d>
sqrtsd %xmm0,%xmm0
jmp    122a <_update_step+0xaa>
movapd %xmm6,0x10(%rsp)
movapd %xmm4,0x20(%rsp)
call   1090 <sqrt@plt>
movapd 0x20(%rsp),%xmm4
movapd 0x10(%rsp),%xmm6
subsd  %xmm4,%xmm0
mulsd  0xdd2(%rip),%xmm0
divsd  %xmm6,%xmm0
movsd  %xmm0,0x10(%rsp)
addsd  0x40(%rsp),%xmm0
call   1050 <_square@plt>
movapd %xmm0,0x60(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0x48(%rsp),%xmm0
call   1050 <_square@plt>
movsd  0x50(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
call   1050 <_square@plt>
movapd 0x70(%rsp),%xmm1
unpcklpd 0x90(%rsp),%xmm1
movapd 0x60(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
divpd  %xmm2,%xmm1
movapd 0x20(%rsp),%xmm0
addsd  %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
subsd  %xmm1,%xmm0
movapd 0xd6c(%rip),%xmm1
movapd %xmm0,0x20(%rsp)
xorpd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,0x60(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <log@plt>
movsd  %xmm0,0x38(%rsp)
movapd 0x60(%rsp),%xmm0
call   10a0 <is_positive@plt>
test   %rax,%rax
je     14d1 <_update_step+0x351>
movsd  0x10(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  0xd05(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movapd %xmm1,%xmm0
call   10a0 <is_positive@plt>
test   %rax,%rax
je     14d1 <_update_step+0x351>
movsd  0xce9(%rip),%xmm0
divsd  0x20(%rsp),%xmm0
movapd 0x60(%rsp),%xmm1
call   1040 <gengam@plt>
movsd  %xmm0,0x10(%rsp)
call   1070 <log@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x10(%rsp),%xmm0
call   10a0 <is_positive@plt>
test   %rax,%rax
je     14d1 <_update_step+0x351>
xorpd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jne    137b <_update_step+0x1fb>
jnp    14b9 <_update_step+0x339>
movapd 0x90(%rsp),%xmm2
movsd  0xc84(%rip),%xmm1
addsd  %xmm1,%xmm2
movapd %xmm2,0x80(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
call   1070 <log@plt>
mulsd  0x70(%rsp),%xmm0
movapd 0x80(%rsp),%xmm1
mulsd  0x58(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,0xa0(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0x48(%rsp),%xmm0
call   1070 <log@plt>
mulsd  0x50(%rsp),%xmm0
movapd 0xa0(%rsp),%xmm2
subsd  %xmm0,%xmm2
movapd 0x60(%rsp),%xmm3
addsd  0xc12(%rip),%xmm3
movapd %xmm3,0x60(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
movsd  0x58(%rsp),%xmm1
mulsd  %xmm3,%xmm1
subsd  %xmm0,%xmm1
subsd  %xmm1,%xmm2
movapd %xmm2,0xa0(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
call   1070 <log@plt>
mulsd  0x70(%rsp),%xmm0
movapd 0x80(%rsp),%xmm1
mulsd  0x38(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,0x80(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0x48(%rsp),%xmm0
call   1070 <log@plt>
mulsd  0x50(%rsp),%xmm0
movapd 0x80(%rsp),%xmm2
subsd  %xmm0,%xmm2
movsd  0x8(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
movapd 0x60(%rsp),%xmm1
mulsd  0x38(%rsp),%xmm1
subsd  %xmm0,%xmm1
subsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
movapd 0xa0(%rsp),%xmm1
call   1080 <_accept_step@plt>
test   %rax,%rax
je     14d1 <_update_step+0x351>
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x58(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
xor    %eax,%eax
call   1030 <snorm@plt>
imul   %eax,%ebx
mov    %ebx,%edi
call   1060 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1070 <log@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
call   10a0 <is_positive@plt>
test   %rax,%rax
je     15ed <_update_step+0x46d>
xorpd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jne    1523 <_update_step+0x3a3>
jnp    15e5 <_update_step+0x465>
movsd  0x10(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
call   1070 <log@plt>
mulsd  0x70(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mulsd  0x90(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0x48(%rsp),%xmm0
call   1070 <log@plt>
mulsd  0x50(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x40(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
call   1070 <log@plt>
mulsd  0x70(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
mulsd  0x90(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x38(%rsp)
movsd  0x48(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
call   1070 <log@plt>
mulsd  0x50(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movsd  0x20(%rsp),%xmm1
call   1080 <_accept_step@plt>
movsd  0x8(%rsp),%xmm0
test   %rax,%rax
je     15f3 <_update_step+0x473>
movsd  0x10(%rsp),%xmm0
jmp    15f3 <_update_step+0x473>
movsd  0x8(%rsp),%xmm0
add    $0xb0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @_update_step(double %0, double %1, double %2, double %3, double %4, double %5, i32 %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store i32 %6, i32* %14
%27 = load double, double* %12
%28 = load double, double* %13
%29 = fadd double %27, %28
%30 = load double, double* %11
%31 = fsub double %29, %30
store double %31, double* %15
%32 = load double, double* %12
%33 = load double, double* %11
%34 = fsub double %32, %33
%35 = load double, double* %10
%36 = load double, double* %13
%37 = load double, double* %11
%38 = fsub double %36, %37
%39 = load double, double* %9
%40 = fmul double %38, %39
%41 = call double @llvm.fmuladd.f64(double %34, double %35, double %40)
store double %41, double* %16
%42 = load double, double* %11
%43 = fneg double %42
%44 = load double, double* %9
%45 = fmul double %43, %44
%46 = load double, double* %10
%47 = fmul double %45, %46
store double %47, double* %17
%48 = load double, double* %16
%49 = fneg double %48
%50 = load double, double* %16
%51 = load double, double* %16
%52 = load double, double* %15
%53 = fmul double 4.000000e+00, %52
%54 = load double, double* %17
%55 = fmul double %53, %54
%56 = fneg double %55
%57 = call double @llvm.fmuladd.f64(double %50, double %51, double %56)
%58 = call double @sqrt(double %57)
%59 = fadd double %49, %58
%60 = fmul double 5.000000e-01, %59
%61 = load double, double* %15
%62 = fdiv double %60, %61
store double %62, double* %18
%63 = load double, double* %12
%64 = load double, double* %18
%65 = load double, double* %9
%66 = fadd double %64, %65
%67 = call double @_square(double %66)
%68 = fdiv double %63, %67
%69 = load double, double* %13
%70 = load double, double* %18
%71 = load double, double* %10
%72 = fadd double %70, %71
%73 = call double @_square(double %72)
%74 = fdiv double %69, %73
%75 = fadd double %68, %74
%76 = load double, double* %11
%77 = load double, double* %18
%78 = call double @_square(double %77)
%79 = fdiv double %76, %78
%80 = fsub double %75, %79
store double %80, double* %19
%81 = load double, double* %19
%82 = fneg double %81
%83 = load double, double* %18
%84 = fmul double %82, %83
%85 = load double, double* %18
%86 = fmul double %84, %85
store double %86, double* %20
%87 = load double, double* %19
%88 = load double, double* %18
%89 = fmul double %87, %88
%90 = fdiv double -1.000000e+00, %89
store double %90, double* %21
%91 = load double, double* %8
%92 = call double @log(double %91)
store double %92, double* %22
store double 0.000000e+00, double* %23
store double 0.000000e+00, double* %24
store double 0.000000e+00, double* %25
store double 0.000000e+00, double* %26
%93 = load double, double* %20
%94 = call i64 @is_positive(double %93)
%95 = icmp ne i64 %94, 0
br i1 %95, label %96, label %183
96: ; preds = %7
%97 = load double, double* %21
%98 = call i64 @is_positive(double %97)
%99 = icmp ne i64 %98, 0
br i1 %99, label %100, label %183
100: ; preds = %96
%101 = load double, double* %21
%102 = fdiv double 1.000000e+00, %101
%103 = load double, double* %20
%104 = call double @gengam(double %102, double %103)
store double %104, double* %23
%105 = load double, double* %23
%106 = call double @log(double %105)
store double %106, double* %24
%107 = load double, double* %23
%108 = call i64 @is_positive(double %107)
%109 = icmp ne i64 %108, 0
br i1 %109, label %110, label %182
110: ; preds = %100
%111 = load double, double* %8
%112 = fcmp oeq double %111, 0.000000e+00
br i1 %112, label %113, label %116
113: ; preds = %110
%114 = load double, double* %23
store double %114, double* %8
%115 = load double, double* %24
store double %115, double* %22
br label %181
116: ; preds = %110
%117 = load double, double* %11
%118 = fsub double %117, 1.000000e+00
%119 = load double, double* %24
%120 = load double, double* %12
%121 = load double, double* %23
%122 = load double, double* %9
%123 = fadd double %121, %122
%124 = call double @log(double %123)
%125 = fmul double %120, %124
%126 = fneg double %125
%127 = call double @llvm.fmuladd.f64(double %118, double %119, double %126)
%128 = load double, double* %13
%129 = load double, double* %23
%130 = load double, double* %10
%131 = fadd double %129, %130
%132 = call double @log(double %131)
%133 = fneg double %128
%134 = call double @llvm.fmuladd.f64(double %133, double %132, double %127)
store double %134, double* %26
%135 = load double, double* %20
%136 = fsub double %135, 1.000000e+00
%137 = load double, double* %24
%138 = load double, double* %23
%139 = load double, double* %21
%140 = fdiv double %138, %139
%141 = fneg double %140
%142 = call double @llvm.fmuladd.f64(double %136, double %137, double %141)
%143 = load double, double* %26
%144 = fsub double %143, %142
store double %144, double* %26
%145 = load double, double* %11
%146 = fsub double %145, 1.000000e+00
%147 = load double, double* %22
%148 = load double, double* %12
%149 = load double, double* %8
%150 = load double, double* %9
%151 = fadd double %149, %150
%152 = call double @log(double %151)
%153 = fmul double %148, %152
%154 = fneg double %153
%155 = call double @llvm.fmuladd.f64(double %146, double %147, double %154)
%156 = load double, double* %13
%157 = load double, double* %8
%158 = load double, double* %10
%159 = fadd double %157, %158
%160 = call double @log(double %159)
%161 = fneg double %156
%162 = call double @llvm.fmuladd.f64(double %161, double %160, double %155)
store double %162, double* %25
%163 = load double, double* %20
%164 = fsub double %163, 1.000000e+00
%165 = load double, double* %22
%166 = load double, double* %8
%167 = load double, double* %21
%168 = fdiv double %166, %167
%169 = fneg double %168
%170 = call double @llvm.fmuladd.f64(double %164, double %165, double %169)
%171 = load double, double* %25
%172 = fsub double %171, %170
store double %172, double* %25
%173 = load double, double* %25
%174 = load double, double* %26
%175 = call i64 @_accept_step(double %173, double %174)
%176 = icmp ne i64 %175, 0
br i1 %176, label %177, label %180
177: ; preds = %116
%178 = load double, double* %23
store double %178, double* %8
%179 = load double, double* %24
store double %179, double* %22
br label %180
180: ; preds = %177, %116
br label %181
181: ; preds = %180, %113
br label %182
182: ; preds = %181, %100
br label %183
183: ; preds = %182, %96, %7
%184 = load double, double* %8
%185 = load i32, i32* %14
%186 = call i32 (...) @snorm()
%187 = mul nsw i32 %185, %186
%188 = call double @exp(i32 %187)
%189 = fmul double %184, %188
store double %189, double* %23
%190 = load double, double* %23
%191 = call double @log(double %190)
store double %191, double* %24
%192 = load double, double* %23
%193 = call i64 @is_positive(double %192)
%194 = icmp ne i64 %193, 0
br i1 %194, label %195, label %245
195: ; preds = %183
%196 = load double, double* %8
%197 = fcmp oeq double %196, 0.000000e+00
br i1 %197, label %198, label %201
198: ; preds = %195
%199 = load double, double* %23
store double %199, double* %8
%200 = load double, double* %24
store double %200, double* %22
br label %244
201: ; preds = %195
%202 = load double, double* %11
%203 = load double, double* %24
%204 = load double, double* %12
%205 = load double, double* %23
%206 = load double, double* %9
%207 = fadd double %205, %206
%208 = call double @log(double %207)
%209 = fmul double %204, %208
%210 = fneg double %209
%211 = call double @llvm.fmuladd.f64(double %202, double %203, double %210)
%212 = load double, double* %13
%213 = load double, double* %23
%214 = load double, double* %10
%215 = fadd double %213, %214
%216 = call double @log(double %215)
%217 = fneg double %212
%218 = call double @llvm.fmuladd.f64(double %217, double %216, double %211)
store double %218, double* %26
%219 = load double, double* %11
%220 = load double, double* %22
%221 = load double, double* %12
%222 = load double, double* %8
%223 = load double, double* %9
%224 = fadd double %222, %223
%225 = call double @log(double %224)
%226 = fmul double %221, %225
%227 = fneg double %226
%228 = call double @llvm.fmuladd.f64(double %219, double %220, double %227)
%229 = load double, double* %13
%230 = load double, double* %8
%231 = load double, double* %10
%232 = fadd double %230, %231
%233 = call double @log(double %232)
%234 = fneg double %229
%235 = call double @llvm.fmuladd.f64(double %234, double %233, double %228)
store double %235, double* %25
%236 = load double, double* %25
%237 = load double, double* %26
%238 = call i64 @_accept_step(double %236, double %237)
%239 = icmp ne i64 %238, 0
br i1 %239, label %240, label %243
240: ; preds = %201
%241 = load double, double* %23
store double %241, double* %8
%242 = load double, double* %24
store double %242, double* %22
br label %243
243: ; preds = %240, %201
br label %244
244: ; preds = %243, %198
br label %245
245: ; preds = %244, %183
%246 = load double, double* %8
ret double %246
}

LLVM IR (-O2):
define double @_update_step(double %0, double %1, double %2, double %3, double %4, double %5, i32 %6) {
%8 = fadd double %4, %5
%9 = fsub double %8, %3
%10 = fsub double %4, %3
%11 = fsub double %5, %3
%12 = fmul double %11, %1
%13 = tail call double @llvm.fmuladd.f64(double %10, double %2, double %12)
%14 = fneg double %3
%15 = fmul double %14, %1
%16 = fmul double %15, %2
%17 = fmul double %9, -4.000000e+00
%18 = fmul double %16, %17
%19 = tail call double @llvm.fmuladd.f64(double %13, double %13, double %18)
%20 = tail call double @sqrt(double %19)
%21 = fsub double %20, %13
%22 = fmul double %21, 5.000000e-01
%23 = fdiv double %22, %9
%24 = fadd double %23, %1
%25 = tail call double @_square(double %24)
%26 = fadd double %23, %2
%27 = tail call double @_square(double %26)
%28 = fdiv double %5, %27
%29 = tail call double @_square(double %23)
%30 = insertelement <2 x double> poison, double %4, i64 0
%31 = insertelement <2 x double> %30, double %3, i64 1
%32 = insertelement <2 x double> poison, double %25, i64 0
%33 = insertelement <2 x double> %32, double %29, i64 1
%34 = fdiv <2 x double> %31, %33
%35 = extractelement <2 x double> %34, i64 0
%36 = fadd double %35, %28
%37 = extractelement <2 x double> %34, i64 1
%38 = fsub double %36, %37
%39 = fneg double %38
%40 = fmul double %23, %39
%41 = fmul double %23, %40
%42 = fmul double %23, %38
%43 = fdiv double -1.000000e+00, %42
%44 = tail call double @log(double %0)
%45 = tail call i64 @is_positive(double %41)
%46 = icmp eq i64 %45, 0
br i1 %46, label %90, label %47
47: ; preds = %7
%48 = tail call i64 @is_positive(double %43)
%49 = icmp eq i64 %48, 0
br i1 %49, label %90, label %50
50: ; preds = %47
%51 = fdiv double 1.000000e+00, %43
%52 = tail call double @gengam(double %51, double %41)
%53 = tail call double @log(double %52)
%54 = tail call i64 @is_positive(double %52)
%55 = icmp eq i64 %54, 0
br i1 %55, label %90, label %56
56: ; preds = %50
%57 = fcmp oeq double %0, 0.000000e+00
br i1 %57, label %90, label %58
58: ; preds = %56
%59 = fadd double %3, -1.000000e+00
%60 = fadd double %52, %1
%61 = tail call double @log(double %60)
%62 = fneg double %61
%63 = fmul double %62, %4
%64 = tail call double @llvm.fmuladd.f64(double %59, double %53, double %63)
%65 = fadd double %52, %2
%66 = tail call double @log(double %65)
%67 = fneg double %5
%68 = tail call double @llvm.fmuladd.f64(double %67, double %66, double %64)
%69 = fadd double %41, -1.000000e+00
%70 = fneg double %52
%71 = fdiv double %70, %43
%72 = tail call double @llvm.fmuladd.f64(double %69, double %53, double %71)
%73 = fsub double %68, %72
%74 = fadd double %0, %1
%75 = tail call double @log(double %74)
%76 = fneg double %75
%77 = fmul double %76, %4
%78 = tail call double @llvm.fmuladd.f64(double %59, double %44, double %77)
%79 = fadd double %0, %2
%80 = tail call double @log(double %79)
%81 = tail call double @llvm.fmuladd.f64(double %67, double %80, double %78)
%82 = fneg double %0
%83 = fdiv double %82, %43
%84 = tail call double @llvm.fmuladd.f64(double %69, double %44, double %83)
%85 = fsub double %81, %84
%86 = tail call i64 @_accept_step(double %85, double %73)
%87 = icmp eq i64 %86, 0
%88 = select i1 %87, double %0, double %52
%89 = select i1 %87, double %44, double %53
br label %90
90: ; preds = %58, %56, %50, %47, %7
%91 = phi double [ %0, %50 ], [ %0, %47 ], [ %0, %7 ], [ %52, %56 ], [ %88, %58 ]
%92 = phi double [ %44, %50 ], [ %44, %47 ], [ %44, %7 ], [ %53, %56 ], [ %89, %58 ]
%93 = tail call i32 (...) @snorm()
%94 = mul nsw i32 %93, %6
%95 = tail call double @exp(i32 %94)
%96 = fmul double %91, %95
%97 = tail call double @log(double %96)
%98 = tail call i64 @is_positive(double %96)
%99 = icmp eq i64 %98, 0
br i1 %99, label %123, label %100
100: ; preds = %90
%101 = fcmp oeq double %91, 0.000000e+00
br i1 %101, label %123, label %102
102: ; preds = %100
%103 = fadd double %96, %1
%104 = tail call double @log(double %103)
%105 = fneg double %104
%106 = fmul double %105, %4
%107 = tail call double @llvm.fmuladd.f64(double %3, double %97, double %106)
%108 = fadd double %96, %2
%109 = tail call double @log(double %108)
%110 = fneg double %5
%111 = tail call double @llvm.fmuladd.f64(double %110, double %109, double %107)
%112 = fadd double %91, %1
%113 = tail call double @log(double %112)
%114 = fneg double %113
%115 = fmul double %114, %4
%116 = tail call double @llvm.fmuladd.f64(double %3, double %92, double %115)
%117 = fadd double %91, %2
%118 = tail call double @log(double %117)
%119 = tail call double @llvm.fmuladd.f64(double %110, double %118, double %116)
%120 = tail call i64 @_accept_step(double %119, double %111)
%121 = icmp eq i64 %120, 0
%122 = select i1 %121, double %91, double %96
br label %123
123: ; preds = %102, %100, %90
%124 = phi double [ %91, %90 ], [ %96, %100 ], [ %122, %102 ]
ret double %124
}