#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 */
int /*<<< orphan*/ antisym(double *, double *);
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ vgg_conditioner_from_points(double *, double *, int);
void get_equations(double *pts, double *grad, int pts_size, double *vgg,
                   double *buff) {
  int i, j;
  double K[27];
  double asym[9];
  int idx;
  double crosspr[3];
  double pnormx, pnormy, dirnormx, dirnormy;
  if (pts == NULL)
    error("get_equations: invalid points list.");
  if (grad == NULL)
    error("get_equations: invalid input grad");
  if (pts_size <= 0)
    error("get_equations: invalid points size.");
  if (vgg == NULL)
    error("get_equations: invalid normalization matrix.");
  if (buff == NULL)
    error("get_equations: invalid memory buffer.");
  vgg_conditioner_from_points(vgg, pts, pts_size);
  for (i = 0; i < pts_size; i++) {
    idx = i * 4 * 6;
    pnormx = vgg[0] * pts[2 * i] + vgg[1] * pts[2 * i + 1] + vgg[2];
    pnormy = vgg[3] * pts[2 * i] + vgg[4] * pts[2 * i + 1] + vgg[5];
    dirnormx = -vgg[0] * grad[2 * i + 1] + vgg[1] * grad[2 * i];
    dirnormy = -vgg[3] * grad[2 * i + 1] + vgg[4] * grad[2 * i];
    crosspr[0] = -dirnormy;
    crosspr[1] = dirnormx;
    crosspr[2] = pnormx * dirnormy - pnormy * dirnormx;
    antisym(crosspr, asym);
    for (j = 0; j < 9; j++)
      K[j] = asym[j] * pnormx;
    for (j = 0; j < 9; j++)
      K[j + 9] = asym[j] * pnormy;
    for (j = 0; j < 9; j++)
      K[j + 18] = asym[j];
    buff[idx] = -K[0];
    buff[idx + 1] = -(K[3] + K[9]);
    buff[idx + 2] = -(K[6] + K[18]);
    buff[idx + 3] = -K[12];
    buff[idx + 4] = -(K[15] + K[21]);
    buff[idx + 5] = -K[24];
    buff[idx + 6] = -K[1];
    buff[idx + 6 + 1] = -(K[4] + K[10]);
    buff[idx + 6 + 2] = -(K[7] + K[19]);
    buff[idx + 6 + 3] = -K[13];
    buff[idx + 6 + 4] = -(K[16] + K[22]);
    buff[idx + 6 + 5] = -K[25];
    buff[idx + 12] = -K[2];
    buff[idx + 12 + 1] = -(K[5] + K[11]);
    buff[idx + 12 + 2] = -(K[8] + K[20]);
    buff[idx + 12 + 3] = -K[14];
    buff[idx + 12 + 4] = -(K[17] + K[23]);
    buff[idx + 12 + 5] = -K[26];
    buff[idx + 18] = pnormx * pnormx;
    buff[idx + 19] = 2 * pnormx * pnormy;
    buff[idx + 20] = 2 * pnormx;
    buff[idx + 21] = pnormy * pnormy;
    buff[idx + 22] = 2 * pnormy;
    buff[idx + 23] = 1;
  }
}


x86 assembly (clang, -O0):
<get_equations>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1165 <get_equations+0x35>
lea    0xeb0(%rip),%rdi
call   1050 <error@plt>
cmpq   $0x0,-0x10(%rbp)
jne    117c <get_equations+0x4c>
lea    0xebd(%rip),%rdi
call   1050 <error@plt>
cmpl   $0x0,-0x14(%rbp)
jg     1192 <get_equations+0x62>
lea    0xec9(%rip),%rdi
call   1050 <error@plt>
cmpq   $0x0,-0x20(%rbp)
jne    11a9 <get_equations+0x79>
lea    0xed6(%rip),%rdi
call   1050 <error@plt>
cmpq   $0x0,-0x28(%rbp)
jne    11c0 <get_equations+0x90>
lea    0xeec(%rip),%rdi
call   1050 <error@plt>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <vgg_conditioner_from_points@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1982 <get_equations+0x852>
mov    -0x2c(%rbp),%eax
shl    $0x2,%eax
imul   $0x6,%eax,%eax
mov    %eax,-0x164(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x188(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x190(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x198(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  -0x1a0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x198(%rbp),%xmm0
ff
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x188(%rbp),%xmm0
ff
movsd  -0x1a0(%rbp),%xmm2
ff
movsd  -0x190(%rbp),%xmm1
ff
mulsd  -0x198(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
lea    -0x180(%rbp),%rdi
lea    -0x160(%rbp),%rsi
call   1030 <antisym@plt>
movl   $0x0,-0x30(%rbp)
cmpl   $0x9,-0x30(%rbp)
jge    1426 <get_equations+0x2f6>
movslq -0x30(%rbp),%rax
movsd  -0x160(%rbp,%rax,8),%xmm0
ff ff
mulsd  -0x188(%rbp),%xmm0
ff
movslq -0x30(%rbp),%rax
movsd  %xmm0,-0x110(%rbp,%rax,8)
ff ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13ec <get_equations+0x2bc>
movl   $0x0,-0x30(%rbp)
cmpl   $0x9,-0x30(%rbp)
jge    146b <get_equations+0x33b>
movslq -0x30(%rbp),%rax
movsd  -0x160(%rbp,%rax,8),%xmm0
ff ff
mulsd  -0x190(%rbp),%xmm0
ff
mov    -0x30(%rbp),%eax
add    $0x9,%eax
cltq
movsd  %xmm0,-0x110(%rbp,%rax,8)
ff ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    142d <get_equations+0x2fd>
movl   $0x0,-0x30(%rbp)
cmpl   $0x9,-0x30(%rbp)
jge    14a8 <get_equations+0x378>
movslq -0x30(%rbp),%rax
movsd  -0x160(%rbp,%rax,8),%xmm0
ff ff
mov    -0x30(%rbp),%eax
add    $0x12,%eax
cltq
movsd  %xmm0,-0x110(%rbp,%rax,8)
ff ff
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1472 <get_equations+0x342>
movsd  -0x110(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x164(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xf8(%rbp),%xmm0
ff
addsd  -0xc8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xe0(%rbp),%xmm0
ff
addsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xb0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x108(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xf0(%rbp),%xmm0
ff
addsd  -0xc0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x6,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xd8(%rbp),%xmm0
ff
addsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x6,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xa8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x6,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x6,%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x6,%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x100(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0xc,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xe8(%rbp),%xmm0
ff
addsd  -0xb8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0xc,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xd0(%rbp),%xmm0
ff
addsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0xc,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xa0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0xc,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x88(%rbp),%xmm0
ff
addsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0xc,%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0xc,%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x188(%rbp),%xmm0
ff
mulsd  -0x188(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x12,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x745(%rip),%xmm0
mulsd  -0x188(%rbp),%xmm0
ff
mulsd  -0x190(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x13,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x718(%rip),%xmm0
mulsd  -0x188(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x14,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x190(%rbp),%xmm0
ff
mulsd  -0x190(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x15,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x6ce(%rip),%xmm0
mulsd  -0x190(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x16,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
mov    -0x164(%rbp),%ecx
add    $0x17,%ecx
movslq %ecx,%rcx
movsd  0x691(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11d7 <get_equations+0xa7>
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_equations>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r8,%rbx
mov    %rcx,%r14
mov    %edx,%ebp
mov    %rsi,%r15
mov    %rdi,%r13
test   %rdi,%rdi
je     15bf <get_equations+0x48f>
test   %r15,%r15
je     15d4 <get_equations+0x4a4>
test   %ebp,%ebp
jle    15e8 <get_equations+0x4b8>
test   %r14,%r14
je     15fd <get_equations+0x4cd>
test   %rbx,%rbx
je     1612 <get_equations+0x4e2>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %ebp,%edx
call   1040 <vgg_conditioner_from_points@plt>
test   %ebp,%ebp
jle    15ad <get_equations+0x47d>
mov    %ebp,%eax
shl    $0x3,%rax
lea    (%rax,%rax,2),%rax
mov    %rax,0x10(%rsp)
movabs $0xb00000000,%r8
movabs $0xa00000000,%rsi
movabs $0x900000000,%rdi
movabs $0x800000000,%rcx
mov    $0x8,%eax
xor    %edx,%edx
mov    %rbx,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rsi,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    %rdi,0x28(%rsp)
movsd  (%r14),%xmm1
movsd  0x8(%r14),%xmm0
movsd  -0x8(%r13,%rax,1),%xmm5
movsd  0x0(%r13,%rax,1),%xmm2
movapd %xmm0,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm1,%xmm4
mulsd  %xmm5,%xmm4
addsd  %xmm3,%xmm4
addsd  0x10(%r14),%xmm4
movapd %xmm4,%xmm7
movapd %xmm4,0xb0(%rsp)
movsd  0x18(%r14),%xmm3
movsd  0x20(%r14),%xmm4
mulsd  %xmm4,%xmm2
mulsd  %xmm3,%xmm5
addsd  %xmm2,%xmm5
addsd  0x28(%r14),%xmm5
movapd %xmm5,%xmm6
movsd  -0x8(%r15,%rax,1),%xmm2
movsd  (%r15,%rax,1),%xmm5
mulsd  %xmm2,%xmm0
mulsd  %xmm5,%xmm1
subsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm4
mulsd  %xmm5,%xmm3
subsd  %xmm3,%xmm4
movapd %xmm7,%xmm1
mulsd  %xmm4,%xmm1
movapd 0xd7a(%rip),%xmm3
xorpd  %xmm3,%xmm4
movlpd %xmm4,0x30(%rsp)
movsd  %xmm0,0x38(%rsp)
movapd %xmm6,0xa0(%rsp)
movapd %xmm6,%xmm2
xorpd  %xmm3,%xmm2
movapd %xmm2,0xc0(%rsp)
mulsd  %xmm6,%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rsp)
lea    0x30(%rsp),%rdi
lea    0x50(%rsp),%rsi
mov    %r15,%r12
mov    %r14,%r15
mov    %r8,%r14
mov    %rcx,%rbp
mov    %rdx,%rbx
call   1030 <antisym@plt>
mov    %rbx,%rdx
mov    %rbp,%rcx
mov    0x28(%rsp),%rdi
mov    0x18(%rsp),%rsi
mov    0x8(%rsp),%rbx
mov    %r14,%r8
mov    %r15,%r14
mov    %r12,%r15
movsd  0x50(%rsp),%xmm2
movsd  0x58(%rsp),%xmm6
movsd  0x60(%rsp),%xmm9
movsd  0x68(%rsp),%xmm7
movsd  0x70(%rsp),%xmm13
movsd  0x78(%rsp),%xmm8
movsd  0x80(%rsp),%xmm1
movapd 0xb0(%rsp),%xmm4
movapd %xmm4,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x88(%rsp),%xmm11
movsd  0x90(%rsp),%xmm10
movapd 0xa0(%rsp),%xmm15
movapd %xmm15,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm4,%xmm5
movapd 0xc91(%rip),%xmm12
xorpd  %xmm12,%xmm5
addsd  %xmm2,%xmm0
mulsd  %xmm5,%xmm2
mov    %edx,%eax
and    $0xfffffff8,%eax
movsd  %xmm2,(%rbx,%rax,8)
movapd %xmm4,%xmm2
movapd %xmm4,%xmm14
mulsd  %xmm7,%xmm2
addsd  %xmm2,%xmm3
xorpd  %xmm12,%xmm3
xorpd  %xmm12,%xmm0
unpcklpd %xmm0,%xmm3
movupd %xmm3,0x8(%rbx,%rax,8)
movapd %xmm15,%xmm2
movapd %xmm15,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm7,%xmm0
movapd 0xc0(%rsp),%xmm4
mulsd  %xmm4,%xmm7
movsd  %xmm7,0x18(%rbx,%rax,8)
xorpd  %xmm12,%xmm0
xorpd  %xmm12,%xmm1
unpcklpd %xmm1,%xmm0
movapd %xmm14,%xmm3
movapd %xmm14,%xmm1
mulsd  %xmm11,%xmm1
movupd %xmm0,0x20(%rbx,%rax,8)
movapd %xmm2,%xmm0
movapd %xmm2,%xmm7
mulsd  %xmm6,%xmm0
addsd  %xmm6,%xmm1
mulsd  %xmm5,%xmm6
movsd  %xmm6,0x30(%rbx,%rax,8)
movapd %xmm14,%xmm2
mulsd  %xmm13,%xmm2
addsd  %xmm2,%xmm0
xorpd  %xmm12,%xmm0
movlpd %xmm0,0x38(%rbx,%rax,8)
xorpd  %xmm12,%xmm1
mov    %rbp,%rax
sar    $0x1d,%rax
movlpd %xmm1,(%rbx,%rax,1)
movapd %xmm7,%xmm0
mulsd  %xmm11,%xmm0
addsd  %xmm13,%xmm0
mulsd  %xmm4,%xmm13
movapd %xmm4,%xmm2
mov    %rdi,%rax
sar    $0x1d,%rax
movsd  %xmm13,(%rbx,%rax,1)
xorpd  %xmm12,%xmm0
mov    %rsi,%rax
sar    $0x1d,%rax
movlpd %xmm0,(%rbx,%rax,1)
xorpd  %xmm12,%xmm11
mov    %r8,%rax
sar    $0x1d,%rax
movlpd %xmm11,(%rbx,%rax,1)
movapd %xmm14,%xmm0
mulsd  %xmm8,%xmm0
mulsd  %xmm9,%xmm5
lea    0xc(%rdx),%eax
and    $0xfffffffc,%eax
movsd  %xmm5,(%rbx,%rax,8)
movapd %xmm7,%xmm1
mulsd  %xmm9,%xmm1
addsd  %xmm0,%xmm1
xorpd  %xmm12,%xmm1
lea    0xd(%rdx),%eax
and    $0xfffffffd,%eax
movlpd %xmm1,(%rbx,%rax,8)
movapd %xmm14,%xmm0
mulsd  %xmm10,%xmm0
addsd  %xmm9,%xmm0
xorpd  %xmm12,%xmm0
lea    0xe(%rdx),%eax
and    $0xfffffffe,%eax
movlpd %xmm0,(%rbx,%rax,8)
movapd %xmm4,%xmm0
mulsd  %xmm8,%xmm0
lea    0xf(%rdx),%eax
movsd  %xmm0,(%rbx,%rax,8)
movapd %xmm7,%xmm0
mulsd  %xmm10,%xmm0
addsd  %xmm8,%xmm0
xorpd  %xmm12,%xmm0
lea    0x10(%rdx),%eax
and    $0xfffffff8,%eax
movlpd %xmm0,(%rbx,%rax,8)
xorpd  %xmm12,%xmm10
lea    0x11(%rdx),%eax
and    $0xfffffff9,%eax
movlpd %xmm10,(%rbx,%rax,8)
movapd %xmm14,%xmm0
mulsd  %xmm14,%xmm0
lea    0x12(%rdx),%eax
and    $0xfffffffa,%eax
movsd  %xmm0,(%rbx,%rax,8)
addsd  %xmm14,%xmm3
movapd %xmm3,%xmm0
mulsd  %xmm7,%xmm0
lea    0x13(%rdx),%eax
and    $0xfffffffb,%eax
movsd  %xmm0,(%rbx,%rax,8)
lea    0x14(%rdx),%eax
and    $0xfffffffc,%eax
movsd  %xmm3,(%rbx,%rax,8)
movapd %xmm7,%xmm0
mulsd  %xmm7,%xmm0
lea    0x15(%rdx),%eax
and    $0xfffffffd,%eax
movsd  %xmm0,(%rbx,%rax,8)
addsd  %xmm7,%xmm7
lea    0x16(%rdx),%eax
and    $0xfffffffe,%eax
movsd  %xmm7,(%rbx,%rax,8)
lea    0x17(%rdx),%eax
movabs $0x3ff0000000000000,%rbp
mov    %rbp,(%rbx,%rax,8)
movabs $0x1800000000,%rax
add    %rax,%r8
add    %rax,%rsi
add    %rax,%rdi
add    %rax,%rcx
mov    0x20(%rsp),%rax
add    $0x18,%rdx
add    $0x10,%rax
cmp    %rdx,0x10(%rsp)
jne    11e0 <get_equations+0xb0>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa4a(%rip),%rdi
call   1050 <error@plt>
test   %r15,%r15
jne    1161 <get_equations+0x31>
lea    0xa59(%rip),%rdi
call   1050 <error@plt>
test   %ebp,%ebp
jg     1169 <get_equations+0x39>
lea    0xa67(%rip),%rdi
call   1050 <error@plt>
test   %r14,%r14
jne    1172 <get_equations+0x42>
lea    0xa76(%rip),%rdi
call   1050 <error@plt>
test   %rbx,%rbx
jne    117b <get_equations+0x4b>
lea    0xa8e(%rip),%rdi
call   1050 <error@plt>
jmp    117b <get_equations+0x4b>

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

LLVM IR (-O2):
@.str = [36 x i8] c"get_equations: invalid points list.\00"
@.str.1 = [34 x i8] c"get_equations: invalid input grad\00"
@.str.2 = [36 x i8] c"get_equations: invalid points size.\00"
@.str.3 = [45 x i8] c"get_equations: invalid normalization matrix.\00"
@.str.4 = [38 x i8] c"get_equations: invalid memory buffer.\00"
define void @get_equations(double* %0, double* %1, i32 %2, double* %3, double* writeonly %4) {
%6 = alloca [9 x double]
%7 = alloca [3 x double]
%8 = bitcast [9 x double]* %6 to i8*
%9 = bitcast [3 x double]* %7 to i8*
%10 = icmp eq double* %0, null
br i1 %10, label %11, label %13
11: ; preds = %5
%12 = tail call i32 @error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %5
%14 = icmp eq double* %1, null
br i1 %14, label %15, label %17
15: ; preds = %13
%16 = tail call i32 @error(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
%18 = icmp slt i32 %2, 1
br i1 %18, label %19, label %21
19: ; preds = %17
%20 = tail call i32 @error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
%22 = icmp eq double* %3, null
br i1 %22, label %23, label %25
23: ; preds = %21
%24 = tail call i32 @error(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
%26 = icmp eq double* %4, null
br i1 %26, label %27, label %29
27: ; preds = %25
%28 = tail call i32 @error(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
br label %29
29: ; preds = %27, %25
%30 = tail call i32 @vgg_conditioner_from_points(double* %3, double* %0, i32 %2)
%31 = icmp sgt i32 %2, 0
br i1 %31, label %32, label %223
32: ; preds = %29
%33 = getelementptr inbounds double, double* %3, i64 1
%34 = getelementptr inbounds double, double* %3, i64 2
%35 = getelementptr inbounds double, double* %3, i64 3
%36 = getelementptr inbounds double, double* %3, i64 4
%37 = getelementptr inbounds double, double* %3, i64 5
%38 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%39 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 1
%40 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 2
%41 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 0
%42 = zext i32 %2 to i64
%43 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 1
%44 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 2
%45 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 3
%46 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 4
%47 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 5
%48 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 6
%49 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 7
%50 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 8
br label %51
51: ; preds = %32, %51
%52 = phi i64 [ 0, %32 ], [ %221, %51 ]
%53 = load double, double* %3
%54 = shl nuw nsw i64 %52, 1
%55 = getelementptr inbounds double, double* %0, i64 %54
%56 = load double, double* %55
%57 = load double, double* %33
%58 = or i64 %54, 1
%59 = getelementptr inbounds double, double* %0, i64 %58
%60 = load double, double* %59
%61 = fmul double %57, %60
%62 = call double @llvm.fmuladd.f64(double %53, double %56, double %61)
%63 = load double, double* %34
%64 = fadd double %63, %62
%65 = load double, double* %35
%66 = load double, double* %36
%67 = fmul double %60, %66
%68 = call double @llvm.fmuladd.f64(double %65, double %56, double %67)
%69 = load double, double* %37
%70 = fadd double %69, %68
%71 = fneg double %53
%72 = getelementptr inbounds double, double* %1, i64 %58
%73 = load double, double* %72
%74 = getelementptr inbounds double, double* %1, i64 %54
%75 = load double, double* %74
%76 = fmul double %57, %75
%77 = call double @llvm.fmuladd.f64(double %71, double %73, double %76)
%78 = fneg double %65
%79 = fmul double %66, %75
%80 = call double @llvm.fmuladd.f64(double %78, double %73, double %79)
%81 = fneg double %80
store double %81, double* %38
store double %77, double* %39
%82 = fneg double %70
%83 = fmul double %77, %82
%84 = call double @llvm.fmuladd.f64(double %64, double %80, double %83)
store double %84, double* %40
%85 = call i32 @antisym(double* %38, double* %41)
%86 = load double, double* %41
%87 = load double, double* %43
%88 = load double, double* %44
%89 = load double, double* %45
%90 = fmul double %64, %89
%91 = load double, double* %46
%92 = fmul double %64, %91
%93 = load double, double* %47
%94 = fmul double %64, %93
%95 = load double, double* %48
%96 = fmul double %64, %95
%97 = load double, double* %49
%98 = fmul double %64, %97
%99 = load double, double* %50
%100 = fmul double %64, %99
%101 = fmul double %70, %86
%102 = fmul double %70, %87
%103 = fmul double %70, %88
%104 = fmul double %70, %95
%105 = fmul double %70, %97
%106 = fmul double %70, %99
%107 = mul nuw nsw i64 %52, 24
%108 = fneg double %64
%109 = fmul double %86, %108
%110 = and i64 %107, 4294967288
%111 = getelementptr inbounds double, double* %4, i64 %110
store double %109, double* %111
%112 = fadd double %90, %101
%113 = fneg double %112
%114 = and i64 %107, 4294967288
%115 = or i64 %114, 1
%116 = getelementptr inbounds double, double* %4, i64 %115
store double %113, double* %116
%117 = fadd double %96, %86
%118 = fneg double %117
%119 = and i64 %107, 4294967288
%120 = or i64 %119, 2
%121 = getelementptr inbounds double, double* %4, i64 %120
store double %118, double* %121
%122 = fneg double %70
%123 = fmul double %89, %122
%124 = and i64 %107, 4294967288
%125 = or i64 %124, 3
%126 = getelementptr inbounds double, double* %4, i64 %125
store double %123, double* %126
%127 = fadd double %104, %89
%128 = fneg double %127
%129 = and i64 %107, 4294967288
%130 = or i64 %129, 4
%131 = getelementptr inbounds double, double* %4, i64 %130
store double %128, double* %131
%132 = fneg double %95
%133 = and i64 %107, 4294967288
%134 = or i64 %133, 5
%135 = getelementptr inbounds double, double* %4, i64 %134
store double %132, double* %135
%136 = fneg double %64
%137 = fmul double %87, %136
%138 = and i64 %107, 4294967288
%139 = or i64 %138, 6
%140 = getelementptr inbounds double, double* %4, i64 %139
store double %137, double* %140
%141 = fadd double %92, %102
%142 = fneg double %141
%143 = and i64 %107, 4294967288
%144 = or i64 %143, 7
%145 = getelementptr inbounds double, double* %4, i64 %144
store double %142, double* %145
%146 = fadd double %98, %87
%147 = fneg double %146
%148 = mul i64 %52, 103079215104
%149 = add i64 %148, 34359738368
%150 = ashr exact i64 %149, 32
%151 = getelementptr inbounds double, double* %4, i64 %150
store double %147, double* %151
%152 = fneg double %70
%153 = fmul double %91, %152
%154 = mul i64 %52, 103079215104
%155 = add i64 %154, 38654705664
%156 = ashr exact i64 %155, 32
%157 = getelementptr inbounds double, double* %4, i64 %156
store double %153, double* %157
%158 = fadd double %105, %91
%159 = fneg double %158
%160 = mul i64 %52, 103079215104
%161 = add i64 %160, 42949672960
%162 = ashr exact i64 %161, 32
%163 = getelementptr inbounds double, double* %4, i64 %162
store double %159, double* %163
%164 = fneg double %97
%165 = mul i64 %52, 103079215104
%166 = add i64 %165, 47244640256
%167 = ashr exact i64 %166, 32
%168 = getelementptr inbounds double, double* %4, i64 %167
store double %164, double* %168
%169 = fneg double %64
%170 = fmul double %88, %169
%171 = add nuw i64 %107, 12
%172 = and i64 %171, 4294967292
%173 = getelementptr inbounds double, double* %4, i64 %172
store double %170, double* %173
%174 = fadd double %94, %103
%175 = fneg double %174
%176 = add nuw i64 %107, 13
%177 = and i64 %176, 4294967293
%178 = getelementptr inbounds double, double* %4, i64 %177
store double %175, double* %178
%179 = fadd double %100, %88
%180 = fneg double %179
%181 = add nuw i64 %107, 14
%182 = and i64 %181, 4294967294
%183 = getelementptr inbounds double, double* %4, i64 %182
store double %180, double* %183
%184 = fneg double %70
%185 = fmul double %93, %184
%186 = add nuw i64 %107, 15
%187 = and i64 %186, 4294967295
%188 = getelementptr inbounds double, double* %4, i64 %187
store double %185, double* %188
%189 = fadd double %106, %93
%190 = fneg double %189
%191 = add nuw i64 %107, 16
%192 = and i64 %191, 4294967288
%193 = getelementptr inbounds double, double* %4, i64 %192
store double %190, double* %193
%194 = fneg double %99
%195 = add nuw i64 %107, 17
%196 = and i64 %195, 4294967289
%197 = getelementptr inbounds double, double* %4, i64 %196
store double %194, double* %197
%198 = fmul double %64, %64
%199 = add nuw i64 %107, 18
%200 = and i64 %199, 4294967290
%201 = getelementptr inbounds double, double* %4, i64 %200
store double %198, double* %201
%202 = fmul double %64, 2.000000e+00
%203 = fmul double %202, %70
%204 = add nuw i64 %107, 19
%205 = and i64 %204, 4294967291
%206 = getelementptr inbounds double, double* %4, i64 %205
store double %203, double* %206
%207 = add nuw i64 %107, 20
%208 = and i64 %207, 4294967292
%209 = getelementptr inbounds double, double* %4, i64 %208
store double %202, double* %209
%210 = fmul double %70, %70
%211 = add nuw i64 %107, 21
%212 = and i64 %211, 4294967293
%213 = getelementptr inbounds double, double* %4, i64 %212
store double %210, double* %213
%214 = fmul double %70, 2.000000e+00
%215 = add nuw i64 %107, 22
%216 = and i64 %215, 4294967294
%217 = getelementptr inbounds double, double* %4, i64 %216
store double %214, double* %217
%218 = add nuw i64 %107, 23
%219 = and i64 %218, 4294967295
%220 = getelementptr inbounds double, double* %4, i64 %219
store double 1.000000e+00, double* %220
%221 = add nuw nsw i64 %52, 1
%222 = icmp eq i64 %221, %42
br i1 %222, label %223, label %51
223: ; preds = %51, %29
ret void
}