#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*/ cross(double *, double *, double *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
double norm(double *);
int /*<<< orphan*/ stderr;
void compute_face_geometry(int ndims, double *coords, int nfaces, int *nodepos,
                           int *facenodes, double *fnormals, double *fcentroids,
                           double *fareas) {
  int f;
  double x[3];
  double u[3];
  double v[3];
  double w[3];
  int i, k;
  int node;
  double cface[3] = {0};
  double n[3] = {0};
  const double twothirds = 0.666666666666666666666666666667;
  for (f = 0; f < nfaces; ++f) {
    int num_face_nodes;
    double area = 0.0;
    for (i = 0; i < ndims; ++i)
      x[i] = 0.0;
    for (i = 0; i < ndims; ++i)
      n[i] = 0.0;
    for (i = 0; i < ndims; ++i)
      cface[i] = 0.0;
    for (k = nodepos[f]; k < nodepos[f + 1]; ++k) {
      node = facenodes[k];
      for (i = 0; i < ndims; ++i)
        x[i] += coords[3 * node + i];
    }
    num_face_nodes = nodepos[f + 1] - nodepos[f];
    for (i = 0; i < ndims; ++i)
      x[i] /= num_face_nodes;
    node = facenodes[nodepos[f + 1] - 1];
    for (i = 0; i < ndims; ++i)
      u[i] = coords[3 * node + i] - x[i];
    for (k = nodepos[f]; k < nodepos[f + 1]; ++k) {
      double a;
      node = facenodes[k];
      for (i = 0; i < ndims; ++i)
        v[i] = coords[3 * node + i] - x[i];
      cross(u, v, w);
      a = 0.5 * norm(w);
      area += a;
      if (!(a > 0)) {
        fprintf(stderr, "Internal error in compute_face_geometry.");
      }
      for (i = 0; i < ndims; ++i)
        n[i] += w[i];
      for (i = 0; i < ndims; ++i)
        cface[i] += a * (x[i] + twothirds * 0.5 * (u[i] + v[i]));
      for (i = 0; i < ndims; ++i)
        u[i] = v[i];
    }
    for (i = 0; i < ndims; ++i) {
      fnormals[3 * f + i] = 0.5 * n[i];
      fcentroids[3 * f + i] = cface[i] / area;
    }
    fareas[f] = area;
  }
}


x86 assembly (clang, -O0):
<compute_face_geometry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
movsd  0xe69(%rip),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1732 <compute_face_geometry+0x5f2>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11fa <compute_face_geometry+0xba>
movslq -0xb4(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp,%rax,8)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    11c7 <compute_face_geometry+0x87>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    123a <compute_face_geometry+0xfa>
movslq -0xb4(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x100(%rbp,%rax,8)
ff ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1204 <compute_face_geometry+0xc4>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    127a <compute_face_geometry+0x13a>
movslq -0xb4(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp,%rax,8)
ff ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1244 <compute_face_geometry+0x104>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x34(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jge    132d <compute_face_geometry+0x1ed>
mov    -0x28(%rbp),%rax
movslq -0xb8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xbc(%rbp)
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1314 <compute_face_geometry+0x1d4>
mov    -0x10(%rbp),%rax
imul   $0x3,-0xbc(%rbp),%ecx
add    -0xb4(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0xb4(%rbp),%rax
addsd  -0x50(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x50(%rbp,%rax,8)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    12c5 <compute_face_geometry+0x185>
jmp    1319 <compute_face_geometry+0x1d9>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    128b <compute_face_geometry+0x14b>
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x20(%rbp),%rcx
movslq -0x34(%rbp),%rdx
sub    (%rcx,%rdx,4),%eax
mov    %eax,-0x10c(%rbp)
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    139a <compute_face_geometry+0x25a>
cvtsi2sdl -0x10c(%rbp),%xmm1
ff
movslq -0xb4(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp,%rax,8)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1358 <compute_face_geometry+0x218>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    -0x34(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xbc(%rbp)
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    141d <compute_face_geometry+0x2dd>
mov    -0x10(%rbp),%rax
imul   $0x3,-0xbc(%rbp),%ecx
add    -0xb4(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0xb4(%rbp),%rax
subsd  -0x50(%rbp,%rax,8),%xmm0
movslq -0xb4(%rbp),%rax
movsd  %xmm0,-0x70(%rbp,%rax,8)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    13c7 <compute_face_geometry+0x287>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x34(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jge    1686 <compute_face_geometry+0x546>
mov    -0x28(%rbp),%rax
movslq -0xb8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xbc(%rbp)
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    14c1 <compute_face_geometry+0x381>
mov    -0x10(%rbp),%rax
imul   $0x3,-0xbc(%rbp),%ecx
add    -0xb4(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0xb4(%rbp),%rax
subsd  -0x50(%rbp,%rax,8),%xmm0
movslq -0xb4(%rbp),%rax
movsd  %xmm0,-0x90(%rbp,%rax,8)
ff ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1468 <compute_face_geometry+0x328>
lea    -0x70(%rbp),%rdi
lea    -0x90(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
call   1060 <cross@plt>
lea    -0xb0(%rbp),%rdi
call   1050 <norm@plt>
movaps %xmm0,%xmm1
movsd  0xb19(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
addsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
ja     153d <compute_face_geometry+0x3fd>
mov    0x2ab1(%rip),%rax
mov    (%rax),%edi
lea    0xae0(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1593 <compute_face_geometry+0x453>
movslq -0xb4(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
movslq -0xb4(%rbp),%rax
addsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x100(%rbp,%rax,8)
ff ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1547 <compute_face_geometry+0x407>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1623 <compute_face_geometry+0x4e3>
movsd  -0x120(%rbp),%xmm0
ff
movslq -0xb4(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm1
movslq -0xb4(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm2
movslq -0xb4(%rbp),%rax
addsd  -0x90(%rbp,%rax,8),%xmm2
ff ff
movsd  0xa2a(%rip),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movslq -0xb4(%rbp),%rax
movsd  -0xe0(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp,%rax,8)
ff ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    159d <compute_face_geometry+0x45d>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    166d <compute_face_geometry+0x52d>
movslq -0xb4(%rbp),%rax
movsd  -0x90(%rbp,%rax,8),%xmm0
ff ff
movslq -0xb4(%rbp),%rax
movsd  %xmm0,-0x70(%rbp,%rax,8)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    162d <compute_face_geometry+0x4ed>
jmp    1672 <compute_face_geometry+0x532>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    142e <compute_face_geometry+0x2ee>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    170f <compute_face_geometry+0x5cf>
movslq -0xb4(%rbp),%rax
movsd  0x95a(%rip),%xmm0
mulsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
mov    -0x30(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    -0xb4(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0xb4(%rbp),%rax
movsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
divsd  -0x118(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
imul   $0x3,-0x34(%rbp),%ecx
add    -0xb4(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1690 <compute_face_geometry+0x550>
movsd  -0x118(%rbp),%xmm0
ff
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11a6 <compute_face_geometry+0x66>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_face_geometry>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x198,%rsp
mov    %r9,0xc8(%rsp)
mov    %r8,0xd8(%rsp)
mov    %rcx,0x108(%rsp)
mov    %rsi,0x28(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x50(%rsp)
movq   $0x0,0x60(%rsp)
movapd %xmm0,0x30(%rsp)
movq   $0x0,0x40(%rsp)
test   %edx,%edx
jle    1cdb <compute_face_geometry+0xb8b>
mov    %edi,%ebp
mov    0x1d0(%rsp),%r8
mov    %edi,%r13d
lea    0x0(,%r13,8),%r15
mov    %edx,%eax
mov    %rax,0x170(%rsp)
mov    0xc8(%rsp),%rdx
lea    (%rdx,%r13,8),%rax
lea    (%r8,%r13,8),%rcx
mov    %r13d,%esi
and    $0xfffffffc,%esi
mov    %rsi,0x48(%rsp)
lea    -0x4(%rsi),%rdi
mov    %rdi,0x88(%rsp)
mov    %rdi,%rbx
shr    $0x2,%rbx
add    $0x1,%rbx
mov    %r13d,%edi
and    $0xfffffffe,%edi
mov    %rdi,0xf8(%rsp)
add    $0xfffffffffffffffe,%rdi
mov    %rdi,0xf0(%rsp)
mov    %rdi,%rsi
shr    %rsi
add    $0x1,%rsi
mov    %rbx,%rdi
mov    %rbx,0x80(%rsp)
and    $0xfffffffffffffffe,%rbx
mov    %rbx,0x78(%rsp)
mov    %rsi,%rdi
mov    %rsi,0xe8(%rsp)
and    $0xfffffffffffffffe,%rsi
mov    %rsi,0xe0(%rsp)
cmp    %rdx,%rcx
seta   %cl
cmp    %r8,%rax
seta   %al
and    %cl,%al
mov    %al,0xf(%rsp)
mov    %r13,%rax
neg    %rax
mov    %rax,0x168(%rsp)
mov    %r15,0x100(%rsp)
and    $0xffffffffffffffe0,%r15
movsd  0xd84(%rip),%xmm4
movapd 0xdac(%rip),%xmm5
mov    0x28(%rsp),%rax
add    $0x30,%rax
mov    %rax,0xd0(%rsp)
lea    0x10(%r8),%rax
mov    %rax,0x150(%rsp)
lea    0x10(%rdx),%rax
mov    %rax,0x148(%rsp)
lea    0x8(%r8),%rax
mov    %rax,0x160(%rsp)
lea    0x8(%rdx),%rax
mov    %rax,0x158(%rsp)
xor    %r9d,%r9d
xor    %ebx,%ebx
jmp    12f4 <compute_face_geometry+0x1a4>
nopl   0x0(%rax)
mov    0x1d8(%rsp),%rax
mov    0x70(%rsp),%rcx
movsd  %xmm2,(%rax,%rcx,8)
add    $0x3,%r9d
cmp    0x170(%rsp),%rbx
je     1cdb <compute_face_geometry+0xb8b>
mov    %r9,0x178(%rsp)
mov    %rbx,0x70(%rsp)
test   %ebp,%ebp
jle    134a <compute_face_geometry+0x1fa>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
mov    0x100(%rsp),%rbx
mov    %rbx,%rdx
call   1030 <memset@plt>
lea    0x30(%rsp),%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
lea    0x50(%rsp),%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
movapd 0xcee(%rip),%xmm5
movsd  0xcb6(%rip),%xmm4
mov    0x108(%rsp),%rax
mov    0x70(%rsp),%rcx
movslq (%rax,%rcx,4),%r12
movslq 0x4(%rax,%rcx,4),%rax
cmp    %r12d,%eax
jle    14b0 <compute_face_geometry+0x360>
mov    %r12,%rcx
jmp    137d <compute_face_geometry+0x22d>
xchg   %ax,%ax
add    $0x1,%rcx
cmp    %rax,%rcx
je     14b0 <compute_face_geometry+0x360>
test   %ebp,%ebp
jle    1370 <compute_face_geometry+0x220>
mov    0xd8(%rsp),%rdx
movslq (%rdx,%rcx,4),%rdx
lea    (%rdx,%rdx,2),%rdx
cmp    $0x4,%ebp
jae    13a0 <compute_face_geometry+0x250>
xor    %esi,%esi
jmp    1468 <compute_face_geometry+0x318>
nopl   (%rax)
cmpq   $0x0,0x88(%rsp)
je     149f <compute_face_geometry+0x34f>
mov    0xd0(%rsp),%rsi
lea    (%rsi,%rdx,8),%rdi
mov    0x78(%rsp),%rbx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd -0x30(%rdi,%rsi,8),%xmm0
movupd -0x20(%rdi,%rsi,8),%xmm1
addpd  0x10(%rsp,%rsi,8),%xmm0
addpd  0x20(%rsp,%rsi,8),%xmm1
movapd %xmm0,0x10(%rsp,%rsi,8)
movapd %xmm1,0x20(%rsp,%rsi,8)
movupd -0x10(%rdi,%rsi,8),%xmm0
movupd (%rdi,%rsi,8),%xmm1
addpd  0x30(%rsp,%rsi,8),%xmm0
addpd  0x40(%rsp,%rsi,8),%xmm1
movapd %xmm0,0x30(%rsp,%rsi,8)
movapd %xmm1,0x40(%rsp,%rsi,8)
add    $0x8,%rsi
add    $0xfffffffffffffffe,%rbx
jne    13d0 <compute_face_geometry+0x280>
testb  $0x1,0x80(%rsp)
01
je     1457 <compute_face_geometry+0x307>
lea    (%rsi,%rdx,1),%rdi
mov    0x28(%rsp),%rbx
movupd (%rbx,%rdi,8),%xmm0
movupd 0x10(%rbx,%rdi,8),%xmm1
addpd  0x10(%rsp,%rsi,8),%xmm0
addpd  0x20(%rsp,%rsi,8),%xmm1
movapd %xmm0,0x10(%rsp,%rsi,8)
movapd %xmm1,0x20(%rsp,%rsi,8)
mov    0x48(%rsp),%rdi
mov    %rdi,%rsi
cmp    %r13,%rdi
je     1370 <compute_face_geometry+0x220>
mov    0x28(%rsp),%rdi
lea    (%rdi,%rdx,8),%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rdx,%rsi,8),%xmm0
addsd  0x10(%rsp,%rsi,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rsi,8)
add    $0x1,%rsi
cmp    %rsi,%r13
jne    1480 <compute_face_geometry+0x330>
jmp    1370 <compute_face_geometry+0x220>
xor    %esi,%esi
testb  $0x1,0x80(%rsp)
01
jne    142b <compute_face_geometry+0x2db>
jmp    1457 <compute_face_geometry+0x307>
nopl   (%rax)
test   %ebp,%ebp
jle    168d <compute_face_geometry+0x53d>
mov    %eax,%ecx
sub    %r12d,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
cmp    $0x1,%ebp
jne    14d0 <compute_face_geometry+0x380>
xor    %ecx,%ecx
jmp    1560 <compute_face_geometry+0x410>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmpq   $0x0,0xf0(%rsp)
je     1c9c <compute_face_geometry+0xb4c>
mov    0xe0(%rsp),%rdx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movapd 0x10(%rsp,%rcx,8),%xmm2
movapd 0x20(%rsp,%rcx,8),%xmm3
divpd  %xmm1,%xmm2
movapd %xmm2,0x10(%rsp,%rcx,8)
divpd  %xmm1,%xmm3
movapd %xmm3,0x20(%rsp,%rcx,8)
add    $0x4,%rcx
add    $0xfffffffffffffffe,%rdx
jne    1500 <compute_face_geometry+0x3b0>
testb  $0x1,0xe8(%rsp)
01
je     1544 <compute_face_geometry+0x3f4>
movapd 0x10(%rsp,%rcx,8),%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,0x10(%rsp,%rcx,8)
mov    0xf8(%rsp),%rdx
mov    %rdx,%rcx
cmp    %r13,%rdx
je     1579 <compute_face_geometry+0x429>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x10(%rsp,%rcx,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r13
jne    1560 <compute_face_geometry+0x410>
test   %ebp,%ebp
jle    168d <compute_face_geometry+0x53d>
mov    0xd8(%rsp),%rcx
movslq -0x4(%rcx,%rax,4),%rcx
lea    (%rcx,%rcx,2),%rcx
cmp    $0x4,%ebp
jae    159e <compute_face_geometry+0x44e>
xor    %edx,%edx
jmp    1666 <compute_face_geometry+0x516>
cmpq   $0x0,0x88(%rsp)
je     1cc6 <compute_face_geometry+0xb76>
mov    0xd0(%rsp),%rdx
lea    (%rdx,%rcx,8),%rsi
mov    0x78(%rsp),%rdi
xor    %edx,%edx
movupd -0x30(%rsi,%rdx,8),%xmm0
movupd -0x20(%rsi,%rdx,8),%xmm1
subpd  0x10(%rsp,%rdx,8),%xmm0
subpd  0x20(%rsp,%rdx,8),%xmm1
movapd %xmm0,0xb0(%rsp,%rdx,8)
movapd %xmm1,0xc0(%rsp,%rdx,8)
movupd -0x10(%rsi,%rdx,8),%xmm0
movupd (%rsi,%rdx,8),%xmm1
subpd  0x30(%rsp,%rdx,8),%xmm0
subpd  0x40(%rsp,%rdx,8),%xmm1
movapd %xmm0,0xd0(%rsp,%rdx,8)
movapd %xmm1,0xe0(%rsp,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    15c0 <compute_face_geometry+0x470>
testb  $0x1,0x80(%rsp)
01
je     1659 <compute_face_geometry+0x509>
lea    (%rdx,%rcx,1),%rsi
mov    0x28(%rsp),%rdi
movupd (%rdi,%rsi,8),%xmm0
movupd 0x10(%rdi,%rsi,8),%xmm1
subpd  0x10(%rsp,%rdx,8),%xmm0
subpd  0x20(%rsp,%rdx,8),%xmm1
movapd %xmm0,0xb0(%rsp,%rdx,8)
movapd %xmm1,0xc0(%rsp,%rdx,8)
mov    0x48(%rsp),%rsi
mov    %rsi,%rdx
cmp    %r13,%rsi
je     168d <compute_face_geometry+0x53d>
mov    0x28(%rsp),%rsi
lea    (%rsi,%rcx,8),%rcx
nop
movsd  (%rcx,%rdx,8),%xmm0
subsd  0x10(%rsp,%rdx,8),%xmm0
movsd  %xmm0,0xb0(%rsp,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r13
jne    1670 <compute_face_geometry+0x520>
mov    0x70(%rsp),%rcx
lea    0x1(%rcx),%rbx
xorpd  %xmm2,%xmm2
cmp    %r12d,%eax
jle    1ad0 <compute_face_geometry+0x980>
xorpd  %xmm2,%xmm2
jmp    16de <compute_face_geometry+0x58e>
nopl   0x0(%rax)
movapd 0x180(%rsp),%xmm2
addsd  %xmm0,%xmm2
add    $0x1,%r12
mov    0x108(%rsp),%rax
movslq (%rax,%rbx,4),%rax
cmp    %rax,%r12
movapd 0x958(%rip),%xmm5
jge    1ad0 <compute_face_geometry+0x980>
test   %ebp,%ebp
jle    180d <compute_face_geometry+0x6bd>
mov    0xd8(%rsp),%rax
movslq (%rax,%r12,4),%rax
lea    (%rax,%rax,2),%rax
cmp    $0x4,%ebp
jae    1710 <compute_face_geometry+0x5c0>
xor    %ecx,%ecx
jmp    17e6 <compute_face_geometry+0x696>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpq   $0x0,0x88(%rsp)
je     1a99 <compute_face_geometry+0x949>
mov    0xd0(%rsp),%rcx
lea    (%rcx,%rax,8),%rdx
mov    0x78(%rsp),%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd -0x30(%rdx,%rcx,8),%xmm0
movupd -0x20(%rdx,%rcx,8),%xmm1
subpd  0x10(%rsp,%rcx,8),%xmm0
subpd  0x20(%rsp,%rcx,8),%xmm1
movapd %xmm0,0x90(%rsp,%rcx,8)
movapd %xmm1,0xa0(%rsp,%rcx,8)
movupd -0x10(%rdx,%rcx,8),%xmm0
movupd (%rdx,%rcx,8),%xmm1
subpd  0x30(%rsp,%rcx,8),%xmm0
subpd  0x40(%rsp,%rcx,8),%xmm1
movapd %xmm0,0xb0(%rsp,%rcx,8)
movapd %xmm1,0xc0(%rsp,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1740 <compute_face_geometry+0x5f0>
testb  $0x1,0x80(%rsp)
01
je     17d9 <compute_face_geometry+0x689>
lea    (%rcx,%rax,1),%rdx
mov    0x28(%rsp),%rsi
movupd (%rsi,%rdx,8),%xmm0
movupd 0x10(%rsi,%rdx,8),%xmm1
subpd  0x10(%rsp,%rcx,8),%xmm0
subpd  0x20(%rsp,%rcx,8),%xmm1
movapd %xmm0,0x90(%rsp,%rcx,8)
movapd %xmm1,0xa0(%rsp,%rcx,8)
mov    0x48(%rsp),%rdx
mov    %rdx,%rcx
cmp    %r13,%rdx
je     180d <compute_face_geometry+0x6bd>
mov    0x28(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
nop
movsd  (%rax,%rcx,8),%xmm0
subsd  0x10(%rsp,%rcx,8),%xmm0
movsd  %xmm0,0x90(%rsp,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r13
jne    17f0 <compute_face_geometry+0x6a0>
movapd %xmm2,0x180(%rsp)
lea    0xb0(%rsp),%rdi
lea    0x90(%rsp),%rsi
lea    0x110(%rsp),%r14
mov    %r14,%rdx
call   1070 <cross@plt>
mov    %r14,%rdi
call   1050 <norm@plt>
movsd  0x7ba(%rip),%xmm4
mulsd  %xmm4,%xmm0
ucomisd 0x7be(%rip),%xmm0
ja     1883 <compute_face_geometry+0x733>
mov    0x2785(%rip),%rax
mov    (%rax),%edi
lea    0x7dc(%rip),%rsi
movapd %xmm0,0x130(%rsp)
call   1040 <fprintf@plt>
movapd 0x130(%rsp),%xmm0
movsd  0x77d(%rip),%xmm4
test   %ebp,%ebp
movsd  0x77b(%rip),%xmm5
movapd 0x78b(%rip),%xmm6
jle    16b0 <compute_face_geometry+0x560>
cmp    $0x4,%ebp
jae    18b0 <compute_face_geometry+0x760>
xor    %eax,%eax
jmp    1970 <compute_face_geometry+0x820>
nopw   0x0(%rax,%rax,1)
cmpq   $0x0,0x88(%rsp)
je     1aae <compute_face_geometry+0x95e>
mov    0x78(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movapd 0x110(%rsp,%rax,8),%xmm7
movapd 0x120(%rsp,%rax,8),%xmm1
movapd 0x130(%rsp,%rax,8),%xmm2
movapd 0x140(%rsp,%rax,8),%xmm3
addpd  0x30(%rsp,%rax,8),%xmm7
addpd  0x40(%rsp,%rax,8),%xmm1
movapd %xmm7,0x30(%rsp,%rax,8)
movapd %xmm1,0x40(%rsp,%rax,8)
addpd  0x50(%rsp,%rax,8),%xmm2
addpd  0x60(%rsp,%rax,8),%xmm3
movapd %xmm2,0x50(%rsp,%rax,8)
movapd %xmm3,0x60(%rsp,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    18d0 <compute_face_geometry+0x780>
testb  $0x1,0x80(%rsp)
01
je     1962 <compute_face_geometry+0x812>
movapd 0x110(%rsp,%rax,8),%xmm2
movapd 0x120(%rsp,%rax,8),%xmm1
addpd  0x30(%rsp,%rax,8),%xmm2
addpd  0x40(%rsp,%rax,8),%xmm1
movapd %xmm2,0x30(%rsp,%rax,8)
movapd %xmm1,0x40(%rsp,%rax,8)
mov    0x48(%rsp),%rcx
mov    %rcx,%rax
cmp    %r13,%rcx
je     198e <compute_face_geometry+0x83e>
nop
movsd  0x110(%rsp,%rax,8),%xmm1
addsd  0x30(%rsp,%rax,8),%xmm1
movsd  %xmm1,0x30(%rsp,%rax,8)
add    $0x1,%rax
cmp    %rax,%r13
jne    1970 <compute_face_geometry+0x820>
test   %ebp,%ebp
jle    16b0 <compute_face_geometry+0x560>
cmp    $0x4,%ebp
jae    19a2 <compute_face_geometry+0x852>
xor    %eax,%eax
jmp    1a20 <compute_face_geometry+0x8d0>
movapd %xmm0,%xmm3
unpcklpd %xmm0,%xmm3
xor    %eax,%eax
nopl   0x0(%rax)
movapd 0xb0(%rsp,%rax,1),%xmm1
movapd 0xc0(%rsp,%rax,1),%xmm2
addpd  0x90(%rsp,%rax,1),%xmm1
addpd  0xa0(%rsp,%rax,1),%xmm2
mulpd  %xmm6,%xmm1
addpd  0x10(%rsp,%rax,1),%xmm1
mulpd  %xmm6,%xmm2
addpd  0x20(%rsp,%rax,1),%xmm2
mulpd  %xmm3,%xmm1
addpd  0x50(%rsp,%rax,1),%xmm1
mulpd  %xmm3,%xmm2
addpd  0x60(%rsp,%rax,1),%xmm2
movapd %xmm1,0x50(%rsp,%rax,1)
movapd %xmm2,0x60(%rsp,%rax,1)
add    $0x20,%rax
cmp    %rax,%r15
jne    19b0 <compute_face_geometry+0x860>
mov    0x48(%rsp),%rcx
mov    %rcx,%rax
cmp    %r13,%rcx
je     1a55 <compute_face_geometry+0x905>
xchg   %ax,%ax
movsd  0xb0(%rsp,%rax,8),%xmm1
addsd  0x90(%rsp,%rax,8),%xmm1
mulsd  %xmm5,%xmm1
addsd  0x10(%rsp,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x50(%rsp,%rax,8),%xmm1
movsd  %xmm1,0x50(%rsp,%rax,8)
add    $0x1,%rax
cmp    %rax,%r13
jne    1a20 <compute_face_geometry+0x8d0>
test   %ebp,%ebp
jle    16b0 <compute_face_geometry+0x560>
lea    0xb0(%rsp),%rdi
lea    0x90(%rsp),%rsi
mov    0x100(%rsp),%rdx
movapd %xmm0,0x130(%rsp)
call   1060 <memcpy@plt>
movapd 0x130(%rsp),%xmm0
movsd  0x56c(%rip),%xmm4
jmp    16b0 <compute_face_geometry+0x560>
xor    %ecx,%ecx
testb  $0x1,0x80(%rsp)
01
jne    17a7 <compute_face_geometry+0x657>
jmp    17d9 <compute_face_geometry+0x689>
xor    %eax,%eax
testb  $0x1,0x80(%rsp)
01
jne    1938 <compute_face_geometry+0x7e8>
jmp    1962 <compute_face_geometry+0x812>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %ebp,%ebp
mov    0x178(%rsp),%r9
jle    12d0 <compute_face_geometry+0x180>
mov    %r9d,%r8d
cmp    $0x1,%ebp
sete   %al
mov    0x70(%rsp),%rcx
lea    (%rcx,%rcx,2),%ecx
or     0xf(%rsp),%al
je     1b00 <compute_face_geometry+0x9b0>
xor    %eax,%eax
jmp    1bdc <compute_face_geometry+0xa8c>
xchg   %ax,%ax
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
cmpq   $0x0,0xf0(%rsp)
je     1cb1 <compute_face_geometry+0xb61>
mov    0x150(%rsp),%rax
lea    (%rax,%r8,8),%rsi
mov    0x148(%rsp),%rax
lea    (%rax,%r8,8),%rdi
mov    0xe0(%rsp),%rax
xor    %edx,%edx
nopl   0x0(%rax)
movapd 0x30(%rsp,%rdx,8),%xmm1
mulpd  %xmm5,%xmm1
movupd %xmm1,-0x10(%rdi,%rdx,8)
movapd 0x50(%rsp,%rdx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,-0x10(%rsi,%rdx,8)
movapd 0x40(%rsp,%rdx,8),%xmm1
mulpd  %xmm5,%xmm1
movupd %xmm1,(%rdi,%rdx,8)
movapd 0x60(%rsp,%rdx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rsi,%rdx,8)
add    $0x4,%rdx
add    $0xfffffffffffffffe,%rax
jne    1b40 <compute_face_geometry+0x9f0>
testb  $0x1,0xe8(%rsp)
01
je     1bc8 <compute_face_geometry+0xa78>
movapd 0x30(%rsp,%rdx,8),%xmm1
mulpd  0x490(%rip),%xmm1
lea    (%rdx,%rcx,1),%rax
mov    0xc8(%rsp),%rsi
movupd %xmm1,(%rsi,%rax,8)
movapd 0x50(%rsp,%rdx,8),%xmm1
divpd  %xmm0,%xmm1
mov    0x1d0(%rsp),%rdx
movupd %xmm1,(%rdx,%rax,8)
mov    0xf8(%rsp),%rdx
mov    %rdx,%rax
cmp    %r13,%rdx
je     12d0 <compute_face_geometry+0x180>
mov    %rax,%rdx
test   $0x1,%r13b
je     1c1d <compute_face_geometry+0xacd>
movsd  0x30(%rsp,%rax,8),%xmm0
mulsd  %xmm4,%xmm0
add    %rax,%rcx
mov    0xc8(%rsp),%rdx
movsd  %xmm0,(%rdx,%rcx,8)
movsd  0x50(%rsp,%rax,8),%xmm0
divsd  %xmm2,%xmm0
mov    0x1d0(%rsp),%rdx
movsd  %xmm0,(%rdx,%rcx,8)
mov    %rax,%rdx
or     $0x1,%rdx
not    %rax
cmp    0x168(%rsp),%rax
je     12d0 <compute_face_geometry+0x180>
mov    0x160(%rsp),%rax
lea    (%rax,%r8,8),%rax
mov    0x158(%rsp),%rcx
lea    (%rcx,%r8,8),%rcx
cs nopw 0x0(%rax,%rax,1)
movsd  0x30(%rsp,%rdx,8),%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,-0x8(%rcx,%rdx,8)
movsd  0x50(%rsp,%rdx,8),%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,-0x8(%rax,%rdx,8)
movsd  0x38(%rsp,%rdx,8),%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
movsd  0x58(%rsp,%rdx,8),%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,(%rax,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%r13
jne    1c50 <compute_face_geometry+0xb00>
jmp    12d0 <compute_face_geometry+0x180>
xor    %ecx,%ecx
testb  $0x1,0xe8(%rsp)
01
jne    1534 <compute_face_geometry+0x3e4>
jmp    1544 <compute_face_geometry+0x3f4>
xor    %edx,%edx
testb  $0x1,0xe8(%rsp)
01
jne    1b92 <compute_face_geometry+0xa42>
jmp    1bc8 <compute_face_geometry+0xa78>
xor    %edx,%edx
testb  $0x1,0x80(%rsp)
01
jne    1627 <compute_face_geometry+0x4d7>
jmp    1659 <compute_face_geometry+0x509>
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Internal error in compute_face_geometry.\00"
define void @compute_face_geometry(i32 %0, double* %1, i32 %2, i32* %3, i32* %4, double* %5, double* %6, double* %7) {
%9 = alloca i32
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca i32
%18 = alloca [3 x double]
%19 = alloca [3 x double]
%20 = alloca [3 x double]
%21 = alloca [3 x double]
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca [3 x double]
%26 = alloca [3 x double]
%27 = alloca double
%28 = alloca i32
%29 = alloca double
%30 = alloca double
store i32 %0, i32* %9
store double* %1, double** %10
store i32 %2, i32* %11
store i32* %3, i32** %12
store i32* %4, i32** %13
store double* %5, double** %14
store double* %6, double** %15
store double* %7, double** %16
%31 = bitcast [3 x double]* %25 to i8*
%32 = bitcast [3 x double]* %26 to i8*
store double 0x3FE5555555555555, double* %27
store i32 0, i32* %17
br label %33
33: ; preds = %351, %8
%34 = load i32, i32* %17
%35 = load i32, i32* %11
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %354
37: ; preds = %33
store double 0.000000e+00, double* %29
store i32 0, i32* %22
br label %38
38: ; preds = %46, %37
%39 = load i32, i32* %22
%40 = load i32, i32* %9
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %49
42: ; preds = %38
%43 = load i32, i32* %22
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %44
store double 0.000000e+00, double* %45
br label %46
46: ; preds = %42
%47 = load i32, i32* %22
%48 = add nsw i32 %47, 1
store i32 %48, i32* %22
br label %38
49: ; preds = %38
store i32 0, i32* %22
br label %50
50: ; preds = %58, %49
%51 = load i32, i32* %22
%52 = load i32, i32* %9
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %61
54: ; preds = %50
%55 = load i32, i32* %22
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0, i64 %56
store double 0.000000e+00, double* %57
br label %58
58: ; preds = %54
%59 = load i32, i32* %22
%60 = add nsw i32 %59, 1
store i32 %60, i32* %22
br label %50
61: ; preds = %50
store i32 0, i32* %22
br label %62
62: ; preds = %70, %61
%63 = load i32, i32* %22
%64 = load i32, i32* %9
%65 = icmp slt i32 %63, %64
br i1 %65, label %66, label %73
66: ; preds = %62
%67 = load i32, i32* %22
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [3 x double], [3 x double]* %25, i64 0, i64 %68
store double 0.000000e+00, double* %69
br label %70
70: ; preds = %66
%71 = load i32, i32* %22
%72 = add nsw i32 %71, 1
store i32 %72, i32* %22
br label %62
73: ; preds = %62
%74 = load i32*, i32** %12
%75 = load i32, i32* %17
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i32, i32* %74, i64 %76
%78 = load i32, i32* %77
store i32 %78, i32* %23
br label %79
79: ; preds = %116, %73
%80 = load i32, i32* %23
%81 = load i32*, i32** %12
%82 = load i32, i32* %17
%83 = add nsw i32 %82, 1
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i32, i32* %81, i64 %84
%86 = load i32, i32* %85
%87 = icmp slt i32 %80, %86
br i1 %87, label %88, label %119
88: ; preds = %79
%89 = load i32*, i32** %13
%90 = load i32, i32* %23
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i32, i32* %89, i64 %91
%93 = load i32, i32* %92
store i32 %93, i32* %24
store i32 0, i32* %22
br label %94
94: ; preds = %112, %88
%95 = load i32, i32* %22
%96 = load i32, i32* %9
%97 = icmp slt i32 %95, %96
br i1 %97, label %98, label %115
98: ; preds = %94
%99 = load double*, double** %10
%100 = load i32, i32* %24
%101 = mul nsw i32 3, %100
%102 = load i32, i32* %22
%103 = add nsw i32 %101, %102
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds double, double* %99, i64 %104
%106 = load double, double* %105
%107 = load i32, i32* %22
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %108
%110 = load double, double* %109
%111 = fadd double %110, %106
store double %111, double* %109
br label %112
112: ; preds = %98
%113 = load i32, i32* %22
%114 = add nsw i32 %113, 1
store i32 %114, i32* %22
br label %94
115: ; preds = %94
br label %116
116: ; preds = %115
%117 = load i32, i32* %23
%118 = add nsw i32 %117, 1
store i32 %118, i32* %23
br label %79
119: ; preds = %79
%120 = load i32*, i32** %12
%121 = load i32, i32* %17
%122 = add nsw i32 %121, 1
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i32, i32* %120, i64 %123
%125 = load i32, i32* %124
%126 = load i32*, i32** %12
%127 = load i32, i32* %17
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i32, i32* %126, i64 %128
%130 = load i32, i32* %129
%131 = sub nsw i32 %125, %130
store i32 %131, i32* %28
store i32 0, i32* %22
br label %132
132: ; preds = %144, %119
%133 = load i32, i32* %22
%134 = load i32, i32* %9
%135 = icmp slt i32 %133, %134
br i1 %135, label %136, label %147
136: ; preds = %132
%137 = load i32, i32* %28
%138 = sitofp i32 %137 to double
%139 = load i32, i32* %22
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %140
%142 = load double, double* %141
%143 = fdiv double %142, %138
store double %143, double* %141
br label %144
144: ; preds = %136
%145 = load i32, i32* %22
%146 = add nsw i32 %145, 1
store i32 %146, i32* %22
br label %132
147: ; preds = %132
%148 = load i32*, i32** %13
%149 = load i32*, i32** %12
%150 = load i32, i32* %17
%151 = add nsw i32 %150, 1
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds i32, i32* %149, i64 %152
%154 = load i32, i32* %153
%155 = sub nsw i32 %154, 1
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds i32, i32* %148, i64 %156
%158 = load i32, i32* %157
store i32 %158, i32* %24
store i32 0, i32* %22
br label %159
159: ; preds = %180, %147
%160 = load i32, i32* %22
%161 = load i32, i32* %9
%162 = icmp slt i32 %160, %161
br i1 %162, label %163, label %183
163: ; preds = %159
%164 = load double*, double** %10
%165 = load i32, i32* %24
%166 = mul nsw i32 3, %165
%167 = load i32, i32* %22
%168 = add nsw i32 %166, %167
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds double, double* %164, i64 %169
%171 = load double, double* %170
%172 = load i32, i32* %22
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %173
%175 = load double, double* %174
%176 = fsub double %171, %175
%177 = load i32, i32* %22
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 %178
store double %176, double* %179
br label %180
180: ; preds = %163
%181 = load i32, i32* %22
%182 = add nsw i32 %181, 1
store i32 %182, i32* %22
br label %159
183: ; preds = %159
%184 = load i32*, i32** %12
%185 = load i32, i32* %17
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds i32, i32* %184, i64 %186
%188 = load i32, i32* %187
store i32 %188, i32* %23
br label %189
189: ; preds = %308, %183
%190 = load i32, i32* %23
%191 = load i32*, i32** %12
%192 = load i32, i32* %17
%193 = add nsw i32 %192, 1
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds i32, i32* %191, i64 %194
%196 = load i32, i32* %195
%197 = icmp slt i32 %190, %196
br i1 %197, label %198, label %311
198: ; preds = %189
%199 = load i32*, i32** %13
%200 = load i32, i32* %23
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds i32, i32* %199, i64 %201
%203 = load i32, i32* %202
store i32 %203, i32* %24
store i32 0, i32* %22
br label %204
204: ; preds = %225, %198
%205 = load i32, i32* %22
%206 = load i32, i32* %9
%207 = icmp slt i32 %205, %206
br i1 %207, label %208, label %228
208: ; preds = %204
%209 = load double*, double** %10
%210 = load i32, i32* %24
%211 = mul nsw i32 3, %210
%212 = load i32, i32* %22
%213 = add nsw i32 %211, %212
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds double, double* %209, i64 %214
%216 = load double, double* %215
%217 = load i32, i32* %22
%218 = sext i32 %217 to i64
%219 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %218
%220 = load double, double* %219
%221 = fsub double %216, %220
%222 = load i32, i32* %22
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 %223
store double %221, double* %224
br label %225
225: ; preds = %208
%226 = load i32, i32* %22
%227 = add nsw i32 %226, 1
store i32 %227, i32* %22
br label %204
228: ; preds = %204
%229 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 0
%230 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 0
%231 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 0
%232 = call i32 @cross(double* %229, double* %230, double* %231)
%233 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 0
%234 = call double @norm(double* %233)
%235 = fmul double 5.000000e-01, %234
store double %235, double* %30
%236 = load double, double* %30
%237 = load double, double* %29
%238 = fadd double %237, %236
store double %238, double* %29
%239 = load double, double* %30
%240 = fcmp ogt double %239, 0.000000e+00
br i1 %240, label %244, label %241
241: ; preds = %228
%242 = load i32, i32* @stderr
%243 = call i32 @fprintf(i32 %242, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
br label %244
244: ; preds = %241, %228
store i32 0, i32* %22
br label %245
245: ; preds = %259, %244
%246 = load i32, i32* %22
%247 = load i32, i32* %9
%248 = icmp slt i32 %246, %247
br i1 %248, label %249, label %262
249: ; preds = %245
%250 = load i32, i32* %22
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 %251
%253 = load double, double* %252
%254 = load i32, i32* %22
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0, i64 %255
%257 = load double, double* %256
%258 = fadd double %257, %253
store double %258, double* %256
br label %259
259: ; preds = %249
%260 = load i32, i32* %22
%261 = add nsw i32 %260, 1
store i32 %261, i32* %22
br label %245
262: ; preds = %245
store i32 0, i32* %22
br label %263
263: ; preds = %288, %262
%264 = load i32, i32* %22
%265 = load i32, i32* %9
%266 = icmp slt i32 %264, %265
br i1 %266, label %267, label %291
267: ; preds = %263
%268 = load double, double* %30
%269 = load i32, i32* %22
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %270
%272 = load double, double* %271
%273 = load i32, i32* %22
%274 = sext i32 %273 to i64
%275 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 %274
%276 = load double, double* %275
%277 = load i32, i32* %22
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 %278
%280 = load double, double* %279
%281 = fadd double %276, %280
%282 = call double @llvm.fmuladd.f64(double 0x3FD5555555555555, double %281, double %272)
%283 = load i32, i32* %22
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds [3 x double], [3 x double]* %25, i64 0, i64 %284
%286 = load double, double* %285
%287 = call double @llvm.fmuladd.f64(double %268, double %282, double %286)
store double %287, double* %285
br label %288
288: ; preds = %267
%289 = load i32, i32* %22
%290 = add nsw i32 %289, 1
store i32 %290, i32* %22
br label %263
291: ; preds = %263
store i32 0, i32* %22
br label %292
292: ; preds = %304, %291
%293 = load i32, i32* %22
%294 = load i32, i32* %9
%295 = icmp slt i32 %293, %294
br i1 %295, label %296, label %307
296: ; preds = %292
%297 = load i32, i32* %22
%298 = sext i32 %297 to i64
%299 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 %298
%300 = load double, double* %299
%301 = load i32, i32* %22
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 %302
store double %300, double* %303
br label %304
304: ; preds = %296
%305 = load i32, i32* %22
%306 = add nsw i32 %305, 1
store i32 %306, i32* %22
br label %292
307: ; preds = %292
br label %308
308: ; preds = %307
%309 = load i32, i32* %23
%310 = add nsw i32 %309, 1
store i32 %310, i32* %23
br label %189
311: ; preds = %189
store i32 0, i32* %22
br label %312
312: ; preds = %342, %311
%313 = load i32, i32* %22
%314 = load i32, i32* %9
%315 = icmp slt i32 %313, %314
br i1 %315, label %316, label %345
316: ; preds = %312
%317 = load i32, i32* %22
%318 = sext i32 %317 to i64
%319 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0, i64 %318
%320 = load double, double* %319
%321 = fmul double 5.000000e-01, %320
%322 = load double*, double** %14
%323 = load i32, i32* %17
%324 = mul nsw i32 3, %323
%325 = load i32, i32* %22
%326 = add nsw i32 %324, %325
%327 = sext i32 %326 to i64
%328 = getelementptr inbounds double, double* %322, i64 %327
store double %321, double* %328
%329 = load i32, i32* %22
%330 = sext i32 %329 to i64
%331 = getelementptr inbounds [3 x double], [3 x double]* %25, i64 0, i64 %330
%332 = load double, double* %331
%333 = load double, double* %29
%334 = fdiv double %332, %333
%335 = load double*, double** %15
%336 = load i32, i32* %17
%337 = mul nsw i32 3, %336
%338 = load i32, i32* %22
%339 = add nsw i32 %337, %338
%340 = sext i32 %339 to i64
%341 = getelementptr inbounds double, double* %335, i64 %340
store double %334, double* %341
br label %342
342: ; preds = %316
%343 = load i32, i32* %22
%344 = add nsw i32 %343, 1
store i32 %344, i32* %22
br label %312
345: ; preds = %312
%346 = load double, double* %29
%347 = load double*, double** %16
%348 = load i32, i32* %17
%349 = sext i32 %348 to i64
%350 = getelementptr inbounds double, double* %347, i64 %349
store double %346, double* %350
br label %351
351: ; preds = %345
%352 = load i32, i32* %17
%353 = add nsw i32 %352, 1
store i32 %353, i32* %17
br label %33
354: ; preds = %33
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Internal error in compute_face_geometry.\00"
define void @compute_face_geometry(i32 %0, double* nocapture %1, i32 %2, i32* nocapture %3, i32* nocapture %4, double* nocapture writeonly %5, double* nocapture writeonly %6, double* nocapture writeonly %7) {
%9 = alloca [3 x double]
%10 = bitcast [3 x double]* %9 to i8*
%11 = alloca [3 x double]
%12 = bitcast [3 x double]* %11 to i8*
%13 = alloca [3 x double]
%14 = bitcast [3 x double]* %13 to i8*
%15 = alloca [3 x double]
%16 = alloca [3 x double]
%17 = bitcast [3 x double]* %16 to i8*
%18 = alloca [3 x double]
%19 = bitcast [3 x double]* %18 to i8*
%20 = bitcast [3 x double]* %15 to i8*
%21 = icmp sgt i32 %2, 0
br i1 %21, label %22, label %666
22: ; preds = %8
%23 = icmp sgt i32 %0, 0
%24 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%25 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 0
%26 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%27 = zext i32 %0 to i64
%28 = shl nuw nsw i64 %27, 3
%29 = zext i32 %2 to i64
%30 = getelementptr double, double* %5, i64 %27
%31 = getelementptr double, double* %6, i64 %27
%32 = and i64 %27, 4294967292
%33 = add nsw i64 %32, -4
%34 = lshr exact i64 %33, 2
%35 = add nuw nsw i64 %34, 1
%36 = and i64 %27, 4294967294
%37 = add nsw i64 %36, -2
%38 = lshr exact i64 %37, 1
%39 = add nuw i64 %38, 1
%40 = icmp ult i32 %0, 4
%41 = and i64 %27, 4294967292
%42 = and i64 %35, 1
%43 = icmp eq i64 %33, 0
%44 = and i64 %35, 9223372036854775806
%45 = icmp eq i64 %42, 0
%46 = icmp eq i64 %41, %27
%47 = icmp eq i32 %0, 1
%48 = and i64 %27, 4294967294
%49 = and i64 %39, 1
%50 = icmp eq i64 %37, 0
%51 = and i64 %39, -2
%52 = icmp eq i64 %49, 0
%53 = icmp eq i64 %48, %27
%54 = icmp ult i32 %0, 4
%55 = and i64 %27, 4294967292
%56 = and i64 %35, 1
%57 = icmp eq i64 %33, 0
%58 = and i64 %35, 9223372036854775806
%59 = icmp eq i64 %56, 0
%60 = icmp eq i64 %55, %27
%61 = icmp ult i32 %0, 4
%62 = and i64 %27, 4294967292
%63 = and i64 %35, 1
%64 = icmp eq i64 %33, 0
%65 = and i64 %35, 9223372036854775806
%66 = icmp eq i64 %63, 0
%67 = icmp eq i64 %62, %27
%68 = icmp ult i32 %0, 4
%69 = and i64 %27, 4294967292
%70 = and i64 %35, 1
%71 = icmp eq i64 %33, 0
%72 = and i64 %35, 9223372036854775806
%73 = icmp eq i64 %70, 0
%74 = icmp eq i64 %69, %27
%75 = icmp ult i32 %0, 4
%76 = and i64 %27, 4294967292
%77 = icmp eq i64 %76, %27
%78 = icmp eq i32 %0, 1
%79 = icmp ugt double* %31, %5
%80 = icmp ugt double* %30, %6
%81 = and i1 %79, %80
%82 = and i64 %27, 4294967294
%83 = and i64 %39, 1
%84 = icmp eq i64 %37, 0
%85 = and i64 %39, -2
%86 = icmp eq i64 %83, 0
%87 = icmp eq i64 %82, %27
%88 = and i64 %27, 1
%89 = icmp eq i64 %88, 0
%90 = sub nsw i64 0, %27
br label %91
91: ; preds = %22, %663
%92 = phi i64 [ 0, %22 ], [ %97, %663 ]
br i1 %23, label %93, label %94
93: ; preds = %91
br label %94
94: ; preds = %91, %93
%95 = getelementptr inbounds i32, i32* %3, i64 %92
%96 = load i32, i32* %95
%97 = add nuw nsw i64 %92, 1
%98 = getelementptr inbounds i32, i32* %3, i64 %97
%99 = load i32, i32* %98
%100 = icmp sgt i32 %99, %96
br i1 %100, label %101, label %189
101: ; preds = %94
%102 = sext i32 %96 to i64
%103 = sext i32 %99 to i64
br label %104
104: ; preds = %101, %186
%105 = phi i64 [ %102, %101 ], [ %187, %186 ]
br i1 %23, label %106, label %186
106: ; preds = %104
%107 = getelementptr inbounds i32, i32* %4, i64 %105
%108 = load i32, i32* %107
%109 = mul nsw i32 %108, 3
%110 = sext i32 %109 to i64
br i1 %40, label %174, label %111
111: ; preds = %106
br i1 %43, label %153, label %112
112: ; preds = %111, %112
%113 = phi i64 [ %150, %112 ], [ 0, %111 ]
%114 = phi i64 [ %151, %112 ], [ 0, %111 ]
%115 = add nsw i64 %113, %110
%116 = getelementptr inbounds double, double* %1, i64 %115
%117 = bitcast double* %116 to <2 x double>*
%118 = load <2 x double>, <2 x double>* %117
%119 = getelementptr inbounds double, double* %116, i64 2
%120 = bitcast double* %119 to <2 x double>*
%121 = load <2 x double>, <2 x double>* %120
%122 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %113
%123 = bitcast double* %122 to <2 x double>*
%124 = load <2 x double>, <2 x double>* %123
%125 = getelementptr inbounds double, double* %122, i64 2
%126 = bitcast double* %125 to <2 x double>*
%127 = load <2 x double>, <2 x double>* %126
%128 = fadd <2 x double> %118, %124
%129 = fadd <2 x double> %121, %127
%130 = bitcast double* %122 to <2 x double>*
store <2 x double> %128, <2 x double>* %130
%131 = bitcast double* %125 to <2 x double>*
store <2 x double> %129, <2 x double>* %131
%132 = or i64 %113, 4
%133 = add nsw i64 %132, %110
%134 = getelementptr inbounds double, double* %1, i64 %133
%135 = bitcast double* %134 to <2 x double>*
%136 = load <2 x double>, <2 x double>* %135
%137 = getelementptr inbounds double, double* %134, i64 2
%138 = bitcast double* %137 to <2 x double>*
%139 = load <2 x double>, <2 x double>* %138
%140 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %132
%141 = bitcast double* %140 to <2 x double>*
%142 = load <2 x double>, <2 x double>* %141
%143 = getelementptr inbounds double, double* %140, i64 2
%144 = bitcast double* %143 to <2 x double>*
%145 = load <2 x double>, <2 x double>* %144
%146 = fadd <2 x double> %136, %142
%147 = fadd <2 x double> %139, %145
%148 = bitcast double* %140 to <2 x double>*
store <2 x double> %146, <2 x double>* %148
%149 = bitcast double* %143 to <2 x double>*
store <2 x double> %147, <2 x double>* %149
%150 = add nuw i64 %113, 8
%151 = add i64 %114, 2
%152 = icmp eq i64 %151, %44
br i1 %152, label %153, label %112
153: ; preds = %112, %111
%154 = phi i64 [ 0, %111 ], [ %150, %112 ]
br i1 %45, label %173, label %155
155: ; preds = %153
%156 = add nsw i64 %154, %110
%157 = getelementptr inbounds double, double* %1, i64 %156
%158 = bitcast double* %157 to <2 x double>*
%159 = load <2 x double>, <2 x double>* %158
%160 = getelementptr inbounds double, double* %157, i64 2
%161 = bitcast double* %160 to <2 x double>*
%162 = load <2 x double>, <2 x double>* %161
%163 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %154
%164 = bitcast double* %163 to <2 x double>*
%165 = load <2 x double>, <2 x double>* %164
%166 = getelementptr inbounds double, double* %163, i64 2
%167 = bitcast double* %166 to <2 x double>*
%168 = load <2 x double>, <2 x double>* %167
%169 = fadd <2 x double> %159, %165
%170 = fadd <2 x double> %162, %168
%171 = bitcast double* %163 to <2 x double>*
store <2 x double> %169, <2 x double>* %171
%172 = bitcast double* %166 to <2 x double>*
store <2 x double> %170, <2 x double>* %172
br label %173
173: ; preds = %153, %155
br i1 %46, label %186, label %174
174: ; preds = %106, %173
%175 = phi i64 [ 0, %106 ], [ %41, %173 ]
br label %176
176: ; preds = %174, %176
%177 = phi i64 [ %184, %176 ], [ %175, %174 ]
%178 = add nsw i64 %177, %110
%179 = getelementptr inbounds double, double* %1, i64 %178
%180 = load double, double* %179
%181 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %177
%182 = load double, double* %181
%183 = fadd double %180, %182
store double %183, double* %181
%184 = add nuw nsw i64 %177, 1
%185 = icmp eq i64 %184, %27
br i1 %185, label %186, label %176
186: ; preds = %176, %173, %104
%187 = add nsw i64 %105, 1
%188 = icmp eq i64 %187, %103
br i1 %188, label %189, label %104
189: ; preds = %186, %94
br i1 %23, label %190, label %310
190: ; preds = %189
%191 = sub nsw i32 %99, %96
%192 = sitofp i32 %191 to double
br i1 %47, label %222, label %193
193: ; preds = %190
%194 = insertelement <2 x double> poison, double %192, i64 0
%195 = shufflevector <2 x double> %194, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %50, label %213, label %196
196: ; preds = %193, %196
%197 = phi i64 [ %210, %196 ], [ 0, %193 ]
%198 = phi i64 [ %211, %196 ], [ 0, %193 ]
%199 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %197
%200 = bitcast double* %199 to <2 x double>*
%201 = load <2 x double>, <2 x double>* %200
%202 = fdiv <2 x double> %201, %195
%203 = bitcast double* %199 to <2 x double>*
store <2 x double> %202, <2 x double>* %203
%204 = or i64 %197, 2
%205 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %204
%206 = bitcast double* %205 to <2 x double>*
%207 = load <2 x double>, <2 x double>* %206
%208 = fdiv <2 x double> %207, %195
%209 = bitcast double* %205 to <2 x double>*
store <2 x double> %208, <2 x double>* %209
%210 = add nuw i64 %197, 4
%211 = add nuw i64 %198, 2
%212 = icmp eq i64 %211, %51
br i1 %212, label %213, label %196
213: ; preds = %196, %193
%214 = phi i64 [ 0, %193 ], [ %210, %196 ]
br i1 %52, label %221, label %215
215: ; preds = %213
%216 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %214
%217 = bitcast double* %216 to <2 x double>*
%218 = load <2 x double>, <2 x double>* %217
%219 = fdiv <2 x double> %218, %195
%220 = bitcast double* %216 to <2 x double>*
store <2 x double> %219, <2 x double>* %220
br label %221
221: ; preds = %213, %215
br i1 %53, label %231, label %222
222: ; preds = %190, %221
%223 = phi i64 [ 0, %190 ], [ %48, %221 ]
br label %224
224: ; preds = %222, %224
%225 = phi i64 [ %229, %224 ], [ %223, %222 ]
%226 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %225
%227 = load double, double* %226
%228 = fdiv double %227, %192
store double %228, double* %226
%229 = add nuw nsw i64 %225, 1
%230 = icmp eq i64 %229, %27
br i1 %230, label %231, label %224
231: ; preds = %224, %221
br i1 %23, label %232, label %310
232: ; preds = %231
%233 = add nsw i32 %99, -1
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds i32, i32* %4, i64 %234
%236 = load i32, i32* %235
%237 = mul nsw i32 %236, 3
%238 = sext i32 %237 to i64
br i1 %54, label %308, label %239
239: ; preds = %232
br i1 %57, label %285, label %240
240: ; preds = %239, %240
%241 = phi i64 [ %282, %240 ], [ 0, %239 ]
%242 = phi i64 [ %283, %240 ], [ 0, %239 ]
%243 = add nsw i64 %241, %238
%244 = getelementptr inbounds double, double* %1, i64 %243
%245 = bitcast double* %244 to <2 x double>*
%246 = load <2 x double>, <2 x double>* %245
%247 = getelementptr inbounds double, double* %244, i64 2
%248 = bitcast double* %247 to <2 x double>*
%249 = load <2 x double>, <2 x double>* %248
%250 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %241
%251 = bitcast double* %250 to <2 x double>*
%252 = load <2 x double>, <2 x double>* %251
%253 = getelementptr inbounds double, double* %250, i64 2
%254 = bitcast double* %253 to <2 x double>*
%255 = load <2 x double>, <2 x double>* %254
%256 = fsub <2 x double> %246, %252
%257 = fsub <2 x double> %249, %255
%258 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 %241
%259 = bitcast double* %258 to <2 x double>*
store <2 x double> %256, <2 x double>* %259
%260 = getelementptr inbounds double, double* %258, i64 2
%261 = bitcast double* %260 to <2 x double>*
store <2 x double> %257, <2 x double>* %261
%262 = or i64 %241, 4
%263 = add nsw i64 %262, %238
%264 = getelementptr inbounds double, double* %1, i64 %263
%265 = bitcast double* %264 to <2 x double>*
%266 = load <2 x double>, <2 x double>* %265
%267 = getelementptr inbounds double, double* %264, i64 2
%268 = bitcast double* %267 to <2 x double>*
%269 = load <2 x double>, <2 x double>* %268
%270 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %262
%271 = bitcast double* %270 to <2 x double>*
%272 = load <2 x double>, <2 x double>* %271
%273 = getelementptr inbounds double, double* %270, i64 2
%274 = bitcast double* %273 to <2 x double>*
%275 = load <2 x double>, <2 x double>* %274
%276 = fsub <2 x double> %266, %272
%277 = fsub <2 x double> %269, %275
%278 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 %262
%279 = bitcast double* %278 to <2 x double>*
store <2 x double> %276, <2 x double>* %279
%280 = getelementptr inbounds double, double* %278, i64 2
%281 = bitcast double* %280 to <2 x double>*
store <2 x double> %277, <2 x double>* %281
%282 = add nuw i64 %241, 8
%283 = add i64 %242, 2
%284 = icmp eq i64 %283, %58
br i1 %284, label %285, label %240
285: ; preds = %240, %239
%286 = phi i64 [ 0, %239 ], [ %282, %240 ]
br i1 %59, label %307, label %287
287: ; preds = %285
%288 = add nsw i64 %286, %238
%289 = getelementptr inbounds double, double* %1, i64 %288
%290 = bitcast double* %289 to <2 x double>*
%291 = load <2 x double>, <2 x double>* %290
%292 = getelementptr inbounds double, double* %289, i64 2
%293 = bitcast double* %292 to <2 x double>*
%294 = load <2 x double>, <2 x double>* %293
%295 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %286
%296 = bitcast double* %295 to <2 x double>*
%297 = load <2 x double>, <2 x double>* %296
%298 = getelementptr inbounds double, double* %295, i64 2
%299 = bitcast double* %298 to <2 x double>*
%300 = load <2 x double>, <2 x double>* %299
%301 = fsub <2 x double> %291, %297
%302 = fsub <2 x double> %294, %300
%303 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 %286
%304 = bitcast double* %303 to <2 x double>*
store <2 x double> %301, <2 x double>* %304
%305 = getelementptr inbounds double, double* %303, i64 2
%306 = bitcast double* %305 to <2 x double>*
store <2 x double> %302, <2 x double>* %306
br label %307
307: ; preds = %285, %287
br i1 %60, label %310, label %308
308: ; preds = %232, %307
%309 = phi i64 [ 0, %232 ], [ %55, %307 ]
br label %313
310: ; preds = %313, %307, %189, %231
br i1 %100, label %311, label %324
311: ; preds = %310
%312 = sext i32 %96 to i64
br label %400
313: ; preds = %308, %313
%314 = phi i64 [ %322, %313 ], [ %309, %308 ]
%315 = add nsw i64 %314, %238
%316 = getelementptr inbounds double, double* %1, i64 %315
%317 = load double, double* %316
%318 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %314
%319 = load double, double* %318
%320 = fsub double %317, %319
%321 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 %314
store double %320, double* %321
%322 = add nuw nsw i64 %314, 1
%323 = icmp eq i64 %322, %27
br i1 %323, label %310, label %313
324: ; preds = %635, %310
%325 = phi double [ 0.000000e+00, %310 ], [ %494, %635 ]
br i1 %23, label %326, label %663
326: ; preds = %324
%327 = mul i64 %92, 3
%328 = and i64 %327, 4294967295
%329 = or i1 %78, %81
br i1 %329, label %383, label %330
330: ; preds = %326
%331 = insertelement <2 x double> poison, double %325, i64 0
%332 = shufflevector <2 x double> %331, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %84, label %366, label %333
333: ; preds = %330, %333
%334 = phi i64 [ %363, %333 ], [ 0, %330 ]
%335 = phi i64 [ %364, %333 ], [ 0, %330 ]
%336 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %334
%337 = bitcast double* %336 to <2 x double>*
%338 = load <2 x double>, <2 x double>* %337
%339 = fmul <2 x double> %338, <double 5.000000e-01, double 5.000000e-01>
%340 = add nuw nsw i64 %334, %328
%341 = getelementptr inbounds double, double* %5, i64 %340
%342 = bitcast double* %341 to <2 x double>*
store <2 x double> %339, <2 x double>* %342
%343 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %334
%344 = bitcast double* %343 to <2 x double>*
%345 = load <2 x double>, <2 x double>* %344
%346 = fdiv <2 x double> %345, %332
%347 = getelementptr inbounds double, double* %6, i64 %340
%348 = bitcast double* %347 to <2 x double>*
store <2 x double> %346, <2 x double>* %348
%349 = or i64 %334, 2
%350 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %349
%351 = bitcast double* %350 to <2 x double>*
%352 = load <2 x double>, <2 x double>* %351
%353 = fmul <2 x double> %352, <double 5.000000e-01, double 5.000000e-01>
%354 = add nuw nsw i64 %349, %328
%355 = getelementptr inbounds double, double* %5, i64 %354
%356 = bitcast double* %355 to <2 x double>*
store <2 x double> %353, <2 x double>* %356
%357 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %349
%358 = bitcast double* %357 to <2 x double>*
%359 = load <2 x double>, <2 x double>* %358
%360 = fdiv <2 x double> %359, %332
%361 = getelementptr inbounds double, double* %6, i64 %354
%362 = bitcast double* %361 to <2 x double>*
store <2 x double> %360, <2 x double>* %362
%363 = add nuw i64 %334, 4
%364 = add nuw i64 %335, 2
%365 = icmp eq i64 %364, %85
br i1 %365, label %366, label %333
366: ; preds = %333, %330
%367 = phi i64 [ 0, %330 ], [ %363, %333 ]
br i1 %86, label %382, label %368
368: ; preds = %366
%369 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %367
%370 = bitcast double* %369 to <2 x double>*
%371 = load <2 x double>, <2 x double>* %370
%372 = fmul <2 x double> %371, <double 5.000000e-01, double 5.000000e-01>
%373 = add nuw nsw i64 %367, %328
%374 = getelementptr inbounds double, double* %5, i64 %373
%375 = bitcast double* %374 to <2 x double>*
store <2 x double> %372, <2 x double>* %375
%376 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %367
%377 = bitcast double* %376 to <2 x double>*
%378 = load <2 x double>, <2 x double>* %377
%379 = fdiv <2 x double> %378, %332
%380 = getelementptr inbounds double, double* %6, i64 %373
%381 = bitcast double* %380 to <2 x double>*
store <2 x double> %379, <2 x double>* %381
br label %382
382: ; preds = %366, %368
br i1 %87, label %663, label %383
383: ; preds = %326, %382
%384 = phi i64 [ 0, %326 ], [ %82, %382 ]
%385 = xor i64 %384, -1
br i1 %89, label %397, label %386
386: ; preds = %383
%387 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %384
%388 = load double, double* %387
%389 = fmul double %388, 5.000000e-01
%390 = add nuw nsw i64 %384, %328
%391 = getelementptr inbounds double, double* %5, i64 %390
store double %389, double* %391
%392 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %384
%393 = load double, double* %392
%394 = fdiv double %393, %325
%395 = getelementptr inbounds double, double* %6, i64 %390
store double %394, double* %395
%396 = or i64 %384, 1
br label %397
397: ; preds = %386, %383
%398 = phi i64 [ %384, %383 ], [ %396, %386 ]
%399 = icmp eq i64 %385, %90
br i1 %399, label %663, label %640
400: ; preds = %311, %635
%401 = phi i64 [ %312, %311 ], [ %636, %635 ]
%402 = phi double [ 0.000000e+00, %311 ], [ %494, %635 ]
br i1 %23, label %403, label %490
403: ; preds = %400
%404 = getelementptr inbounds i32, i32* %4, i64 %401
%405 = load i32, i32* %404
%406 = mul nsw i32 %405, 3
%407 = sext i32 %406 to i64
br i1 %61, label %477, label %408
408: ; preds = %403
br i1 %64, label %454, label %409
409: ; preds = %408, %409
%410 = phi i64 [ %451, %409 ], [ 0, %408 ]
%411 = phi i64 [ %452, %409 ], [ 0, %408 ]
%412 = add nsw i64 %410, %407
%413 = getelementptr inbounds double, double* %1, i64 %412
%414 = bitcast double* %413 to <2 x double>*
%415 = load <2 x double>, <2 x double>* %414
%416 = getelementptr inbounds double, double* %413, i64 2
%417 = bitcast double* %416 to <2 x double>*
%418 = load <2 x double>, <2 x double>* %417
%419 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %410
%420 = bitcast double* %419 to <2 x double>*
%421 = load <2 x double>, <2 x double>* %420
%422 = getelementptr inbounds double, double* %419, i64 2
%423 = bitcast double* %422 to <2 x double>*
%424 = load <2 x double>, <2 x double>* %423
%425 = fsub <2 x double> %415, %421
%426 = fsub <2 x double> %418, %424
%427 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 %410
%428 = bitcast double* %427 to <2 x double>*
store <2 x double> %425, <2 x double>* %428
%429 = getelementptr inbounds double, double* %427, i64 2
%430 = bitcast double* %429 to <2 x double>*
store <2 x double> %426, <2 x double>* %430
%431 = or i64 %410, 4
%432 = add nsw i64 %431, %407
%433 = getelementptr inbounds double, double* %1, i64 %432
%434 = bitcast double* %433 to <2 x double>*
%435 = load <2 x double>, <2 x double>* %434
%436 = getelementptr inbounds double, double* %433, i64 2
%437 = bitcast double* %436 to <2 x double>*
%438 = load <2 x double>, <2 x double>* %437
%439 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %431
%440 = bitcast double* %439 to <2 x double>*
%441 = load <2 x double>, <2 x double>* %440
%442 = getelementptr inbounds double, double* %439, i64 2
%443 = bitcast double* %442 to <2 x double>*
%444 = load <2 x double>, <2 x double>* %443
%445 = fsub <2 x double> %435, %441
%446 = fsub <2 x double> %438, %444
%447 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 %431
%448 = bitcast double* %447 to <2 x double>*
store <2 x double> %445, <2 x double>* %448
%449 = getelementptr inbounds double, double* %447, i64 2
%450 = bitcast double* %449 to <2 x double>*
store <2 x double> %446, <2 x double>* %450
%451 = add nuw i64 %410, 8
%452 = add i64 %411, 2
%453 = icmp eq i64 %452, %65
br i1 %453, label %454, label %409
454: ; preds = %409, %408
%455 = phi i64 [ 0, %408 ], [ %451, %409 ]
br i1 %66, label %476, label %456
456: ; preds = %454
%457 = add nsw i64 %455, %407
%458 = getelementptr inbounds double, double* %1, i64 %457
%459 = bitcast double* %458 to <2 x double>*
%460 = load <2 x double>, <2 x double>* %459
%461 = getelementptr inbounds double, double* %458, i64 2
%462 = bitcast double* %461 to <2 x double>*
%463 = load <2 x double>, <2 x double>* %462
%464 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %455
%465 = bitcast double* %464 to <2 x double>*
%466 = load <2 x double>, <2 x double>* %465
%467 = getelementptr inbounds double, double* %464, i64 2
%468 = bitcast double* %467 to <2 x double>*
%469 = load <2 x double>, <2 x double>* %468
%470 = fsub <2 x double> %460, %466
%471 = fsub <2 x double> %463, %469
%472 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 %455
%473 = bitcast double* %472 to <2 x double>*
store <2 x double> %470, <2 x double>* %473
%474 = getelementptr inbounds double, double* %472, i64 2
%475 = bitcast double* %474 to <2 x double>*
store <2 x double> %471, <2 x double>* %475
br label %476
476: ; preds = %454, %456
br i1 %67, label %490, label %477
477: ; preds = %403, %476
%478 = phi i64 [ 0, %403 ], [ %62, %476 ]
br label %479
479: ; preds = %477, %479
%480 = phi i64 [ %488, %479 ], [ %478, %477 ]
%481 = add nsw i64 %480, %407
%482 = getelementptr inbounds double, double* %1, i64 %481
%483 = load double, double* %482
%484 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %480
%485 = load double, double* %484
%486 = fsub double %483, %485
%487 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 %480
store double %486, double* %487
%488 = add nuw nsw i64 %480, 1
%489 = icmp eq i64 %488, %27
br i1 %489, label %490, label %479
490: ; preds = %479, %476, %400
%491 = call i32 @cross(double* %24, double* %25, double* %26)
%492 = call double @norm(double* %26)
%493 = fmul double %492, 5.000000e-01
%494 = fadd double %402, %493
%495 = fcmp ogt double %493, 0.000000e+00
br i1 %495, label %499, label %496
496: ; preds = %490
%497 = load i32, i32* @stderr
%498 = call i32 @fprintf(i32 %497, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
br label %499
499: ; preds = %496, %490
br i1 %23, label %500, label %635
500: ; preds = %499
br i1 %68, label %561, label %501
501: ; preds = %500
br i1 %71, label %541, label %502
502: ; preds = %501, %502
%503 = phi i64 [ %538, %502 ], [ 0, %501 ]
%504 = phi i64 [ %539, %502 ], [ 0, %501 ]
%505 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %503
%506 = bitcast double* %505 to <2 x double>*
%507 = load <2 x double>, <2 x double>* %506
%508 = getelementptr inbounds double, double* %505, i64 2
%509 = bitcast double* %508 to <2 x double>*
%510 = load <2 x double>, <2 x double>* %509
%511 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %503
%512 = bitcast double* %511 to <2 x double>*
%513 = load <2 x double>, <2 x double>* %512
%514 = getelementptr inbounds double, double* %511, i64 2
%515 = bitcast double* %514 to <2 x double>*
%516 = load <2 x double>, <2 x double>* %515
%517 = fadd <2 x double> %507, %513
%518 = fadd <2 x double> %510, %516
%519 = bitcast double* %511 to <2 x double>*
store <2 x double> %517, <2 x double>* %519
%520 = bitcast double* %514 to <2 x double>*
store <2 x double> %518, <2 x double>* %520
%521 = or i64 %503, 4
%522 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %521
%523 = bitcast double* %522 to <2 x double>*
%524 = load <2 x double>, <2 x double>* %523
%525 = getelementptr inbounds double, double* %522, i64 2
%526 = bitcast double* %525 to <2 x double>*
%527 = load <2 x double>, <2 x double>* %526
%528 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %521
%529 = bitcast double* %528 to <2 x double>*
%530 = load <2 x double>, <2 x double>* %529
%531 = getelementptr inbounds double, double* %528, i64 2
%532 = bitcast double* %531 to <2 x double>*
%533 = load <2 x double>, <2 x double>* %532
%534 = fadd <2 x double> %524, %530
%535 = fadd <2 x double> %527, %533
%536 = bitcast double* %528 to <2 x double>*
store <2 x double> %534, <2 x double>* %536
%537 = bitcast double* %531 to <2 x double>*
store <2 x double> %535, <2 x double>* %537
%538 = add nuw i64 %503, 8
%539 = add i64 %504, 2
%540 = icmp eq i64 %539, %72
br i1 %540, label %541, label %502
541: ; preds = %502, %501
%542 = phi i64 [ 0, %501 ], [ %538, %502 ]
br i1 %73, label %560, label %543
543: ; preds = %541
%544 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %542
%545 = bitcast double* %544 to <2 x double>*
%546 = load <2 x double>, <2 x double>* %545
%547 = getelementptr inbounds double, double* %544, i64 2
%548 = bitcast double* %547 to <2 x double>*
%549 = load <2 x double>, <2 x double>* %548
%550 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %542
%551 = bitcast double* %550 to <2 x double>*
%552 = load <2 x double>, <2 x double>* %551
%553 = getelementptr inbounds double, double* %550, i64 2
%554 = bitcast double* %553 to <2 x double>*
%555 = load <2 x double>, <2 x double>* %554
%556 = fadd <2 x double> %546, %552
%557 = fadd <2 x double> %549, %555
%558 = bitcast double* %550 to <2 x double>*
store <2 x double> %556, <2 x double>* %558
%559 = bitcast double* %553 to <2 x double>*
store <2 x double> %557, <2 x double>* %559
br label %560
560: ; preds = %541, %543
br i1 %74, label %563, label %561
561: ; preds = %500, %560
%562 = phi i64 [ 0, %500 ], [ %69, %560 ]
br label %609
563: ; preds = %609, %560
br i1 %23, label %564, label %635
564: ; preds = %563
br i1 %75, label %607, label %565
565: ; preds = %564
%566 = insertelement <2 x double> poison, double %493, i64 0
%567 = shufflevector <2 x double> %566, <2 x double> poison, <2 x i32> zeroinitializer
%568 = insertelement <2 x double> poison, double %493, i64 0
%569 = shufflevector <2 x double> %568, <2 x double> poison, <2 x i32> zeroinitializer
br label %570
570: ; preds = %570, %565
%571 = phi i64 [ 0, %565 ], [ %604, %570 ]
%572 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %571
%573 = bitcast double* %572 to <2 x double>*
%574 = load <2 x double>, <2 x double>* %573
%575 = getelementptr inbounds double, double* %572, i64 2
%576 = bitcast double* %575 to <2 x double>*
%577 = load <2 x double>, <2 x double>* %576
%578 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 %571
%579 = bitcast double* %578 to <2 x double>*
%580 = load <2 x double>, <2 x double>* %579
%581 = getelementptr inbounds double, double* %578, i64 2
%582 = bitcast double* %581 to <2 x double>*
%583 = load <2 x double>, <2 x double>* %582
%584 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 %571
%585 = bitcast double* %584 to <2 x double>*
%586 = load <2 x double>, <2 x double>* %585
%587 = getelementptr inbounds double, double* %584, i64 2
%588 = bitcast double* %587 to <2 x double>*
%589 = load <2 x double>, <2 x double>* %588
%590 = fadd <2 x double> %580, %586
%591 = fadd <2 x double> %583, %589
%592 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %590, <2 x double> <double 0x3FD5555555555555, double 0x3FD5555555555555>, <2 x double> %574)
%593 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %591, <2 x double> <double 0x3FD5555555555555, double 0x3FD5555555555555>, <2 x double> %577)
%594 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %571
%595 = bitcast double* %594 to <2 x double>*
%596 = load <2 x double>, <2 x double>* %595
%597 = getelementptr inbounds double, double* %594, i64 2
%598 = bitcast double* %597 to <2 x double>*
%599 = load <2 x double>, <2 x double>* %598
%600 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %567, <2 x double> %592, <2 x double> %596)
%601 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %569, <2 x double> %593, <2 x double> %599)
%602 = bitcast double* %594 to <2 x double>*
store <2 x double> %600, <2 x double>* %602
%603 = bitcast double* %597 to <2 x double>*
store <2 x double> %601, <2 x double>* %603
%604 = add nuw i64 %571, 4
%605 = icmp eq i64 %604, %76
br i1 %605, label %606, label %570
606: ; preds = %570
br i1 %77, label %618, label %607
607: ; preds = %564, %606
%608 = phi i64 [ 0, %564 ], [ %76, %606 ]
br label %620
609: ; preds = %561, %609
%610 = phi i64 [ %616, %609 ], [ %562, %561 ]
%611 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %610
%612 = load double, double* %611
%613 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %610
%614 = load double, double* %613
%615 = fadd double %612, %614
store double %615, double* %613
%616 = add nuw nsw i64 %610, 1
%617 = icmp eq i64 %616, %27
br i1 %617, label %563, label %609
618: ; preds = %620, %606
br i1 %23, label %619, label %635
619: ; preds = %618
br label %635
620: ; preds = %607, %620
%621 = phi i64 [ %633, %620 ], [ %608, %607 ]
%622 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %621
%623 = load double, double* %622
%624 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 %621
%625 = load double, double* %624
%626 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 %621
%627 = load double, double* %626
%628 = fadd double %625, %627
%629 = call double @llvm.fmuladd.f64(double %628, double 0x3FD5555555555555, double %623)
%630 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %621
%631 = load double, double* %630
%632 = call double @llvm.fmuladd.f64(double %493, double %629, double %631)
store double %632, double* %630
%633 = add nuw nsw i64 %621, 1
%634 = icmp eq i64 %633, %27
br i1 %634, label %618, label %620
635: ; preds = %499, %563, %619, %618
%636 = add nsw i64 %401, 1
%637 = load i32, i32* %98
%638 = sext i32 %637 to i64
%639 = icmp slt i64 %636, %638
br i1 %639, label %400, label %324
640: ; preds = %397, %640
%641 = phi i64 [ %661, %640 ], [ %398, %397 ]
%642 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %641
%643 = load double, double* %642
%644 = fmul double %643, 5.000000e-01
%645 = add nuw nsw i64 %641, %328
%646 = getelementptr inbounds double, double* %5, i64 %645
store double %644, double* %646
%647 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %641
%648 = load double, double* %647
%649 = fdiv double %648, %325
%650 = getelementptr inbounds double, double* %6, i64 %645
store double %649, double* %650
%651 = add nuw nsw i64 %641, 1
%652 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %651
%653 = load double, double* %652
%654 = fmul double %653, 5.000000e-01
%655 = add nuw nsw i64 %651, %328
%656 = getelementptr inbounds double, double* %5, i64 %655
store double %654, double* %656
%657 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %651
%658 = load double, double* %657
%659 = fdiv double %658, %325
%660 = getelementptr inbounds double, double* %6, i64 %655
store double %659, double* %660
%661 = add nuw nsw i64 %641, 2
%662 = icmp eq i64 %661, %27
br i1 %662, label %663, label %640
663: ; preds = %397, %640, %382, %324
%664 = getelementptr inbounds double, double* %7, i64 %92
store double %325, double* %664
%665 = icmp eq i64 %97, %29
br i1 %665, label %666, label %91
666: ; preds = %663, %8
ret void
}