#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 *);
double norm(double *);
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};
  double twothirds = 0.666666666666666666666666666667;
  double a;
  int num_face_nodes;
  double area;
#pragma omp parallel for default(none) private(                                \
    f, x, u, v, w, i, k, node, cface, n, a, num_face_nodes, area)              \
    shared(fnormals, fcentroids, fareas, coords, nfaces, nodepos, facenodes)   \
        firstprivate(ndims, twothirds)
  for (f = 0; f < nfaces; ++f) {
    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];
    area = 0;
    for (k = nodepos[f]; k < nodepos[f + 1]; ++k) {
      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;
      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  0xe79(%rip),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1700 <compute_face_geometry+0x5d0>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11df <compute_face_geometry+0xaf>
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    11ac <compute_face_geometry+0x7c>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    121f <compute_face_geometry+0xef>
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    11e9 <compute_face_geometry+0xb9>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    125f <compute_face_geometry+0x12f>
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    1229 <compute_face_geometry+0xf9>
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    1312 <compute_face_geometry+0x1e2>
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    12f9 <compute_face_geometry+0x1c9>
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    12aa <compute_face_geometry+0x17a>
jmp    12fe <compute_face_geometry+0x1ce>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    1270 <compute_face_geometry+0x140>
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,-0x114(%rbp)
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    137f <compute_face_geometry+0x24f>
cvtsi2sdl -0x114(%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    133d <compute_face_geometry+0x20d>
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    1402 <compute_face_geometry+0x2d2>
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    13ac <compute_face_geometry+0x27c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
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    1654 <compute_face_geometry+0x524>
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    14b1 <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    1458 <compute_face_geometry+0x328>
lea    -0x70(%rbp),%rdi
lea    -0x90(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
call   1050 <cross@plt>
lea    -0xb0(%rbp),%rdi
call   1040 <norm@plt>
movaps %xmm0,%xmm1
movsd  0xb29(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
addsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1559 <compute_face_geometry+0x429>
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    150d <compute_face_geometry+0x3dd>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    15f1 <compute_face_geometry+0x4c1>
movsd  -0x110(%rbp),%xmm0
ff
movslq -0xb4(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm1
movsd  0xa79(%rip),%xmm2
mulsd  -0x108(%rbp),%xmm2
ff
movslq -0xb4(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm3
movslq -0xb4(%rbp),%rax
addsd  -0x90(%rbp,%rax,8),%xmm3
ff ff
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    1563 <compute_face_geometry+0x433>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    163b <compute_face_geometry+0x50b>
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    15fb <compute_face_geometry+0x4cb>
jmp    1640 <compute_face_geometry+0x510>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    141e <compute_face_geometry+0x2ee>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    16dd <compute_face_geometry+0x5ad>
movslq -0xb4(%rbp),%rax
movsd  0x98c(%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  -0x120(%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    165e <compute_face_geometry+0x52e>
movsd  -0x120(%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    1196 <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    $0x188,%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    1c8b <compute_face_geometry+0xb4b>
mov    %edi,%ebp
mov    0x1c0(%rsp),%r8
mov    %edi,%r13d
lea    0x0(,%r13,8),%r15
mov    %edx,%eax
mov    %rax,0x150(%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,0x148(%rsp)
mov    %r15,0x100(%rsp)
and    $0xffffffffffffffe0,%r15
movsd  0xd94(%rip),%xmm4
movapd 0xdac(%rip),%xmm5
mov    0x28(%rsp),%rax
add    $0x30,%rax
mov    %rax,0xd0(%rsp)
lea    0x10(%r8),%rax
mov    %rax,0x130(%rsp)
lea    0x10(%rdx),%rax
mov    %rax,0x128(%rsp)
lea    0x8(%r8),%rax
mov    %rax,0x140(%rsp)
lea    0x8(%rdx),%rax
mov    %rax,0x138(%rsp)
xor    %r9d,%r9d
xor    %ebx,%ebx
jmp    12e4 <compute_face_geometry+0x1a4>
nopl   0x0(%rax)
mov    0x1c8(%rsp),%rax
mov    0x70(%rsp),%rcx
movsd  %xmm2,(%rax,%rcx,8)
add    $0x3,%r9d
cmp    0x150(%rsp),%rbx
je     1c8b <compute_face_geometry+0xb4b>
mov    %r9,0x158(%rsp)
mov    %rbx,0x70(%rsp)
test   %ebp,%ebp
jle    133a <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  0xcc6(%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    14a0 <compute_face_geometry+0x360>
mov    %r12,%rcx
jmp    136d <compute_face_geometry+0x22d>
xchg   %ax,%ax
add    $0x1,%rcx
cmp    %rax,%rcx
je     14a0 <compute_face_geometry+0x360>
test   %ebp,%ebp
jle    1360 <compute_face_geometry+0x220>
mov    0xd8(%rsp),%rdx
movslq (%rdx,%rcx,4),%rdx
lea    (%rdx,%rdx,2),%rdx
cmp    $0x4,%ebp
jae    1390 <compute_face_geometry+0x250>
xor    %esi,%esi
jmp    1458 <compute_face_geometry+0x318>
nopl   (%rax)
cmpq   $0x0,0x88(%rsp)
je     148f <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    13c0 <compute_face_geometry+0x280>
testb  $0x1,0x80(%rsp)
01
je     1447 <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     1360 <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    1470 <compute_face_geometry+0x330>
jmp    1360 <compute_face_geometry+0x220>
xor    %esi,%esi
testb  $0x1,0x80(%rsp)
01
jne    141b <compute_face_geometry+0x2db>
jmp    1447 <compute_face_geometry+0x307>
nopl   (%rax)
test   %ebp,%ebp
jle    167d <compute_face_geometry+0x53d>
mov    %eax,%ecx
sub    %r12d,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
cmp    $0x1,%ebp
jne    14c0 <compute_face_geometry+0x380>
xor    %ecx,%ecx
jmp    1550 <compute_face_geometry+0x410>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmpq   $0x0,0xf0(%rsp)
je     1c4c <compute_face_geometry+0xb0c>
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    14f0 <compute_face_geometry+0x3b0>
testb  $0x1,0xe8(%rsp)
01
je     1534 <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     1569 <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    1550 <compute_face_geometry+0x410>
test   %ebp,%ebp
jle    167d <compute_face_geometry+0x53d>
mov    0xd8(%rsp),%rcx
movslq -0x4(%rcx,%rax,4),%rcx
lea    (%rcx,%rcx,2),%rcx
cmp    $0x4,%ebp
jae    158e <compute_face_geometry+0x44e>
xor    %edx,%edx
jmp    1656 <compute_face_geometry+0x516>
cmpq   $0x0,0x88(%rsp)
je     1c76 <compute_face_geometry+0xb36>
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    15b0 <compute_face_geometry+0x470>
testb  $0x1,0x80(%rsp)
01
je     1649 <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     167d <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    1660 <compute_face_geometry+0x520>
mov    0x70(%rsp),%rcx
lea    0x1(%rcx),%rbx
xorpd  %xmm2,%xmm2
cmp    %r12d,%eax
jle    1a80 <compute_face_geometry+0x940>
xorpd  %xmm2,%xmm2
jmp    16ce <compute_face_geometry+0x58e>
nopl   0x0(%rax)
movapd 0x170(%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    1a80 <compute_face_geometry+0x940>
movapd %xmm2,0x170(%rsp)
test   %ebp,%ebp
jle    17fd <compute_face_geometry+0x6bd>
mov    0xd8(%rsp),%rax
movslq (%rax,%r12,4),%rax
lea    (%rax,%rax,2),%rax
cmp    $0x4,%ebp
jae    1700 <compute_face_geometry+0x5c0>
xor    %ecx,%ecx
jmp    17d6 <compute_face_geometry+0x696>
nopl   0x0(%rax,%rax,1)
cmpq   $0x0,0x88(%rsp)
je     1a49 <compute_face_geometry+0x909>
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    1730 <compute_face_geometry+0x5f0>
testb  $0x1,0x80(%rsp)
01
je     17c9 <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     17fd <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    17e0 <compute_face_geometry+0x6a0>
lea    0xb0(%rsp),%rdi
lea    0x90(%rsp),%rsi
lea    0x110(%rsp),%r14
mov    %r14,%rdx
call   1060 <cross@plt>
mov    %r14,%rdi
call   1040 <norm@plt>
movsd  0x7d3(%rip),%xmm4
mulsd  %xmm4,%xmm0
test   %ebp,%ebp
movsd  0x7cd(%rip),%xmm5
movapd 0x7cd(%rip),%xmm6
jle    16a0 <compute_face_geometry+0x560>
cmp    $0x4,%ebp
jae    1860 <compute_face_geometry+0x720>
xor    %eax,%eax
jmp    1920 <compute_face_geometry+0x7e0>
cs nopw 0x0(%rax,%rax,1)
nop
cmpq   $0x0,0x88(%rsp)
je     1a5e <compute_face_geometry+0x91e>
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    1880 <compute_face_geometry+0x740>
testb  $0x1,0x80(%rsp)
01
je     1912 <compute_face_geometry+0x7d2>
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     193e <compute_face_geometry+0x7fe>
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    1920 <compute_face_geometry+0x7e0>
test   %ebp,%ebp
jle    16a0 <compute_face_geometry+0x560>
cmp    $0x4,%ebp
jae    1952 <compute_face_geometry+0x812>
xor    %eax,%eax
jmp    19d0 <compute_face_geometry+0x890>
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    1960 <compute_face_geometry+0x820>
mov    0x48(%rsp),%rcx
mov    %rcx,%rax
cmp    %r13,%rcx
je     1a05 <compute_face_geometry+0x8c5>
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    19d0 <compute_face_geometry+0x890>
test   %ebp,%ebp
jle    16a0 <compute_face_geometry+0x560>
lea    0xb0(%rsp),%rdi
lea    0x90(%rsp),%rsi
mov    0x100(%rsp),%rdx
movapd %xmm0,0x160(%rsp)
call   1050 <memcpy@plt>
movapd 0x160(%rsp),%xmm0
movsd  0x5bc(%rip),%xmm4
jmp    16a0 <compute_face_geometry+0x560>
xor    %ecx,%ecx
testb  $0x1,0x80(%rsp)
01
jne    1797 <compute_face_geometry+0x657>
jmp    17c9 <compute_face_geometry+0x689>
xor    %eax,%eax
testb  $0x1,0x80(%rsp)
01
jne    18e8 <compute_face_geometry+0x7a8>
jmp    1912 <compute_face_geometry+0x7d2>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %ebp,%ebp
mov    0x158(%rsp),%r9
jle    12c0 <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     1ab0 <compute_face_geometry+0x970>
xor    %eax,%eax
jmp    1b8c <compute_face_geometry+0xa4c>
xchg   %ax,%ax
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
cmpq   $0x0,0xf0(%rsp)
je     1c61 <compute_face_geometry+0xb21>
mov    0x130(%rsp),%rax
lea    (%rax,%r8,8),%rsi
mov    0x128(%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    1af0 <compute_face_geometry+0x9b0>
testb  $0x1,0xe8(%rsp)
01
je     1b78 <compute_face_geometry+0xa38>
movapd 0x30(%rsp,%rdx,8),%xmm1
mulpd  0x4d0(%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    0x1c0(%rsp),%rdx
movupd %xmm1,(%rdx,%rax,8)
mov    0xf8(%rsp),%rdx
mov    %rdx,%rax
cmp    %r13,%rdx
je     12c0 <compute_face_geometry+0x180>
mov    %rax,%rdx
test   $0x1,%r13b
je     1bcd <compute_face_geometry+0xa8d>
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    0x1c0(%rsp),%rdx
movsd  %xmm0,(%rdx,%rcx,8)
mov    %rax,%rdx
or     $0x1,%rdx
not    %rax
cmp    0x148(%rsp),%rax
je     12c0 <compute_face_geometry+0x180>
mov    0x140(%rsp),%rax
lea    (%rax,%r8,8),%rax
mov    0x138(%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    1c00 <compute_face_geometry+0xac0>
jmp    12c0 <compute_face_geometry+0x180>
xor    %ecx,%ecx
testb  $0x1,0xe8(%rsp)
01
jne    1524 <compute_face_geometry+0x3e4>
jmp    1534 <compute_face_geometry+0x3f4>
xor    %edx,%edx
testb  $0x1,0xe8(%rsp)
01
jne    1b42 <compute_face_geometry+0xa02>
jmp    1b78 <compute_face_geometry+0xa38>
xor    %edx,%edx
testb  $0x1,0x80(%rsp)
01
jne    1617 <compute_face_geometry+0x4d7>
jmp    1649 <compute_face_geometry+0x509>
add    $0x188,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
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 double
%29 = alloca i32
%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 = %347, %8
%34 = load i32, i32* %17
%35 = load i32, i32* %11
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %350
37: ; preds = %33
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* %29
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* %29
%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
store double 0.000000e+00, double* %30
%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 = %304, %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 %307
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* %28
%236 = load double, double* %28
%237 = load double, double* %30
%238 = fadd double %237, %236
store double %238, double* %30
store i32 0, i32* %22
br label %239
239: ; preds = %253, %228
%240 = load i32, i32* %22
%241 = load i32, i32* %9
%242 = icmp slt i32 %240, %241
br i1 %242, label %243, label %256
243: ; preds = %239
%244 = load i32, i32* %22
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 %245
%247 = load double, double* %246
%248 = load i32, i32* %22
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0, i64 %249
%251 = load double, double* %250
%252 = fadd double %251, %247
store double %252, double* %250
br label %253
253: ; preds = %243
%254 = load i32, i32* %22
%255 = add nsw i32 %254, 1
store i32 %255, i32* %22
br label %239
256: ; preds = %239
store i32 0, i32* %22
br label %257
257: ; preds = %284, %256
%258 = load i32, i32* %22
%259 = load i32, i32* %9
%260 = icmp slt i32 %258, %259
br i1 %260, label %261, label %287
261: ; preds = %257
%262 = load double, double* %28
%263 = load i32, i32* %22
%264 = sext i32 %263 to i64
%265 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %264
%266 = load double, double* %265
%267 = load double, double* %27
%268 = fmul double %267, 5.000000e-01
%269 = load i32, i32* %22
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds [3 x double], [3 x double]* %19, 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]* %20, i64 0, i64 %274
%276 = load double, double* %275
%277 = fadd double %272, %276
%278 = call double @llvm.fmuladd.f64(double %268, double %277, double %266)
%279 = load i32, i32* %22
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds [3 x double], [3 x double]* %25, i64 0, i64 %280
%282 = load double, double* %281
%283 = call double @llvm.fmuladd.f64(double %262, double %278, double %282)
store double %283, double* %281
br label %284
284: ; preds = %261
%285 = load i32, i32* %22
%286 = add nsw i32 %285, 1
store i32 %286, i32* %22
br label %257
287: ; preds = %257
store i32 0, i32* %22
br label %288
288: ; preds = %300, %287
%289 = load i32, i32* %22
%290 = load i32, i32* %9
%291 = icmp slt i32 %289, %290
br i1 %291, label %292, label %303
292: ; preds = %288
%293 = load i32, i32* %22
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 %294
%296 = load double, double* %295
%297 = load i32, i32* %22
%298 = sext i32 %297 to i64
%299 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 %298
store double %296, double* %299
br label %300
300: ; preds = %292
%301 = load i32, i32* %22
%302 = add nsw i32 %301, 1
store i32 %302, i32* %22
br label %288
303: ; preds = %288
br label %304
304: ; preds = %303
%305 = load i32, i32* %23
%306 = add nsw i32 %305, 1
store i32 %306, i32* %23
br label %189
307: ; preds = %189
store i32 0, i32* %22
br label %308
308: ; preds = %338, %307
%309 = load i32, i32* %22
%310 = load i32, i32* %9
%311 = icmp slt i32 %309, %310
br i1 %311, label %312, label %341
312: ; preds = %308
%313 = load i32, i32* %22
%314 = sext i32 %313 to i64
%315 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0, i64 %314
%316 = load double, double* %315
%317 = fmul double 5.000000e-01, %316
%318 = load double*, double** %14
%319 = load i32, i32* %17
%320 = mul nsw i32 3, %319
%321 = load i32, i32* %22
%322 = add nsw i32 %320, %321
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds double, double* %318, i64 %323
store double %317, double* %324
%325 = load i32, i32* %22
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds [3 x double], [3 x double]* %25, i64 0, i64 %326
%328 = load double, double* %327
%329 = load double, double* %30
%330 = fdiv double %328, %329
%331 = load double*, double** %15
%332 = load i32, i32* %17
%333 = mul nsw i32 3, %332
%334 = load i32, i32* %22
%335 = add nsw i32 %333, %334
%336 = sext i32 %335 to i64
%337 = getelementptr inbounds double, double* %331, i64 %336
store double %330, double* %337
br label %338
338: ; preds = %312
%339 = load i32, i32* %22
%340 = add nsw i32 %339, 1
store i32 %340, i32* %22
br label %308
341: ; preds = %308
%342 = load double, double* %30
%343 = load double*, double** %16
%344 = load i32, i32* %17
%345 = sext i32 %344 to i64
%346 = getelementptr inbounds double, double* %343, i64 %345
store double %342, double* %346
br label %347
347: ; preds = %341
%348 = load i32, i32* %17
%349 = add nsw i32 %348, 1
store i32 %349, i32* %17
br label %33
350: ; preds = %33
ret void
}

LLVM IR (-O2):
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 %661
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, %658
%92 = phi i64 [ 0, %22 ], [ %97, %658 ]
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 = %630, %310
%325 = phi double [ 0.000000e+00, %310 ], [ %494, %630 ]
br i1 %23, label %326, label %658
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 %658, 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 %658, label %635
400: ; preds = %311, %630
%401 = phi i64 [ %312, %311 ], [ %631, %630 ]
%402 = phi double [ 0.000000e+00, %311 ], [ %494, %630 ]
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
br i1 %23, label %495, label %630
495: ; preds = %490
br i1 %68, label %556, label %496
496: ; preds = %495
br i1 %71, label %536, label %497
497: ; preds = %496, %497
%498 = phi i64 [ %533, %497 ], [ 0, %496 ]
%499 = phi i64 [ %534, %497 ], [ 0, %496 ]
%500 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %498
%501 = bitcast double* %500 to <2 x double>*
%502 = load <2 x double>, <2 x double>* %501
%503 = getelementptr inbounds double, double* %500, i64 2
%504 = bitcast double* %503 to <2 x double>*
%505 = load <2 x double>, <2 x double>* %504
%506 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %498
%507 = bitcast double* %506 to <2 x double>*
%508 = load <2 x double>, <2 x double>* %507
%509 = getelementptr inbounds double, double* %506, i64 2
%510 = bitcast double* %509 to <2 x double>*
%511 = load <2 x double>, <2 x double>* %510
%512 = fadd <2 x double> %502, %508
%513 = fadd <2 x double> %505, %511
%514 = bitcast double* %506 to <2 x double>*
store <2 x double> %512, <2 x double>* %514
%515 = bitcast double* %509 to <2 x double>*
store <2 x double> %513, <2 x double>* %515
%516 = or i64 %498, 4
%517 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %516
%518 = bitcast double* %517 to <2 x double>*
%519 = load <2 x double>, <2 x double>* %518
%520 = getelementptr inbounds double, double* %517, i64 2
%521 = bitcast double* %520 to <2 x double>*
%522 = load <2 x double>, <2 x double>* %521
%523 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %516
%524 = bitcast double* %523 to <2 x double>*
%525 = load <2 x double>, <2 x double>* %524
%526 = getelementptr inbounds double, double* %523, i64 2
%527 = bitcast double* %526 to <2 x double>*
%528 = load <2 x double>, <2 x double>* %527
%529 = fadd <2 x double> %519, %525
%530 = fadd <2 x double> %522, %528
%531 = bitcast double* %523 to <2 x double>*
store <2 x double> %529, <2 x double>* %531
%532 = bitcast double* %526 to <2 x double>*
store <2 x double> %530, <2 x double>* %532
%533 = add nuw i64 %498, 8
%534 = add i64 %499, 2
%535 = icmp eq i64 %534, %72
br i1 %535, label %536, label %497
536: ; preds = %497, %496
%537 = phi i64 [ 0, %496 ], [ %533, %497 ]
br i1 %73, label %555, label %538
538: ; preds = %536
%539 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %537
%540 = bitcast double* %539 to <2 x double>*
%541 = load <2 x double>, <2 x double>* %540
%542 = getelementptr inbounds double, double* %539, i64 2
%543 = bitcast double* %542 to <2 x double>*
%544 = load <2 x double>, <2 x double>* %543
%545 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %537
%546 = bitcast double* %545 to <2 x double>*
%547 = load <2 x double>, <2 x double>* %546
%548 = getelementptr inbounds double, double* %545, i64 2
%549 = bitcast double* %548 to <2 x double>*
%550 = load <2 x double>, <2 x double>* %549
%551 = fadd <2 x double> %541, %547
%552 = fadd <2 x double> %544, %550
%553 = bitcast double* %545 to <2 x double>*
store <2 x double> %551, <2 x double>* %553
%554 = bitcast double* %548 to <2 x double>*
store <2 x double> %552, <2 x double>* %554
br label %555
555: ; preds = %536, %538
br i1 %74, label %558, label %556
556: ; preds = %495, %555
%557 = phi i64 [ 0, %495 ], [ %69, %555 ]
br label %604
558: ; preds = %604, %555
br i1 %23, label %559, label %630
559: ; preds = %558
br i1 %75, label %602, label %560
560: ; preds = %559
%561 = insertelement <2 x double> poison, double %493, i64 0
%562 = shufflevector <2 x double> %561, <2 x double> poison, <2 x i32> zeroinitializer
%563 = insertelement <2 x double> poison, double %493, i64 0
%564 = shufflevector <2 x double> %563, <2 x double> poison, <2 x i32> zeroinitializer
br label %565
565: ; preds = %565, %560
%566 = phi i64 [ 0, %560 ], [ %599, %565 ]
%567 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %566
%568 = bitcast double* %567 to <2 x double>*
%569 = load <2 x double>, <2 x double>* %568
%570 = getelementptr inbounds double, double* %567, i64 2
%571 = bitcast double* %570 to <2 x double>*
%572 = load <2 x double>, <2 x double>* %571
%573 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 %566
%574 = bitcast double* %573 to <2 x double>*
%575 = load <2 x double>, <2 x double>* %574
%576 = getelementptr inbounds double, double* %573, i64 2
%577 = bitcast double* %576 to <2 x double>*
%578 = load <2 x double>, <2 x double>* %577
%579 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 %566
%580 = bitcast double* %579 to <2 x double>*
%581 = load <2 x double>, <2 x double>* %580
%582 = getelementptr inbounds double, double* %579, i64 2
%583 = bitcast double* %582 to <2 x double>*
%584 = load <2 x double>, <2 x double>* %583
%585 = fadd <2 x double> %575, %581
%586 = fadd <2 x double> %578, %584
%587 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %585, <2 x double> <double 0x3FD5555555555555, double 0x3FD5555555555555>, <2 x double> %569)
%588 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %586, <2 x double> <double 0x3FD5555555555555, double 0x3FD5555555555555>, <2 x double> %572)
%589 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %566
%590 = bitcast double* %589 to <2 x double>*
%591 = load <2 x double>, <2 x double>* %590
%592 = getelementptr inbounds double, double* %589, i64 2
%593 = bitcast double* %592 to <2 x double>*
%594 = load <2 x double>, <2 x double>* %593
%595 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %562, <2 x double> %587, <2 x double> %591)
%596 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %564, <2 x double> %588, <2 x double> %594)
%597 = bitcast double* %589 to <2 x double>*
store <2 x double> %595, <2 x double>* %597
%598 = bitcast double* %592 to <2 x double>*
store <2 x double> %596, <2 x double>* %598
%599 = add nuw i64 %566, 4
%600 = icmp eq i64 %599, %76
br i1 %600, label %601, label %565
601: ; preds = %565
br i1 %77, label %613, label %602
602: ; preds = %559, %601
%603 = phi i64 [ 0, %559 ], [ %76, %601 ]
br label %615
604: ; preds = %556, %604
%605 = phi i64 [ %611, %604 ], [ %557, %556 ]
%606 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %605
%607 = load double, double* %606
%608 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %605
%609 = load double, double* %608
%610 = fadd double %607, %609
store double %610, double* %608
%611 = add nuw nsw i64 %605, 1
%612 = icmp eq i64 %611, %27
br i1 %612, label %558, label %604
613: ; preds = %615, %601
br i1 %23, label %614, label %630
614: ; preds = %613
br label %630
615: ; preds = %602, %615
%616 = phi i64 [ %628, %615 ], [ %603, %602 ]
%617 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %616
%618 = load double, double* %617
%619 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 %616
%620 = load double, double* %619
%621 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 %616
%622 = load double, double* %621
%623 = fadd double %620, %622
%624 = call double @llvm.fmuladd.f64(double %623, double 0x3FD5555555555555, double %618)
%625 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %616
%626 = load double, double* %625
%627 = call double @llvm.fmuladd.f64(double %493, double %624, double %626)
store double %627, double* %625
%628 = add nuw nsw i64 %616, 1
%629 = icmp eq i64 %628, %27
br i1 %629, label %613, label %615
630: ; preds = %490, %558, %614, %613
%631 = add nsw i64 %401, 1
%632 = load i32, i32* %98
%633 = sext i32 %632 to i64
%634 = icmp slt i64 %631, %633
br i1 %634, label %400, label %324
635: ; preds = %397, %635
%636 = phi i64 [ %656, %635 ], [ %398, %397 ]
%637 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %636
%638 = load double, double* %637
%639 = fmul double %638, 5.000000e-01
%640 = add nuw nsw i64 %636, %328
%641 = getelementptr inbounds double, double* %5, i64 %640
store double %639, double* %641
%642 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %636
%643 = load double, double* %642
%644 = fdiv double %643, %325
%645 = getelementptr inbounds double, double* %6, i64 %640
store double %644, double* %645
%646 = add nuw nsw i64 %636, 1
%647 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %646
%648 = load double, double* %647
%649 = fmul double %648, 5.000000e-01
%650 = add nuw nsw i64 %646, %328
%651 = getelementptr inbounds double, double* %5, i64 %650
store double %649, double* %651
%652 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 %646
%653 = load double, double* %652
%654 = fdiv double %653, %325
%655 = getelementptr inbounds double, double* %6, i64 %650
store double %654, double* %655
%656 = add nuw nsw i64 %636, 2
%657 = icmp eq i64 %656, %27
br i1 %657, label %658, label %635
658: ; preds = %397, %635, %382, %324
%659 = getelementptr inbounds double, double* %7, i64 %92
store double %325, double* %659
%660 = icmp eq i64 %97, %29
br i1 %660, label %661, label %91
661: ; preds = %658, %8
ret void
}