#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 */
scalar_t__ acos(double);
int /*<<< orphan*/ cross(double *, double *, double *);
double distance(double *, double *);
double dot_product(double *, double *);
double fabs(double);
int /*<<< orphan*/ inform(char *);
double norm(double *);
int /*<<< orphan*/ normalize(double *);
int /*<<< orphan*/ set_error1(char *);
double tan(double);
int tuber(double elbow, int nbond, double acen[3], double acens[8][3],
          double brads[8], double tcen[3], double taxis[3], double tradii[2],
          double ccens[2][3], double cradii[2]) {
  int k;
  double r, rt, lb1, lb2, dot12, beta;
  double thb, chb, check;
  double vect1[3], vect2[3], uvect1[3], uvect2[3];
  double perp[3], inward[3];
  if (elbow <= 1.0)
    return (0);
  if (nbond < 2)
    return (0);
  if (brads[0] != brads[1])
    return (0);
  if (nbond > 2) {
    if (brads[2] >= brads[1])
      return (0);
  }
  for (k = 0; k < 3; k++) {
    vect1[k] = acens[0][k] - acen[k];
    vect2[k] = acens[1][k] - acen[k];
  }
  lb1 = norm(vect1);
  if (lb1 <= 0.0)
    return (0);
  lb2 = norm(vect2);
  if (lb2 <= 0.0)
    return (0);
  for (k = 0; k < 3; k++) {
    uvect1[k] = vect1[k] / lb1;
    uvect2[k] = vect2[k] / lb2;
  }
  cross(uvect1, uvect2, perp);
  if (norm(perp) <= 0.0) {
    inform("(tuber): collinear vectors");
    return (0);
  }
  if (!normalize(perp))
    return (0);
  cross(perp, uvect1, inward);
  normalize(inward);
  dot12 = dot_product(uvect1, uvect2);
  if (dot12 < -1.0)
    dot12 = -1.0;
  if (dot12 > 1.0)
    dot12 = 1.0;
  beta = (double)acos(dot12);
  if (beta <= 0.5)
    return (0);
  thb = tan(beta / 2.0);
  if (thb <= 0.0)
    return (0);
  chb = 1.0 / thb;
  r = brads[0];
  rt = elbow * r;
  if (0.5 * lb1 <= rt * chb)
    return (0);
  if (0.5 * lb2 <= rt * chb)
    return (0);
  for (k = 0; k < 3; k++) {
    ccens[0][k] = acen[k] + rt * chb * uvect1[k];
    ccens[1][k] = acen[k] + rt * chb * uvect2[k];
  }
  for (k = 0; k < 3; k++)
    tcen[k] = ccens[0][k] + rt * inward[k];
  check = distance(tcen, ccens[1]);
  if (fabs(check - rt) > 0.01) {
    set_error1("(tuber): bad torus radius");
    return (0);
  }
  for (k = 0; k < 3; k++)
    taxis[k] = -perp[k];
  tradii[0] = rt;
  tradii[1] = r;
  cradii[0] = r;
  cradii[1] = r;
  return (1);
}


x86 assembly (clang, -O0):
<tuber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
movsd  0xe35(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11e2 <tuber+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
cmpl   $0x2,-0x14(%rbp)
jge    11f8 <tuber+0x68>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jne    121a <tuber+0x8a>
jp     121a <tuber+0x8a>
jmp    1226 <tuber+0x96>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
cmpl   $0x2,-0x14(%rbp)
jle    1259 <tuber+0xc9>
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x30(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jb     1254 <tuber+0xc4>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
jmp    1259 <tuber+0xc9>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    12c7 <tuber+0x137>
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0x18(%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1260 <tuber+0xd0>
lea    -0xb0(%rbp),%rdi
call   1050 <norm@plt>
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x60(%rbp),%xmm0
jb     12f2 <tuber+0x162>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
lea    -0xd0(%rbp),%rdi
call   1050 <norm@plt>
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x68(%rbp),%xmm0
jb     131d <tuber+0x18d>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    137a <tuber+0x1ea>
movslq -0x44(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
divsd  -0x60(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0xf0(%rbp,%rax,8)
ff ff
movslq -0x44(%rbp),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm0
ff ff
divsd  -0x68(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0x110(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1324 <tuber+0x194>
lea    -0xf0(%rbp),%rdi
lea    -0x110(%rbp),%rsi
lea    -0x130(%rbp),%rdx
call   10a0 <cross@plt>
lea    -0x130(%rbp),%rdi
call   1050 <norm@plt>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     13c8 <tuber+0x238>
lea    0xc89(%rip),%rdi
call   1090 <inform@plt>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
lea    -0x130(%rbp),%rdi
call   1040 <normalize@plt>
cmp    $0x0,%eax
jne    13e9 <tuber+0x259>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
lea    -0x130(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
lea    -0x150(%rbp),%rdx
call   10a0 <cross@plt>
lea    -0x150(%rbp),%rdi
call   1040 <normalize@plt>
lea    -0xf0(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1060 <dot_product@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  0xbd9(%rip),%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    1447 <tuber+0x2b7>
movsd  0xbc6(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  0xbac(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    146b <tuber+0x2db>
movsd  0xb9a(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1030 <acos@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xb89(%rip),%xmm0
ucomisd -0x78(%rbp),%xmm0
jb     149e <tuber+0x30e>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
movsd  -0x78(%rbp),%xmm0
movsd  0xb6d(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1080 <tan@plt>
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x80(%rbp),%xmm0
jb     14d3 <tuber+0x343>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
movsd  0xb25(%rip),%xmm0
divsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xb04(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1534 <tuber+0x3a4>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
movsd  0xad4(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1564 <tuber+0x3d4>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    15fc <tuber+0x46c>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movslq -0x44(%rbp),%rax
movsd  -0xf0(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movslq -0x44(%rbp),%rax
movsd  -0x110(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,0x18(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    156b <tuber+0x3db>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    164f <tuber+0x4bf>
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x58(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  -0x150(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1603 <tuber+0x473>
mov    -0x38(%rbp),%rdi
mov    0x18(%rbp),%rsi
add    $0x18,%rsi
call   10b0 <distance@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0x58(%rbp),%xmm0
movaps 0x9b4(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x998(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    16aa <tuber+0x51a>
lea    0x9c2(%rip),%rdi
call   1070 <set_error1@plt>
movl   $0x0,-0x4(%rbp)
jmp    1737 <tuber+0x5a7>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    16fa <tuber+0x56a>
movslq -0x44(%rbp),%rax
movsd  -0x130(%rbp,%rax,8),%xmm0
ff ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    16b1 <tuber+0x521>
movsd  -0x58(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x50(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x50(%rbp),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x50(%rbp),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tuber>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
xor    %ebp,%ebp
movsd  0xe55(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11ca <tuber+0x3a>
cmp    $0x2,%edi
jl     11ca <tuber+0x3a>
mov    %rcx,%rbx
movsd  (%rcx),%xmm1
movsd  0x8(%rcx),%xmm2
ucomisd %xmm2,%xmm1
jne    11ca <tuber+0x3a>
jnp    11de <tuber+0x4e>
mov    %ebp,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r9,%r14
mov    %r8,%r15
mov    %rsi,%r12
cmp    $0x3,%edi
jb     11f7 <tuber+0x67>
movsd  0x10(%rbx),%xmm1
ucomisd %xmm2,%xmm1
jae    11ca <tuber+0x3a>
movsd  %xmm0,0x8(%rsp)
movupd (%r12),%xmm0
movupd (%rdx),%xmm1
subpd  %xmm0,%xmm1
movapd %xmm1,0xa0(%rsp)
movupd 0x18(%rdx),%xmm1
subpd  %xmm0,%xmm1
movapd %xmm1,0x80(%rsp)
movsd  0x10(%rdx),%xmm0
movsd  0x10(%r12),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0xb0(%rsp)
movsd  0x28(%rdx),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x90(%rsp)
lea    0xa0(%rsp),%rdi
call   1050 <norm@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    11ca <tuber+0x3a>
movapd %xmm0,0x30(%rsp)
lea    0x80(%rsp),%rdi
call   1050 <norm@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    11ca <tuber+0x3a>
movapd 0xa0(%rsp),%xmm3
movapd 0x30(%rsp),%xmm2
movapd %xmm2,%xmm1
unpcklpd %xmm2,%xmm1
divpd  %xmm1,%xmm3
movapd %xmm3,0x10(%rsp)
movapd 0x80(%rsp),%xmm3
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
divpd  %xmm1,%xmm3
movapd %xmm3,0x40(%rsp)
movsd  0xb0(%rsp),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x90(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x50(%rsp)
lea    0x10(%rsp),%rdi
lea    0x40(%rsp),%rsi
lea    0x60(%rsp),%r13
mov    %r13,%rdx
movapd %xmm0,0xe0(%rsp)
call   10a0 <cross@plt>
mov    %r13,%rdi
call   1050 <norm@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    1512 <tuber+0x382>
lea    0x60(%rsp),%rdi
call   1040 <normalize@plt>
test   %eax,%eax
je     11ca <tuber+0x3a>
lea    0x60(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc0(%rsp),%r13
mov    %r13,%rdx
call   10a0 <cross@plt>
mov    %r13,%rdi
call   1040 <normalize@plt>
lea    0x40(%rsp),%rsi
lea    0x10(%rsp),%rdi
call   1060 <dot_product@plt>
movsd  0xc98(%rip),%xmm1
maxsd  %xmm0,%xmm1
movsd  0xc84(%rip),%xmm0
minsd  %xmm1,%xmm0
call   1030 <acos@plt>
test   %rax,%rax
jle    11ca <tuber+0x3a>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mulsd  0xc72(%rip),%xmm0
call   1080 <tan@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    11ca <tuber+0x3a>
movsd  0xc47(%rip),%xmm3
divsd  %xmm0,%xmm3
movsd  (%rbx),%xmm4
movsd  0x8(%rsp),%xmm2
mulsd  %xmm4,%xmm2
movsd  0xc3d(%rip),%xmm0
movapd 0x30(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm3
ucomisd %xmm1,%xmm3
jae    11ca <tuber+0x3a>
movapd 0xe0(%rsp),%xmm1
mulsd  %xmm0,%xmm1
ucomisd %xmm1,%xmm3
jae    11ca <tuber+0x3a>
movsd  %xmm4,0x30(%rsp)
mov    0x138(%rsp),%rax
movsd  0x10(%rsp),%xmm0
mulsd  %xmm3,%xmm0
addsd  (%r12),%xmm0
movsd  %xmm0,(%rax)
movsd  0x40(%rsp),%xmm1
mulsd  %xmm3,%xmm1
addsd  (%r12),%xmm1
movsd  %xmm1,0x18(%rax)
movsd  0x18(%rsp),%xmm1
mulsd  %xmm3,%xmm1
addsd  0x8(%r12),%xmm1
movsd  %xmm1,0x8(%rax)
movsd  0x48(%rsp),%xmm1
mulsd  %xmm3,%xmm1
addsd  0x8(%r12),%xmm1
movsd  %xmm1,0x20(%rax)
movsd  0x20(%rsp),%xmm1
mulsd  %xmm3,%xmm1
addsd  0x10(%r12),%xmm1
movsd  %xmm1,0x10(%rax)
mulsd  0x50(%rsp),%xmm3
addsd  0x10(%r12),%xmm3
lea    0x18(%rax),%rsi
movsd  %xmm3,0x28(%rax)
movsd  0xc0(%rsp),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r15)
movsd  0xc8(%rsp),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%r15)
movsd  0xd0(%rsp),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x10(%rax),%xmm0
movsd  %xmm0,0x10(%r15)
mov    %r15,%rdi
movsd  %xmm2,0x8(%rsp)
call   10b0 <distance@plt>
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
andpd  0xb39(%rip),%xmm0
ucomisd 0xb19(%rip),%xmm0
jbe    1523 <tuber+0x393>
lea    0xb63(%rip),%rdi
call   1070 <set_error1@plt>
jmp    11ca <tuber+0x3a>
lea    0xb37(%rip),%rdi
call   1090 <inform@plt>
jmp    11ca <tuber+0x3a>
mov    0x140(%rsp),%rax
mov    0x130(%rsp),%rcx
movapd 0xb05(%rip),%xmm0
movapd 0x60(%rsp),%xmm1
xorpd  %xmm0,%xmm1
movupd %xmm1,(%r14)
movsd  0x70(%rsp),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,0x10(%r14)
movsd  %xmm2,(%rcx)
movsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x8(%rcx)
movsd  %xmm0,(%rax)
movsd  %xmm0,0x8(%rax)
mov    $0x1,%ebp
jmp    11ca <tuber+0x3a>

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

LLVM IR (-O2):
@.str = [27 x i8] c"(tuber): collinear vectors\00"
@.str.1 = [26 x i8] c"(tuber): bad torus radius\00"
define i32 @tuber(double %0, i32 %1, double* nocapture %2, [3 x double]* nocapture %3, double* nocapture %4, double* %5, double* nocapture writeonly %6, double* nocapture writeonly %7, [3 x double]* %8, double* nocapture writeonly %9) {
%11 = alloca [3 x double]
%12 = alloca [3 x double]
%13 = alloca [3 x double]
%14 = alloca [3 x double]
%15 = alloca [3 x double]
%16 = alloca [3 x double]
%17 = bitcast [3 x double]* %11 to i8*
%18 = bitcast [3 x double]* %12 to i8*
%19 = bitcast [3 x double]* %13 to i8*
%20 = bitcast [3 x double]* %14 to i8*
%21 = bitcast [3 x double]* %15 to i8*
%22 = bitcast [3 x double]* %16 to i8*
%23 = fcmp ole double %0, 1.000000e+00
%24 = icmp slt i32 %1, 2
%25 = or i1 %23, %24
br i1 %25, label %179, label %26
26: ; preds = %10
%27 = load double, double* %4
%28 = getelementptr inbounds double, double* %4, i64 1
%29 = load double, double* %28
%30 = fcmp une double %27, %29
br i1 %30, label %179, label %31
31: ; preds = %26
%32 = icmp ugt i32 %1, 2
br i1 %32, label %33, label %37
33: ; preds = %31
%34 = getelementptr inbounds double, double* %4, i64 2
%35 = load double, double* %34
%36 = fcmp ult double %35, %29
br i1 %36, label %37, label %179
37: ; preds = %33, %31
%38 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%39 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 1, i64 0
%40 = getelementptr inbounds double, double* %2, i64 1
%41 = bitcast double* %2 to <2 x double>*
%42 = load <2 x double>, <2 x double>* %41
%43 = bitcast [3 x double]* %3 to <2 x double>*
%44 = load <2 x double>, <2 x double>* %43
%45 = fsub <2 x double> %44, %42
%46 = bitcast [3 x double]* %11 to <2 x double>*
store <2 x double> %45, <2 x double>* %46
%47 = bitcast double* %39 to <2 x double>*
%48 = load <2 x double>, <2 x double>* %47
%49 = fsub <2 x double> %48, %42
%50 = bitcast [3 x double]* %12 to <2 x double>*
store <2 x double> %49, <2 x double>* %50
%51 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%52 = load double, double* %51
%53 = getelementptr inbounds double, double* %2, i64 2
%54 = load double, double* %53
%55 = fsub double %52, %54
%56 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 2
store double %55, double* %56
%57 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 1, i64 2
%58 = load double, double* %57
%59 = fsub double %58, %54
%60 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 2
store double %59, double* %60
%61 = call double @norm(double* %38)
%62 = fcmp ugt double %61, 0.000000e+00
br i1 %62, label %63, label %179
63: ; preds = %37
%64 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 0
%65 = call double @norm(double* %64)
%66 = fcmp ugt double %65, 0.000000e+00
br i1 %66, label %67, label %179
67: ; preds = %63
%68 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 0
%69 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%70 = bitcast [3 x double]* %11 to <2 x double>*
%71 = load <2 x double>, <2 x double>* %70
%72 = insertelement <2 x double> poison, double %61, i64 0
%73 = shufflevector <2 x double> %72, <2 x double> poison, <2 x i32> zeroinitializer
%74 = fdiv <2 x double> %71, %73
%75 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 1
%76 = bitcast [3 x double]* %13 to <2 x double>*
store <2 x double> %74, <2 x double>* %76
%77 = bitcast [3 x double]* %12 to <2 x double>*
%78 = load <2 x double>, <2 x double>* %77
%79 = insertelement <2 x double> poison, double %65, i64 0
%80 = shufflevector <2 x double> %79, <2 x double> poison, <2 x i32> zeroinitializer
%81 = fdiv <2 x double> %78, %80
%82 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 1
%83 = bitcast [3 x double]* %14 to <2 x double>*
store <2 x double> %81, <2 x double>* %83
%84 = load double, double* %56
%85 = fdiv double %84, %61
%86 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 2
store double %85, double* %86
%87 = load double, double* %60
%88 = fdiv double %87, %65
%89 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 2
store double %88, double* %89
%90 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%91 = call i32 @cross(double* %68, double* %69, double* %90)
%92 = call double @norm(double* %90)
%93 = fcmp ugt double %92, 0.000000e+00
br i1 %93, label %96, label %94
94: ; preds = %67
%95 = call i32 @inform(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %179
96: ; preds = %67
%97 = call i32 @normalize(double* %90)
%98 = icmp eq i32 %97, 0
br i1 %98, label %179, label %99
99: ; preds = %96
%100 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 0
%101 = call i32 @cross(double* %90, double* %68, double* %100)
%102 = call i32 @normalize(double* %100)
%103 = call double @dot_product(double* %68, double* %69)
%104 = fcmp olt double %103, -1.000000e+00
%105 = select i1 %104, double -1.000000e+00, double %103
%106 = fcmp ogt double %105, 1.000000e+00
%107 = select i1 %106, double 1.000000e+00, double %105
%108 = call i64 @acos(double %107)
%109 = icmp slt i64 %108, 1
br i1 %109, label %179, label %110
110: ; preds = %99
%111 = sitofp i64 %108 to double
%112 = fmul double %111, 5.000000e-01
%113 = call double @tan(double %112)
%114 = fcmp ugt double %113, 0.000000e+00
br i1 %114, label %115, label %179
115: ; preds = %110
%116 = fdiv double 1.000000e+00, %113
%117 = load double, double* %4
%118 = fmul double %117, %0
%119 = fmul double %61, 5.000000e-01
%120 = fmul double %116, %118
%121 = fcmp ugt double %119, %120
%122 = fmul double %65, 5.000000e-01
%123 = fcmp ugt double %122, %120
%124 = select i1 %121, i1 %123, i1 false
br i1 %124, label %125, label %179
125: ; preds = %115
%126 = load double, double* %2
%127 = load double, double* %68
%128 = call double @llvm.fmuladd.f64(double %120, double %127, double %126)
%129 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
store double %128, double* %129
%130 = load double, double* %2
%131 = load double, double* %69
%132 = call double @llvm.fmuladd.f64(double %120, double %131, double %130)
%133 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 1, i64 0
store double %132, double* %133
%134 = load double, double* %40
%135 = load double, double* %75
%136 = call double @llvm.fmuladd.f64(double %120, double %135, double %134)
%137 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
store double %136, double* %137
%138 = load double, double* %40
%139 = load double, double* %82
%140 = call double @llvm.fmuladd.f64(double %120, double %139, double %138)
%141 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 1, i64 1
store double %140, double* %141
%142 = load double, double* %53
%143 = load double, double* %86
%144 = call double @llvm.fmuladd.f64(double %120, double %143, double %142)
%145 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
store double %144, double* %145
%146 = load double, double* %53
%147 = load double, double* %89
%148 = call double @llvm.fmuladd.f64(double %120, double %147, double %146)
%149 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 1, i64 2
store double %148, double* %149
%150 = load double, double* %100
%151 = call double @llvm.fmuladd.f64(double %118, double %150, double %128)
store double %151, double* %5
%152 = load double, double* %137
%153 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 1
%154 = load double, double* %153
%155 = call double @llvm.fmuladd.f64(double %118, double %154, double %152)
%156 = getelementptr inbounds double, double* %5, i64 1
store double %155, double* %156
%157 = load double, double* %145
%158 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 2
%159 = load double, double* %158
%160 = call double @llvm.fmuladd.f64(double %118, double %159, double %157)
%161 = getelementptr inbounds double, double* %5, i64 2
store double %160, double* %161
%162 = call double @distance(double* %5, double* %133)
%163 = fsub double %162, %118
%164 = call double @llvm.fabs.f64(double %163)
%165 = fcmp ogt double %164, 1.000000e-02
br i1 %165, label %177, label %166
166: ; preds = %125
%167 = bitcast [3 x double]* %15 to <2 x double>*
%168 = load <2 x double>, <2 x double>* %167
%169 = fneg <2 x double> %168
%170 = bitcast double* %6 to <2 x double>*
store <2 x double> %169, <2 x double>* %170
%171 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%172 = load double, double* %171
%173 = fneg double %172
%174 = getelementptr inbounds double, double* %6, i64 2
store double %173, double* %174
store double %118, double* %7
%175 = getelementptr inbounds double, double* %7, i64 1
store double %117, double* %175
store double %117, double* %9
%176 = getelementptr inbounds double, double* %9, i64 1
store double %117, double* %176
br label %179
177: ; preds = %125
%178 = call i32 @set_error1(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %179
179: ; preds = %115, %110, %99, %96, %63, %37, %33, %26, %10, %166, %177, %94
%180 = phi i32 [ 0, %94 ], [ 0, %177 ], [ 1, %166 ], [ 0, %10 ], [ 0, %26 ], [ 0, %33 ], [ 0, %37 ], [ 0, %63 ], [ 0, %96 ], [ 0, %99 ], [ 0, %110 ], [ 0, %115 ]
ret i32 %180
}