void ContactHessian(CH, q, qdot) double CH[6];
double q[7];
double qdot[7];
{
  double t1;
  double t10;
  double t11;
  double t112;
  double t12;
  double t126;
  double t15;
  double t16;
  double t18;
  double t2;
  double t20;
  double t22;
  double t23;
  double t24;
  double t25;
  double t26;
  double t29;
  double t3;
  double t30;
  double t31;
  double t35;
  double t39;
  double t4;
  double t44;
  double t47;
  double t48;
  double t5;
  double t52;
  double t56;
  double t59;
  double t6;
  double t60;
  double t64;
  double t67;
  double t68;
  double t7;
  double t71;
  double t73;
  double t79;
  double t8;
  double t81;
  double t82;
  double t85;
  double t87;
  double t9;
  double t91;
  double t94;
  {
    CH[0] = 0.0;
    t1 = q[0];
    t2 = cos(t1);
    t3 = qdot[0];
    t4 = t3 * t3;
    t5 = t2 * t4;
    t6 = q[1];
    t7 = cos(t6);
    t8 = q[2];
    t9 = cos(t8);
    t10 = t7 * t9;
    t11 = q[3];
    t12 = sin(t11);
    t15 = sin(t6);
    t16 = cos(t11);
    t18 = -0.45 - 0.48 * t16;
    t20 = 0.48 * t10 * t12 - t15 * t18;
    t22 = sin(t1);
    t23 = t22 * t3;
    t24 = qdot[1];
    t25 = t15 * t24;
    t26 = t9 * t12;
    t29 = sin(t8);
    t30 = t7 * t29;
    t31 = qdot[2];
    t35 = qdot[3];
    t39 = t7 * t24;
    t44 = -0.48 * t25 * t26 - 0.48 * t30 * t31 * t12 + 0.48 * t10 * t16 * t35 -
          t39 * t18 - 0.48 * t15 * t12 * t35;
    t47 = t24 * t24;
    t48 = t7 * t47;
    t52 = t29 * t31 * t12;
    t56 = t9 * t16 * t35;
    t59 = t31 * t31;
    t60 = t59 * t12;
    t64 = t31 * t16 * t35;
    t67 = t35 * t35;
    t68 = t12 * t67;
    t71 = t15 * t47;
    t73 = t12 * t35;
    t79 = -0.48 * t48 * t26 + 0.96 * t25 * t52 - 0.96 * t25 * t56 -
          0.48 * t10 * t60 - 0.96 * t30 * t64 - 0.48 * t10 * t68 + t71 * t18 -
          0.96 * t39 * t73 - 0.48 * t15 * t16 * t67;
    t81 = t22 * t4;
    t82 = t29 * t12;
    t85 = t2 * t3;
    t87 = t9 * t31 * t12;
    t91 = t29 * t16 * t35;
    t94 = t22 * t29;
    CH[1] = -t5 * t20 - 2.0 * t23 * t44 + t2 * t79 + 0.48 * t81 * t82 -
            0.96 * t85 * t87 - 0.96 * t85 * t91 + 0.48 * t94 * t60 -
            0.96 * t22 * t9 * t64 + 0.48 * t94 * t68;
    CH[2] = 0.0;
    t112 = t2 * t29;
    CH[3] = -t81 * t20 + 2.0 * t85 * t44 + t22 * t79 - 0.48 * t5 * t82 -
            0.96 * t23 * t87 - 0.96 * t23 * t91 - 0.48 * t112 * t60 +
            0.96 * t2 * t9 * t64 - 0.48 * t112 * t68;
    CH[4] = 0.0;
    t126 = t15 * t9;
    CH[5] = 0.48 * t71 * t26 + 0.96 * t39 * t52 - 0.96 * t39 * t56 +
            0.48 * t126 * t60 + 0.96 * t15 * t29 * t64 + 0.48 * t126 * t68 +
            t48 * t18 + 0.96 * t25 * t73 - 0.48 * t7 * t16 * t67;
    return;
  }
}


x86 assembly (clang, -O0):
<ContactHessian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
call   1040 <cos@plt>
movsd  %xmm0,-0x138(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x158(%rbp),%xmm0
ff
call   1040 <cos@plt>
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x138(%rbp),%xmm0
ff
mulsd  -0x180(%rbp),%xmm0
ff
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x110(%rbp),%xmm0
ff
call   1030 <sin@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xdd1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdcd(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xd9c(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x180(%rbp),%xmm0
ff
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x158(%rbp),%xmm0
ff
call   1030 <sin@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x138(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x138(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xcb1(%rip),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  0xc81(%rip),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc45(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  -0xc0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0x60(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xbf7(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0xc0(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x138(%rbp),%xmm0
ff
mulsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x180(%rbp),%xmm0
ff
mulsd  -0x58(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x108(%rbp),%xmm0
ff
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0x58(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
mulsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
movsd  0xac3(%rip),%xmm1
mulsd  -0xe8(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  0xa9b(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mulsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xa7b(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  -0x100(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xa3c(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x118(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xa10(%rip),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  -0x120(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x9d1(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x130(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x140(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x990(%rip),%xmm1
mulsd  -0xc8(%rbp),%xmm1
ff
movsd  -0x148(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x951(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  -0x128(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0x180(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0x58(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x188(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x190(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  0x86e(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
mulsd  -0xd8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  -0x150(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x815(%rip),%xmm1
mulsd  -0x160(%rbp),%xmm1
ff
movsd  -0x168(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x7fd(%rip),%xmm0
mulsd  -0x170(%rbp),%xmm0
ff
movsd  -0x178(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x7c6(%rip),%xmm1
mulsd  -0x170(%rbp),%xmm1
ff
movsd  -0x188(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x787(%rip),%xmm0
mulsd  -0x190(%rbp),%xmm0
ff
movsd  -0x118(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x76f(%rip),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  -0x180(%rbp),%xmm1
ff
movsd  -0x120(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x72b(%rip),%xmm0
mulsd  -0x190(%rbp),%xmm0
ff
movsd  -0x130(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
movsd  -0x68(%rbp),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x38(%rbp)
movsd  -0x160(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  0x6d0(%rip),%xmm0
mulsd  -0x170(%rbp),%xmm0
ff
mulsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
movsd  -0x150(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x68b(%rip),%xmm1
mulsd  -0xf0(%rbp),%xmm1
ff
movsd  -0x168(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x65c(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  -0x178(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x628(%rip),%xmm1
mulsd  -0x80(%rbp),%xmm1
movsd  -0x188(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x5ec(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x118(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x5c0(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
mulsd  -0x180(%rbp),%xmm1
ff
movsd  -0x120(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x593(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x130(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x20(%rax)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x180(%rbp),%xmm0
ff
movsd  %xmm0,-0x48(%rbp)
movsd  0x538(%rip),%xmm1
mulsd  -0x140(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  0x528(%rip),%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
mulsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x508(%rip),%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x100(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x4c9(%rip),%xmm1
mulsd  -0x48(%rbp),%xmm1
movsd  -0x118(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x4b4(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x120(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x487(%rip),%xmm1
mulsd  -0x48(%rbp),%xmm1
movsd  -0x130(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x45d(%rip),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
movsd  -0x148(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x435(%rip),%xmm0
mulsd  -0x138(%rbp),%xmm0
ff
mulsd  -0x58(%rbp),%xmm0
movsd  -0x128(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ContactHessian>:
push   %r15
push   %r14
push   %rbx
sub    $0xd0,%rsp
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r14
movq   $0x0,(%rdi)
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
call   1040 <cos@plt>
movsd  %xmm0,0x68(%rsp)
movsd  (%r15),%xmm1
movsd  %xmm1,0x28(%rsp)
mulsd  %xmm1,%xmm1
movsd  %xmm1,0xc8(%rsp)
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x78(%rsp)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1040 <cos@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1040 <cos@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x48(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  0x18(%rbx),%xmm0
movsd  %xmm0,0x18(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,0x50(%rsp)
mulsd  0xe0e(%rip),%xmm0
addsd  0xe0e(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x30(%rsp),%xmm1
mulsd  0xe02(%rip),%xmm1
movsd  %xmm1,0x30(%rsp)
mulsd  0x8(%rsp),%xmm0
mulsd  0x38(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x60(%rsp)
movsd  (%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0xa8(%rsp)
movsd  0x28(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x70(%rsp)
movsd  0x8(%r15),%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x20(%rsp),%xmm0
mulsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x58(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
movsd  0x48(%rsp),%xmm7
movapd %xmm7,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm0,%xmm3
movsd  %xmm0,0x90(%rsp)
movsd  0x40(%rsp),%xmm15
movapd %xmm15,%xmm0
movsd  0xd4b(%rip),%xmm8
mulsd  %xmm8,%xmm0
movapd %xmm4,%xmm1
mulsd  %xmm8,%xmm1
movsd  0x10(%r15),%xmm9
mulsd  %xmm9,%xmm1
movsd  0x38(%rsp),%xmm6
mulsd  %xmm6,%xmm1
movsd  0x58(%rsp),%xmm13
mulsd  %xmm13,%xmm0
addsd  %xmm1,%xmm0
movsd  0x30(%rsp),%xmm10
movapd %xmm10,%xmm5
movsd  0x50(%rsp),%xmm11
mulsd  %xmm11,%xmm5
movsd  0x18(%r15),%xmm12
mulsd  %xmm12,%xmm5
addsd  %xmm0,%xmm5
movapd %xmm7,%xmm1
movapd %xmm7,%xmm0
movsd  (%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
mulsd  0x18(%rsp),%xmm0
subsd  %xmm0,%xmm5
movsd  0x8(%rsp),%xmm7
mulsd  %xmm8,%xmm7
movapd %xmm6,%xmm14
mulsd  %xmm7,%xmm14
mulsd  %xmm12,%xmm14
addsd  %xmm5,%xmm14
mulsd  %xmm2,%xmm2
movsd  %xmm2,(%rsp)
mulsd  %xmm2,%xmm1
movsd  %xmm1,0xc0(%rsp)
movapd %xmm3,%xmm0
mulsd  %xmm9,%xmm0
mulsd  %xmm6,%xmm0
movapd %xmm0,%xmm3
movsd  %xmm0,0xb8(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm8,%xmm0
movapd %xmm15,%xmm2
mulsd  0xc83(%rip),%xmm2
movsd  %xmm2,0x40(%rsp)
movapd %xmm2,%xmm5
mulsd  %xmm3,%xmm5
mulsd  %xmm13,%xmm0
addsd  %xmm5,%xmm0
movsd  0x20(%rsp),%xmm3
movapd %xmm11,%xmm1
mulsd  %xmm11,%xmm3
mulsd  %xmm12,%xmm3
movsd  %xmm3,0xb0(%rsp)
movapd %xmm2,%xmm5
mulsd  %xmm3,%xmm5
subsd  %xmm5,%xmm0
movapd %xmm9,%xmm11
mulsd  %xmm9,%xmm11
movapd %xmm6,%xmm2
mulsd  %xmm6,%xmm11
movapd %xmm10,%xmm5
movapd %xmm10,%xmm6
mulsd  %xmm11,%xmm5
subsd  %xmm5,%xmm0
movapd %xmm1,%xmm3
mulsd  %xmm9,%xmm3
mulsd  %xmm12,%xmm3
movsd  %xmm3,0x88(%rsp)
mulsd  0xc05(%rip),%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm0,%xmm4
movapd %xmm2,%xmm10
movapd %xmm2,%xmm5
mulsd  %xmm12,%xmm10
movsd  %xmm10,0x98(%rsp)
movapd %xmm1,%xmm3
movapd %xmm1,%xmm13
movsd  0x90(%rsp),%xmm2
mulsd  %xmm2,%xmm13
mulsd  %xmm12,%xmm13
mulsd  %xmm12,%xmm12
movsd  %xmm12,0xa0(%rsp)
movapd %xmm5,%xmm1
mulsd  %xmm12,%xmm1
movsd  %xmm1,0x80(%rsp)
mulsd  %xmm1,%xmm6
subsd  %xmm6,%xmm4
movsd  (%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
mulsd  0x18(%rsp),%xmm0
addsd  %xmm4,%xmm0
movsd  0x10(%rsp),%xmm4
mulsd  0xb70(%rip),%xmm4
movsd  %xmm4,0x10(%rsp)
mulsd  %xmm10,%xmm4
subsd  %xmm4,%xmm0
mulsd  %xmm3,%xmm7
mulsd  %xmm12,%xmm7
addsd  %xmm0,%xmm7
movsd  0xb5c(%rip),%xmm0
mulsd  0x70(%rsp),%xmm0
mulsd  %xmm14,%xmm0
movsd  0x78(%rsp),%xmm4
mulsd  0x60(%rsp),%xmm4
subsd  %xmm4,%xmm0
movsd  0x68(%rsp),%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm7,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc8(%rsp),%xmm10
movsd  0xa8(%rsp),%xmm8
mulsd  %xmm8,%xmm10
movsd  0x20(%rsp),%xmm4
mulsd  %xmm4,%xmm9
mulsd  %xmm5,%xmm9
mulsd  %xmm2,%xmm5
movapd %xmm2,%xmm6
movapd %xmm10,%xmm0
movsd  0xad8(%rip),%xmm15
mulsd  %xmm15,%xmm0
mulsd  %xmm5,%xmm0
addsd  %xmm1,%xmm0
movsd  0x28(%rsp),%xmm1
mulsd  %xmm3,%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0xac2(%rip),%xmm12
mulsd  %xmm12,%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm9,%xmm2
addsd  %xmm0,%xmm2
mulsd  %xmm13,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm8,%xmm0
mulsd  %xmm6,%xmm0
mulsd  %xmm15,%xmm0
movapd %xmm0,%xmm2
mulsd  %xmm11,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm8,%xmm1
mulsd  %xmm12,%xmm1
mulsd  %xmm4,%xmm1
movsd  0x88(%rsp),%xmm4
mulsd  %xmm4,%xmm1
addsd  %xmm2,%xmm1
movsd  0x80(%rsp),%xmm15
mulsd  %xmm15,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%r14)
movsd  0x28(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  %xmm14,%xmm0
mulsd  0x60(%rsp),%xmm10
subsd  %xmm10,%xmm0
mulsd  %xmm8,%xmm7
addsd  %xmm0,%xmm7
movsd  0x78(%rsp),%xmm0
movsd  0xa02(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm5,%xmm0
addsd  %xmm7,%xmm0
movsd  0x70(%rsp),%xmm2
mulsd  %xmm12,%xmm2
mulsd  %xmm2,%xmm9
addsd  %xmm0,%xmm9
mulsd  %xmm13,%xmm2
addsd  %xmm9,%xmm2
movapd %xmm2,%xmm3
movsd  0x68(%rsp),%xmm2
movapd %xmm2,%xmm0
movapd %xmm6,%xmm7
mulsd  %xmm6,%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm1,%xmm8
movapd %xmm0,%xmm1
mulsd  %xmm11,%xmm1
addsd  %xmm3,%xmm1
movsd  0x9ba(%rip),%xmm9
mulsd  %xmm9,%xmm2
movsd  0x20(%rsp),%xmm3
mulsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm15,%xmm0
addsd  %xmm2,%xmm0
movq   $0x0,0x10(%r14)
movsd  %xmm0,0x18(%r14)
movsd  0x97c(%rip),%xmm2
movsd  (%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  0x58(%rsp),%xmm0
movsd  0xb8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm5
mulsd  %xmm5,%xmm1
addsd  %xmm1,%xmm0
mulsd  0xb0(%rsp),%xmm5
subsd  %xmm5,%xmm0
movapd %xmm0,%xmm5
movapd %xmm3,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm11
addsd  %xmm5,%xmm11
mulsd  %xmm9,%xmm1
mulsd  %xmm7,%xmm1
mulsd  %xmm4,%xmm1
addsd  %xmm11,%xmm1
mulsd  %xmm15,%xmm0
addsd  %xmm1,%xmm0
movsd  0xc0(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x40(%rsp),%xmm0
mulsd  0x98(%rsp),%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,%xmm1
movsd  0x48(%rsp),%xmm0
mulsd  %xmm8,%xmm0
mulsd  0x50(%rsp),%xmm0
mulsd  0xa0(%rsp),%xmm0
addsd  %xmm1,%xmm0
movq   $0x0,0x20(%r14)
movsd  %xmm0,0x28(%r14)
add    $0xd0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ContactHessian(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%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
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
%44 = alloca double
%45 = alloca double
%46 = alloca double
%47 = alloca double
%48 = alloca double
%49 = alloca double
%50 = alloca double
%51 = alloca double
%52 = alloca double
%53 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%54 = load double*, double** %4
%55 = getelementptr inbounds double, double* %54, i64 0
store double 0.000000e+00, double* %55
%56 = load double*, double** %5
%57 = getelementptr inbounds double, double* %56, i64 0
%58 = load double, double* %57
store double %58, double* %7
%59 = load double, double* %7
%60 = call double @cos(double %59)
store double %60, double* %16
%61 = load double*, double** %6
%62 = getelementptr inbounds double, double* %61, i64 0
%63 = load double, double* %62
store double %63, double* %24
%64 = load double, double* %24
%65 = load double, double* %24
%66 = fmul double %64, %65
store double %66, double* %29
%67 = load double, double* %16
%68 = load double, double* %29
%69 = fmul double %67, %68
store double %69, double* %33
%70 = load double*, double** %5
%71 = getelementptr inbounds double, double* %70, i64 1
%72 = load double, double* %71
store double %72, double* %37
%73 = load double, double* %37
%74 = call double @cos(double %73)
store double %74, double* %42
%75 = load double*, double** %5
%76 = getelementptr inbounds double, double* %75, i64 2
%77 = load double, double* %76
store double %77, double* %46
%78 = load double, double* %46
%79 = call double @cos(double %78)
store double %79, double* %51
%80 = load double, double* %42
%81 = load double, double* %51
%82 = fmul double %80, %81
store double %82, double* %8
%83 = load double*, double** %5
%84 = getelementptr inbounds double, double* %83, i64 3
%85 = load double, double* %84
store double %85, double* %9
%86 = load double, double* %9
%87 = call double @sin(double %86)
store double %87, double* %11
%88 = load double, double* %37
%89 = call double @sin(double %88)
store double %89, double* %13
%90 = load double, double* %9
%91 = call double @cos(double %90)
store double %91, double* %14
%92 = load double, double* %14
%93 = call double @llvm.fmuladd.f64(double -4.800000e-01, double %92, double -4.500000e-01)
store double %93, double* %15
%94 = load double, double* %8
%95 = fmul double 4.800000e-01, %94
%96 = load double, double* %11
%97 = load double, double* %13
%98 = load double, double* %15
%99 = fmul double %97, %98
%100 = fneg double %99
%101 = call double @llvm.fmuladd.f64(double %95, double %96, double %100)
store double %101, double* %17
%102 = load double, double* %7
%103 = call double @sin(double %102)
store double %103, double* %18
%104 = load double, double* %18
%105 = load double, double* %24
%106 = fmul double %104, %105
store double %106, double* %19
%107 = load double*, double** %6
%108 = getelementptr inbounds double, double* %107, i64 1
%109 = load double, double* %108
store double %109, double* %20
%110 = load double, double* %13
%111 = load double, double* %20
%112 = fmul double %110, %111
store double %112, double* %21
%113 = load double, double* %51
%114 = load double, double* %11
%115 = fmul double %113, %114
store double %115, double* %22
%116 = load double, double* %46
%117 = call double @sin(double %116)
store double %117, double* %23
%118 = load double, double* %42
%119 = load double, double* %23
%120 = fmul double %118, %119
store double %120, double* %25
%121 = load double*, double** %6
%122 = getelementptr inbounds double, double* %121, i64 2
%123 = load double, double* %122
store double %123, double* %26
%124 = load double*, double** %6
%125 = getelementptr inbounds double, double* %124, i64 3
%126 = load double, double* %125
store double %126, double* %27
%127 = load double, double* %42
%128 = load double, double* %20
%129 = fmul double %127, %128
store double %129, double* %28
%130 = load double, double* %21
%131 = fmul double -4.800000e-01, %130
%132 = load double, double* %22
%133 = load double, double* %25
%134 = fmul double 4.800000e-01, %133
%135 = load double, double* %26
%136 = fmul double %134, %135
%137 = load double, double* %11
%138 = fmul double %136, %137
%139 = fneg double %138
%140 = call double @llvm.fmuladd.f64(double %131, double %132, double %139)
%141 = load double, double* %8
%142 = fmul double 4.800000e-01, %141
%143 = load double, double* %14
%144 = fmul double %142, %143
%145 = load double, double* %27
%146 = call double @llvm.fmuladd.f64(double %144, double %145, double %140)
%147 = load double, double* %28
%148 = load double, double* %15
%149 = fneg double %147
%150 = call double @llvm.fmuladd.f64(double %149, double %148, double %146)
%151 = load double, double* %13
%152 = fmul double 4.800000e-01, %151
%153 = load double, double* %11
%154 = fmul double %152, %153
%155 = load double, double* %27
%156 = fneg double %154
%157 = call double @llvm.fmuladd.f64(double %156, double %155, double %150)
store double %157, double* %30
%158 = load double, double* %20
%159 = load double, double* %20
%160 = fmul double %158, %159
store double %160, double* %31
%161 = load double, double* %42
%162 = load double, double* %31
%163 = fmul double %161, %162
store double %163, double* %32
%164 = load double, double* %23
%165 = load double, double* %26
%166 = fmul double %164, %165
%167 = load double, double* %11
%168 = fmul double %166, %167
store double %168, double* %34
%169 = load double, double* %51
%170 = load double, double* %14
%171 = fmul double %169, %170
%172 = load double, double* %27
%173 = fmul double %171, %172
store double %173, double* %35
%174 = load double, double* %26
%175 = load double, double* %26
%176 = fmul double %174, %175
store double %176, double* %36
%177 = load double, double* %36
%178 = load double, double* %11
%179 = fmul double %177, %178
store double %179, double* %38
%180 = load double, double* %26
%181 = load double, double* %14
%182 = fmul double %180, %181
%183 = load double, double* %27
%184 = fmul double %182, %183
store double %184, double* %39
%185 = load double, double* %27
%186 = load double, double* %27
%187 = fmul double %185, %186
store double %187, double* %40
%188 = load double, double* %11
%189 = load double, double* %40
%190 = fmul double %188, %189
store double %190, double* %41
%191 = load double, double* %13
%192 = load double, double* %31
%193 = fmul double %191, %192
store double %193, double* %43
%194 = load double, double* %11
%195 = load double, double* %27
%196 = fmul double %194, %195
store double %196, double* %44
%197 = load double, double* %32
%198 = fmul double -4.800000e-01, %197
%199 = load double, double* %22
%200 = load double, double* %21
%201 = fmul double 0x3FEEB851EB851EB8, %200
%202 = load double, double* %34
%203 = fmul double %201, %202
%204 = call double @llvm.fmuladd.f64(double %198, double %199, double %203)
%205 = load double, double* %21
%206 = fmul double 0x3FEEB851EB851EB8, %205
%207 = load double, double* %35
%208 = fneg double %206
%209 = call double @llvm.fmuladd.f64(double %208, double %207, double %204)
%210 = load double, double* %8
%211 = fmul double 4.800000e-01, %210
%212 = load double, double* %38
%213 = fneg double %211
%214 = call double @llvm.fmuladd.f64(double %213, double %212, double %209)
%215 = load double, double* %25
%216 = fmul double 0x3FEEB851EB851EB8, %215
%217 = load double, double* %39
%218 = fneg double %216
%219 = call double @llvm.fmuladd.f64(double %218, double %217, double %214)
%220 = load double, double* %8
%221 = fmul double 4.800000e-01, %220
%222 = load double, double* %41
%223 = fneg double %221
%224 = call double @llvm.fmuladd.f64(double %223, double %222, double %219)
%225 = load double, double* %43
%226 = load double, double* %15
%227 = call double @llvm.fmuladd.f64(double %225, double %226, double %224)
%228 = load double, double* %28
%229 = fmul double 0x3FEEB851EB851EB8, %228
%230 = load double, double* %44
%231 = fneg double %229
%232 = call double @llvm.fmuladd.f64(double %231, double %230, double %227)
%233 = load double, double* %13
%234 = fmul double 4.800000e-01, %233
%235 = load double, double* %14
%236 = fmul double %234, %235
%237 = load double, double* %40
%238 = fneg double %236
%239 = call double @llvm.fmuladd.f64(double %238, double %237, double %232)
store double %239, double* %45
%240 = load double, double* %18
%241 = load double, double* %29
%242 = fmul double %240, %241
store double %242, double* %47
%243 = load double, double* %23
%244 = load double, double* %11
%245 = fmul double %243, %244
store double %245, double* %48
%246 = load double, double* %16
%247 = load double, double* %24
%248 = fmul double %246, %247
store double %248, double* %49
%249 = load double, double* %51
%250 = load double, double* %26
%251 = fmul double %249, %250
%252 = load double, double* %11
%253 = fmul double %251, %252
store double %253, double* %50
%254 = load double, double* %23
%255 = load double, double* %14
%256 = fmul double %254, %255
%257 = load double, double* %27
%258 = fmul double %256, %257
store double %258, double* %52
%259 = load double, double* %18
%260 = load double, double* %23
%261 = fmul double %259, %260
store double %261, double* %53
%262 = load double, double* %33
%263 = fneg double %262
%264 = load double, double* %17
%265 = load double, double* %19
%266 = fmul double 2.000000e+00, %265
%267 = load double, double* %30
%268 = fmul double %266, %267
%269 = fneg double %268
%270 = call double @llvm.fmuladd.f64(double %263, double %264, double %269)
%271 = load double, double* %16
%272 = load double, double* %45
%273 = call double @llvm.fmuladd.f64(double %271, double %272, double %270)
%274 = load double, double* %47
%275 = fmul double 4.800000e-01, %274
%276 = load double, double* %48
%277 = call double @llvm.fmuladd.f64(double %275, double %276, double %273)
%278 = load double, double* %49
%279 = fmul double 0x3FEEB851EB851EB8, %278
%280 = load double, double* %50
%281 = fneg double %279
%282 = call double @llvm.fmuladd.f64(double %281, double %280, double %277)
%283 = load double, double* %49
%284 = fmul double 0x3FEEB851EB851EB8, %283
%285 = load double, double* %52
%286 = fneg double %284
%287 = call double @llvm.fmuladd.f64(double %286, double %285, double %282)
%288 = load double, double* %53
%289 = fmul double 4.800000e-01, %288
%290 = load double, double* %38
%291 = call double @llvm.fmuladd.f64(double %289, double %290, double %287)
%292 = load double, double* %18
%293 = fmul double 0x3FEEB851EB851EB8, %292
%294 = load double, double* %51
%295 = fmul double %293, %294
%296 = load double, double* %39
%297 = fneg double %295
%298 = call double @llvm.fmuladd.f64(double %297, double %296, double %291)
%299 = load double, double* %53
%300 = fmul double 4.800000e-01, %299
%301 = load double, double* %41
%302 = call double @llvm.fmuladd.f64(double %300, double %301, double %298)
%303 = load double*, double** %4
%304 = getelementptr inbounds double, double* %303, i64 1
store double %302, double* %304
%305 = load double*, double** %4
%306 = getelementptr inbounds double, double* %305, i64 2
store double 0.000000e+00, double* %306
%307 = load double, double* %16
%308 = load double, double* %23
%309 = fmul double %307, %308
store double %309, double* %10
%310 = load double, double* %47
%311 = fneg double %310
%312 = load double, double* %17
%313 = load double, double* %49
%314 = fmul double 2.000000e+00, %313
%315 = load double, double* %30
%316 = fmul double %314, %315
%317 = call double @llvm.fmuladd.f64(double %311, double %312, double %316)
%318 = load double, double* %18
%319 = load double, double* %45
%320 = call double @llvm.fmuladd.f64(double %318, double %319, double %317)
%321 = load double, double* %33
%322 = fmul double 4.800000e-01, %321
%323 = load double, double* %48
%324 = fneg double %322
%325 = call double @llvm.fmuladd.f64(double %324, double %323, double %320)
%326 = load double, double* %19
%327 = fmul double 0x3FEEB851EB851EB8, %326
%328 = load double, double* %50
%329 = fneg double %327
%330 = call double @llvm.fmuladd.f64(double %329, double %328, double %325)
%331 = load double, double* %19
%332 = fmul double 0x3FEEB851EB851EB8, %331
%333 = load double, double* %52
%334 = fneg double %332
%335 = call double @llvm.fmuladd.f64(double %334, double %333, double %330)
%336 = load double, double* %10
%337 = fmul double 4.800000e-01, %336
%338 = load double, double* %38
%339 = fneg double %337
%340 = call double @llvm.fmuladd.f64(double %339, double %338, double %335)
%341 = load double, double* %16
%342 = fmul double 0x3FEEB851EB851EB8, %341
%343 = load double, double* %51
%344 = fmul double %342, %343
%345 = load double, double* %39
%346 = call double @llvm.fmuladd.f64(double %344, double %345, double %340)
%347 = load double, double* %10
%348 = fmul double 4.800000e-01, %347
%349 = load double, double* %41
%350 = fneg double %348
%351 = call double @llvm.fmuladd.f64(double %350, double %349, double %346)
%352 = load double*, double** %4
%353 = getelementptr inbounds double, double* %352, i64 3
store double %351, double* %353
%354 = load double*, double** %4
%355 = getelementptr inbounds double, double* %354, i64 4
store double 0.000000e+00, double* %355
%356 = load double, double* %13
%357 = load double, double* %51
%358 = fmul double %356, %357
store double %358, double* %12
%359 = load double, double* %43
%360 = fmul double 4.800000e-01, %359
%361 = load double, double* %22
%362 = load double, double* %28
%363 = fmul double 0x3FEEB851EB851EB8, %362
%364 = load double, double* %34
%365 = fmul double %363, %364
%366 = call double @llvm.fmuladd.f64(double %360, double %361, double %365)
%367 = load double, double* %28
%368 = fmul double 0x3FEEB851EB851EB8, %367
%369 = load double, double* %35
%370 = fneg double %368
%371 = call double @llvm.fmuladd.f64(double %370, double %369, double %366)
%372 = load double, double* %12
%373 = fmul double 4.800000e-01, %372
%374 = load double, double* %38
%375 = call double @llvm.fmuladd.f64(double %373, double %374, double %371)
%376 = load double, double* %13
%377 = fmul double 0x3FEEB851EB851EB8, %376
%378 = load double, double* %23
%379 = fmul double %377, %378
%380 = load double, double* %39
%381 = call double @llvm.fmuladd.f64(double %379, double %380, double %375)
%382 = load double, double* %12
%383 = fmul double 4.800000e-01, %382
%384 = load double, double* %41
%385 = call double @llvm.fmuladd.f64(double %383, double %384, double %381)
%386 = load double, double* %32
%387 = load double, double* %15
%388 = call double @llvm.fmuladd.f64(double %386, double %387, double %385)
%389 = load double, double* %21
%390 = fmul double 0x3FEEB851EB851EB8, %389
%391 = load double, double* %44
%392 = call double @llvm.fmuladd.f64(double %390, double %391, double %388)
%393 = load double, double* %42
%394 = fmul double 4.800000e-01, %393
%395 = load double, double* %14
%396 = fmul double %394, %395
%397 = load double, double* %40
%398 = fneg double %396
%399 = call double @llvm.fmuladd.f64(double %398, double %397, double %392)
%400 = load double*, double** %4
%401 = getelementptr inbounds double, double* %400, i64 5
store double %399, double* %401
ret void
}

LLVM IR (-O2):
define void @ContactHessian(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
store double 0.000000e+00, double* %0
%4 = load double, double* %1
%5 = tail call double @cos(double %4)
%6 = load double, double* %2
%7 = fmul double %6, %6
%8 = fmul double %5, %7
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = load double, double* %9
%11 = tail call double @cos(double %10)
%12 = getelementptr inbounds double, double* %1, i64 2
%13 = load double, double* %12
%14 = tail call double @cos(double %13)
%15 = fmul double %11, %14
%16 = getelementptr inbounds double, double* %1, i64 3
%17 = load double, double* %16
%18 = tail call double @sin(double %17)
%19 = tail call double @sin(double %10)
%20 = tail call double @cos(double %17)
%21 = tail call double @llvm.fmuladd.f64(double %20, double -4.800000e-01, double -4.500000e-01)
%22 = fmul double %15, 4.800000e-01
%23 = fneg double %19
%24 = fmul double %21, %23
%25 = tail call double @llvm.fmuladd.f64(double %22, double %18, double %24)
%26 = tail call double @sin(double %4)
%27 = fmul double %6, %26
%28 = getelementptr inbounds double, double* %2, i64 1
%29 = load double, double* %28
%30 = fmul double %19, %29
%31 = fmul double %14, %18
%32 = tail call double @sin(double %13)
%33 = fmul double %11, %32
%34 = getelementptr inbounds double, double* %2, i64 2
%35 = load double, double* %34
%36 = getelementptr inbounds double, double* %2, i64 3
%37 = load double, double* %36
%38 = fmul double %11, %29
%39 = fmul double %30, -4.800000e-01
%40 = fmul double %33, -4.800000e-01
%41 = fmul double %35, %40
%42 = fmul double %18, %41
%43 = tail call double @llvm.fmuladd.f64(double %39, double %31, double %42)
%44 = fmul double %22, %20
%45 = tail call double @llvm.fmuladd.f64(double %44, double %37, double %43)
%46 = fneg double %38
%47 = tail call double @llvm.fmuladd.f64(double %46, double %21, double %45)
%48 = fmul double %19, -4.800000e-01
%49 = fmul double %18, %48
%50 = tail call double @llvm.fmuladd.f64(double %49, double %37, double %47)
%51 = fmul double %29, %29
%52 = fmul double %11, %51
%53 = fmul double %32, %35
%54 = fmul double %18, %53
%55 = fmul double %14, %20
%56 = fmul double %55, %37
%57 = fmul double %35, %35
%58 = fmul double %18, %57
%59 = fmul double %20, %35
%60 = fmul double %59, %37
%61 = fmul double %37, %37
%62 = fmul double %18, %61
%63 = fmul double %19, %51
%64 = fmul double %18, %37
%65 = fmul double %52, -4.800000e-01
%66 = fmul double %30, 0x3FEEB851EB851EB8
%67 = fmul double %66, %54
%68 = tail call double @llvm.fmuladd.f64(double %65, double %31, double %67)
%69 = fneg double %66
%70 = tail call double @llvm.fmuladd.f64(double %69, double %56, double %68)
%71 = fneg double %22
%72 = tail call double @llvm.fmuladd.f64(double %71, double %58, double %70)
%73 = fmul double %33, 0xBFEEB851EB851EB8
%74 = tail call double @llvm.fmuladd.f64(double %73, double %60, double %72)
%75 = tail call double @llvm.fmuladd.f64(double %71, double %62, double %74)
%76 = tail call double @llvm.fmuladd.f64(double %63, double %21, double %75)
%77 = fmul double %38, 0x3FEEB851EB851EB8
%78 = fneg double %77
%79 = tail call double @llvm.fmuladd.f64(double %78, double %64, double %76)
%80 = fmul double %20, %48
%81 = tail call double @llvm.fmuladd.f64(double %80, double %61, double %79)
%82 = fmul double %7, %26
%83 = fmul double %18, %32
%84 = fmul double %5, %6
%85 = fmul double %14, %35
%86 = fmul double %18, %85
%87 = fmul double %20, %32
%88 = fmul double %87, %37
%89 = fmul double %26, %32
%90 = fneg double %8
%91 = fmul double %27, -2.000000e+00
%92 = fmul double %91, %50
%93 = tail call double @llvm.fmuladd.f64(double %90, double %25, double %92)
%94 = tail call double @llvm.fmuladd.f64(double %5, double %81, double %93)
%95 = fmul double %82, 4.800000e-01
%96 = tail call double @llvm.fmuladd.f64(double %95, double %83, double %94)
%97 = fmul double %84, 0xBFEEB851EB851EB8
%98 = tail call double @llvm.fmuladd.f64(double %97, double %86, double %96)
%99 = tail call double @llvm.fmuladd.f64(double %97, double %88, double %98)
%100 = fmul double %89, 4.800000e-01
%101 = tail call double @llvm.fmuladd.f64(double %100, double %58, double %99)
%102 = fmul double %26, 0xBFEEB851EB851EB8
%103 = fmul double %14, %102
%104 = tail call double @llvm.fmuladd.f64(double %103, double %60, double %101)
%105 = tail call double @llvm.fmuladd.f64(double %100, double %62, double %104)
%106 = getelementptr inbounds double, double* %0, i64 1
store double %105, double* %106
%107 = getelementptr inbounds double, double* %0, i64 2
store double 0.000000e+00, double* %107
%108 = fmul double %5, %32
%109 = fneg double %82
%110 = fmul double %84, 2.000000e+00
%111 = fmul double %110, %50
%112 = tail call double @llvm.fmuladd.f64(double %109, double %25, double %111)
%113 = tail call double @llvm.fmuladd.f64(double %26, double %81, double %112)
%114 = fmul double %8, -4.800000e-01
%115 = tail call double @llvm.fmuladd.f64(double %114, double %83, double %113)
%116 = fmul double %27, 0xBFEEB851EB851EB8
%117 = tail call double @llvm.fmuladd.f64(double %116, double %86, double %115)
%118 = tail call double @llvm.fmuladd.f64(double %116, double %88, double %117)
%119 = fmul double %108, -4.800000e-01
%120 = tail call double @llvm.fmuladd.f64(double %119, double %58, double %118)
%121 = fmul double %5, 0x3FEEB851EB851EB8
%122 = fmul double %121, %14
%123 = tail call double @llvm.fmuladd.f64(double %122, double %60, double %120)
%124 = tail call double @llvm.fmuladd.f64(double %119, double %62, double %123)
%125 = getelementptr inbounds double, double* %0, i64 3
store double %124, double* %125
%126 = getelementptr inbounds double, double* %0, i64 4
store double 0.000000e+00, double* %126
%127 = fmul double %14, %19
%128 = fmul double %63, 4.800000e-01
%129 = fmul double %77, %54
%130 = tail call double @llvm.fmuladd.f64(double %128, double %31, double %129)
%131 = tail call double @llvm.fmuladd.f64(double %78, double %56, double %130)
%132 = fmul double %127, 4.800000e-01
%133 = tail call double @llvm.fmuladd.f64(double %132, double %58, double %131)
%134 = fmul double %19, 0x3FEEB851EB851EB8
%135 = fmul double %134, %32
%136 = tail call double @llvm.fmuladd.f64(double %135, double %60, double %133)
%137 = tail call double @llvm.fmuladd.f64(double %132, double %62, double %136)
%138 = tail call double @llvm.fmuladd.f64(double %52, double %21, double %137)
%139 = tail call double @llvm.fmuladd.f64(double %66, double %64, double %138)
%140 = fmul double %11, -4.800000e-01
%141 = fmul double %140, %20
%142 = tail call double @llvm.fmuladd.f64(double %141, double %61, double %139)
%143 = getelementptr inbounds double, double* %0, i64 5
store double %142, double* %143
ret void
}