// File: canzarlab[P]Trajan/geno/lineSearch.cpp
// Function: dcstep(double&, double&, double&, double&, double&, double&, double&, double, double, bool&, double, double)
void dcstep(double & stx,
            double & fx,
            double & dx,
            double & sty,
            double & fy,
            double & dy,
            double & stp,
            double fp,
            double dp,
            bool & brackt,
            double const stpmin,
            double const stpmax) {
  double const zero  = 0.0,
               p66   = 0.66,
               two   = 2.0,
               three = 3.0;
  double gamma, p, q, r, s, sgnd, stpc, stpf, stpq, theta;
  sgnd = dp * (dx / std::fabs(dx));
  if (fp > fx) {
    //    std::cout << "dcstep 1" << std::endl;
     theta = three * (fx - fp) / (stp - stx) + dx + dp;
     s = std::max(std::fabs(theta), std::max(std::fabs(dx), std::fabs(dp)));
     gamma = s * std::sqrt(std::pow(theta / s, 2) - (dx / s) * (dp / s));
     if (stp < stx) gamma = -gamma;
     p = (gamma - dx) + theta;
     q = ((gamma - dx) + gamma) + dp;
     r = p / q;
     stpc = stx + r*(stp - stx);
     stpq = stx + ((dx/((fx - fp)/(stp - stx) + dx))/two) * (stp - stx);
     if (std::fabs(stpc-stx) < std::fabs(stpq-stx)) {
        stpf = stpc;
     } else {
        stpf = stpc + (stpq - stpc)/two;
     }
     brackt = true;
  } else if (sgnd < zero) {
    //    std::cout << "dcstep 2" << std::endl;
     theta = three*(fx - fp)/(stp - stx) + dx + dp;
     s = std::max(std::fabs(theta), std::max(std::fabs(dx),std::fabs(dp)));
     gamma = s*std::sqrt(std::pow(theta/s, 2) - (dx/s)*(dp/s));
     if (stp > stx) gamma = -gamma;
     p = (gamma - dp) + theta;
     q = ((gamma - dp) + gamma) + dx;
     r = p/q;
     stpc = stp + r*(stx - stp);
     stpq = stp + (dp/(dp - dx))*(stx - stp);
     if (std::fabs(stpc-stp) > std::fabs(stpq-stp)) {
        stpf = stpc;
     } else {
        stpf = stpq;
     }
     brackt = true;
  } else if (std::fabs(dp) < std::fabs(dx)) {
    //    std::cout << "dcstep 3 ***************" << std::endl;
     theta = three*(fx - fp)/(stp - stx) + dx + dp;
     s = std::max(std::fabs(theta), std::max(std::fabs(dx),std::fabs(dp)));

     gamma = s*std::sqrt(std::max(zero,std::pow(theta/s, 2)-(dx/s)*(dp/s)));
     //     std::cout << "theta = " << theta << std::endl;
     //     std::cout << "gamma = " << gamma << std::endl;
     if (stp > stx) gamma = -gamma;
     p = (gamma - dp) + theta;
     q = (gamma + (dx - dp)) + gamma;
     r = p/q;
     if (r < zero && gamma != zero) {
        stpc = stp + r*(stx - stp);
     } else if (stp > stx) {
        stpc = stpmax;
     } else {
        stpc = stpmin;
     }
     //     std::cout << "stpc = " << stpc << std::endl;
     
     stpq = stp + (dp/(dp - dx))*(stx - stp);

     //     std::cout << "--------------------------------------------" << std::endl;
     //     std::cout << "stpq = " << stpq << std::endl;
     //     std::cout << "stp  = " << stp << std::endl;
     //     std::cout << "dp   = " << dp << std::endl;
     //     std::cout << "dx   = " << dx << std::endl;
     //     std::cout << "stx  = " << stx << std::endl;
     //     std::cout << "dp/(dp-dx) = " << dp/(dp-dx) << std::endl;
     //     std::cout << "--------------------------------------------" << std::endl;



     if (brackt) {
        if (std::fabs(stpc-stp) < std::fabs(stpq-stp)) {
           stpf = stpc;
        } else {
           stpf = stpq;
        }
        if (stp > stx) {
           stpf = std::min(stp+p66*(sty-stp),stpf);
        } else {
           stpf = std::max(stp+p66*(sty-stp),stpf);
        }
     } else {
        if (std::fabs(stpc-stp) > std::fabs(stpq-stp)) {
           stpf = stpc;
        } else {
           stpf = stpq;
        }
        stpf = std::min(stpmax,stpf);
        stpf = std::max(stpmin,stpf);
     }
  } else { 
    //    std::cout << "dcstep 4" << std::endl;
    if (brackt) {

        theta = three*(fp - fy)/(sty - stp) + dy + dp;
        s = std::max(std::fabs(theta), std::max(std::fabs(dy),std::fabs(dp)));
        gamma = s*std::sqrt(std::pow(theta/s, 2) - (dy/s)*(dp/s));
        if (stp > sty) gamma = -gamma;
        p = (gamma - dp) + theta;
        q = ((gamma - dp) + gamma) + dy;
        r = p/q;
        stpc = stp + r*(sty - stp);
        stpf = stpc;
     } else if (stp > stx) {
        stpf = stpmax;
     } else {
        stpf = stpmin;
     }
  }

  if (fp > fx) {
     sty = stp;
     fy = fp;
     dy = dp;
  } else {
     if (sgnd < zero) {
        sty = stx;
        fy = fx;
        dy = dx;
     }
     stx = stp;
     fx = fp;
     dx = dp;
  }
  stp = stpf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x40(%rbp)
movsd %xmm2, -0x48(%rbp)
movsd %xmm3, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd 0x95019(%rip), %xmm0    # 0x12a018
movsd %xmm0, -0x60(%rbp)
movsd 0x7639c(%rip), %xmm0    # 0x10b3a8
movsd %xmm0, -0x68(%rbp)
movsd 0x94ff7(%rip), %xmm0    # 0x12a010
movsd %xmm0, -0x70(%rbp)
movsd -0x40(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd (%rax), %xmm1
movq -0x18(%rbp), %rax
movsd (%rax), %xmm2
movaps 0x76396(%rip), %xmm3    # 0x10b3d0
pand %xmm3, %xmm2
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0x38(%rbp), %xmm0
movq -0x10(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x95349
movq -0x10(%rbp), %rax
movsd (%rax), %xmm1
subsd -0x38(%rbp), %xmm1
movsd 0x94f9a(%rip), %xmm0    # 0x12a010
mulsd %xmm1, %xmm0
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movq -0x8(%rbp), %rax
subsd (%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
addsd (%rax), %xmm0
addsd -0x40(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0xc0(%rbp), %xmm0
movaps 0x7631e(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0xc8(%rbp)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movaps 0x76303(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0xd0(%rbp)
movsd -0x40(%rbp), %xmm0
movaps 0x762eb(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x14920
movq %rax, %rsi
leaq -0xc8(%rbp), %rdi
callq 0x14920
movsd (%rax), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x140(%rbp)
movsd -0xc0(%rbp), %xmm0
divsd -0x98(%rbp), %xmm0
movl $0x2, %edi
callq 0x967d0
movaps %xmm0, %xmm1
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
divsd -0x98(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
divsd -0x98(%rbp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0xa370
movaps %xmm0, %xmm1
movsd -0x140(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movq -0x8(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x951d8
movsd -0x78(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movq -0x18(%rbp), %rax
subsd (%rax), %xmm0
addsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x78(%rbp), %xmm0
movq -0x18(%rbp), %rax
subsd (%rax), %xmm0
addsd -0x78(%rbp), %xmm0
addsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x80(%rbp), %xmm0
divsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movq -0x8(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x90(%rbp), %xmm0
movq 0x10(%rbp), %rax
movsd (%rax), %xmm2
movq -0x8(%rbp), %rax
subsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
movq -0x8(%rbp), %rax
movsd (%rax), %xmm1
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd (%rax), %xmm2
subsd -0x38(%rbp), %xmm2
movq 0x10(%rbp), %rax
movsd (%rax), %xmm3
movq -0x8(%rbp), %rax
subsd (%rax), %xmm3
divsd %xmm3, %xmm2
movq -0x18(%rbp), %rax
addsd (%rax), %xmm2
divsd %xmm2, %xmm0
movsd 0x7610d(%rip), %xmm2    # 0x10b3a8
divsd %xmm2, %xmm0
movq 0x10(%rbp), %rax
movsd (%rax), %xmm2
movq -0x8(%rbp), %rax
subsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xb8(%rbp)
movsd -0xa8(%rbp), %xmm1
movq -0x8(%rbp), %rax
subsd (%rax), %xmm1
movaps 0x760fa(%rip), %xmm0    # 0x10b3d0
pand %xmm0, %xmm1
movsd -0xb8(%rbp), %xmm0
movq -0x8(%rbp), %rax
subsd (%rax), %xmm0
movaps 0x760df(%rip), %xmm2    # 0x10b3d0
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x9530d
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x9533d
movsd -0xa8(%rbp), %xmm0
movsd -0xb8(%rbp), %xmm1
subsd -0xa8(%rbp), %xmm1
movsd 0x7607b(%rip), %xmm2    # 0x10b3a8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0xb0(%rbp)
movq 0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0x95cba
xorps %xmm0, %xmm0
ucomisd -0xa0(%rbp), %xmm0
jbe 0x955f0
movq -0x10(%rbp), %rax
movsd (%rax), %xmm1
subsd -0x38(%rbp), %xmm1
movsd 0x94ca1(%rip), %xmm0    # 0x12a010
mulsd %xmm1, %xmm0
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movq -0x8(%rbp), %rax
subsd (%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
addsd (%rax), %xmm0
addsd -0x40(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0xc0(%rbp), %xmm0
movaps 0x76025(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0xe0(%rbp)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movaps 0x7600a(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0xe8(%rbp)
movsd -0x40(%rbp), %xmm0
movaps 0x75ff2(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0xf0(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x14920
movq %rax, %rsi
leaq -0xe0(%rbp), %rdi
callq 0x14920
movsd (%rax), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x148(%rbp)
movsd -0xc0(%rbp), %xmm0
divsd -0x98(%rbp), %xmm0
movl $0x2, %edi
callq 0x967d0
movaps %xmm0, %xmm1
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
divsd -0x98(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
divsd -0x98(%rbp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0xa370
movaps %xmm0, %xmm1
movsd -0x148(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x954cd
movsd -0x78(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
addsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x78(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
addsd -0x78(%rbp), %xmm0
movq -0x18(%rbp), %rax
addsd (%rax), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x80(%rbp), %xmm0
divsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x90(%rbp), %xmm0
movq -0x8(%rbp), %rax
movsd (%rax), %xmm2
movq 0x10(%rbp), %rax
subsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x40(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
movq -0x18(%rbp), %rax
subsd (%rax), %xmm2
divsd %xmm2, %xmm0
movq -0x8(%rbp), %rax
movsd (%rax), %xmm2
movq 0x10(%rbp), %rax
subsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xb8(%rbp)
movsd -0xa8(%rbp), %xmm0
movq 0x10(%rbp), %rax
subsd (%rax), %xmm0
movaps 0x75e33(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd -0xb8(%rbp), %xmm1
movq 0x10(%rbp), %rax
subsd (%rax), %xmm1
movaps 0x75e18(%rip), %xmm2    # 0x10b3d0
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x955d4
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x955e4
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movq 0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0x95cb8
movsd -0x40(%rbp), %xmm1
movaps 0x75dd4(%rip), %xmm0    # 0x10b3d0
pand %xmm0, %xmm1
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movaps 0x75dc1(%rip), %xmm2    # 0x10b3d0
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x95a77
movq -0x10(%rbp), %rax
movsd (%rax), %xmm1
subsd -0x38(%rbp), %xmm1
movsd 0x949de(%rip), %xmm0    # 0x12a010
mulsd %xmm1, %xmm0
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movq -0x8(%rbp), %rax
subsd (%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
addsd (%rax), %xmm0
addsd -0x40(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0xc0(%rbp), %xmm0
movaps 0x75d62(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0xf8(%rbp)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movaps 0x75d47(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0x100(%rbp)
movsd -0x40(%rbp), %xmm0
movaps 0x75d2f(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0x108(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x14920
movq %rax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x14920
movsd (%rax), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x150(%rbp)
movsd -0xc0(%rbp), %xmm0
divsd -0x98(%rbp), %xmm0
movl $0x2, %edi
callq 0x967d0
movaps %xmm0, %xmm1
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
divsd -0x98(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
divsd -0x98(%rbp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x110(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x14920
movsd (%rax), %xmm0
callq 0xa370
movaps %xmm0, %xmm1
movsd -0x150(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x957ac
movsd -0x78(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
addsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x78(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd (%rax), %xmm1
subsd -0x40(%rbp), %xmm1
addsd %xmm1, %xmm0
addsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x80(%rbp), %xmm0
divsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x90(%rbp), %xmm0
jbe 0x9584c
movsd -0x78(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x9581a
jp 0x9581a
jmp 0x9584c
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x90(%rbp), %xmm0
movq -0x8(%rbp), %rax
movsd (%rax), %xmm2
movq 0x10(%rbp), %rax
subsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
jmp 0x9587c
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x9586d
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0xa8(%rbp)
jmp 0x9587a
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0xa8(%rbp)
jmp 0x9587c
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x40(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
movq -0x18(%rbp), %rax
subsd (%rax), %xmm2
divsd %xmm2, %xmm0
movq -0x8(%rbp), %rax
movsd (%rax), %xmm2
movq 0x10(%rbp), %rax
subsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xb8(%rbp)
movq 0x18(%rbp), %rax
testb $0x1, (%rax)
je 0x959dc
movsd -0xa8(%rbp), %xmm1
movq 0x10(%rbp), %rax
subsd (%rax), %xmm1
movaps 0x75af2(%rip), %xmm0    # 0x10b3d0
pand %xmm0, %xmm1
movsd -0xb8(%rbp), %xmm0
movq 0x10(%rbp), %rax
subsd (%rax), %xmm0
movaps 0x75ad7(%rip), %xmm2    # 0x10b3d0
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x95915
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x95925
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x95988
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
movq 0x10(%rbp), %rax
subsd (%rax), %xmm0
movsd 0x946c1(%rip), %xmm2    # 0x12a018
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x118(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x148e0
movsd (%rax), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x959d7
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
movq 0x10(%rbp), %rax
subsd (%rax), %xmm0
movsd 0x94670(%rip), %xmm2    # 0x12a018
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x120(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x14920
movsd (%rax), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x95a72
movsd -0xa8(%rbp), %xmm0
movq 0x10(%rbp), %rax
subsd (%rax), %xmm0
movaps 0x759dd(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd -0xb8(%rbp), %xmm1
movq 0x10(%rbp), %rax
subsd (%rax), %xmm1
movaps 0x759c2(%rip), %xmm2    # 0x10b3d0
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x95a2a
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x95a3a
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x148e0
movsd (%rax), %xmm0
movsd %xmm0, -0xb0(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x14920
movsd (%rax), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x95cb6
movq 0x18(%rbp), %rax
testb $0x1, (%rax)
je 0x95c84
movsd -0x38(%rbp), %xmm1
movq -0x28(%rbp), %rax
subsd (%rax), %xmm1
movsd 0x94577(%rip), %xmm0    # 0x12a010
mulsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movsd (%rax), %xmm1
movq 0x10(%rbp), %rax
subsd (%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x30(%rbp), %rax
addsd (%rax), %xmm0
addsd -0x40(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0xc0(%rbp), %xmm0
movaps 0x758fb(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0x128(%rbp)
movq -0x30(%rbp), %rax
movsd (%rax), %xmm0
movaps 0x758e0(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0x130(%rbp)
movsd -0x40(%rbp), %xmm0
movaps 0x758c8(%rip), %xmm1    # 0x10b3d0
pand %xmm1, %xmm0
movsd %xmm0, -0x138(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x14920
movq %rax, %rsi
leaq -0x128(%rbp), %rdi
callq 0x14920
movsd (%rax), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x158(%rbp)
movsd -0xc0(%rbp), %xmm0
divsd -0x98(%rbp), %xmm0
movl $0x2, %edi
callq 0x967d0
movaps %xmm0, %xmm1
movq -0x30(%rbp), %rax
movsd (%rax), %xmm0
divsd -0x98(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
divsd -0x98(%rbp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0xa370
movaps %xmm0, %xmm1
movsd -0x158(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x20(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x95bf7
movsd -0x78(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
addsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x78(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
addsd -0x78(%rbp), %xmm0
movq -0x30(%rbp), %rax
addsd (%rax), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x80(%rbp), %xmm0
divsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x90(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd (%rax), %xmm2
movq 0x10(%rbp), %rax
subsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x95cb4
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x95ca5
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x95cb2
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x95cb4
jmp 0x95cb6
jmp 0x95cb8
jmp 0x95cba
movsd -0x38(%rbp), %xmm0
movq -0x10(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x95cf5
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x38(%rbp), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x40(%rbp), %xmm0
movq -0x30(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x95d5c
xorps %xmm0, %xmm0
ucomisd -0xa0(%rbp), %xmm0
jbe 0x95d32
movq -0x8(%rbp), %rax
movsd (%rax), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movq -0x30(%rbp), %rax
movsd %xmm0, (%rax)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x38(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x40(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0xb0(%rbp), %xmm0
movq 0x10(%rbp), %rax
movsd %xmm0, (%rax)
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw %cs:(%rax,%rax)