#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int acos(double);
double cos(double);
double fabs(double);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, double *, double *);
scalar_t__ pow(double, int);
int /*<<< orphan*/ printf(char *);
double sin(double);
double sqrtf(scalar_t__);
void loop(double angle_start, double angle_end, double angle_step, int Nmax,
          double tolerance, double angle_tolerance) {
  FILE *outputFile, *inputFile;
  double xA_1, yA_1, xA_2, yA_2;
  double xB_1, yB_1, xB_2, yB_2;
  inputFile = fopen("lattices.tmp", "r");
  if (inputFile == NULL) {
    printf("Couldn't find file lattices.tmp!\n");
    return;
  }
  fscanf(inputFile, "%lf %lf", &xA_1, &xA_2);
  fscanf(inputFile, "%lf %lf", &yA_1, &yA_2);
  fscanf(inputFile, "%lf %lf", &xB_1, &xB_2);
  fscanf(inputFile, "%lf %lf", &yB_1, &yB_2);
  fclose(inputFile);
  outputFile = fopen("coincidences.tmp", "w");
  int m1, m2, n1, n2;
  double angle, angleRad, angle_Am_MBn, cosAngle;
  double xAm, yAm, xMBn, yMBn;
  double norm, normA, normB;
  for (angle = angle_start; angle < angle_end + angle_step;
       angle = angle + angle_step) {
    angleRad = angle * 3.14159265358979 / 180;
    fprintf(outputFile, "%.2f\n", angle);
    for (m1 = -Nmax; m1 <= Nmax; m1++) {
      for (m2 = -Nmax; m2 <= Nmax; m2++) {
        for (n1 = -Nmax; n1 <= Nmax; n1++) {
          for (n2 = -Nmax; n2 < Nmax; n2++) {
            xAm = m1 * xA_1 + m2 * xA_2;
            xMBn = n1 * (xB_1 * cos(angleRad) + yB_1 * sin(angleRad)) +
                   n2 * (xB_2 * cos(angleRad) + yB_2 * sin(angleRad));
            yAm = m1 * yA_1 + m2 * yA_2;
            yMBn = n1 * (-xB_1 * sin(angleRad) + yB_1 * cos(angleRad)) +
                   n2 * (-xB_2 * sin(angleRad) + yB_2 * cos(angleRad));
            normA = sqrtf(pow(xAm, 2) + pow(yAm, 2));
            normB = sqrtf(pow(xMBn, 2) + pow(yMBn, 2));
            if (normA >= normB)
              norm = normB;
            else
              norm = normA;
            cosAngle = (xAm * xMBn + yAm * yMBn) / (normA * normB);
            if (cosAngle > 1.0)
              cosAngle = 1.0;
            angle_Am_MBn = 180 * acos(cosAngle) / 3.14159265358979;
            if (sqrtf(pow(xAm - xMBn, 2) + pow(yAm - yMBn, 2)) / norm <
                    tolerance &&
                fabs(angle_Am_MBn) < angle_tolerance)
              fprintf(outputFile, "%d %d %d %d\n", m1, m2, n1, n2);
          }
        }
      }
    }
    fprintf(outputFile, "\n");
  }
  fclose(outputFile);
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
lea    0xe62(%rip),%rdi
lea    0xe68(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    11fa <loop+0x5a>
lea    0xe4f(%rip),%rdi
call   1040 <printf@plt>
jmp    18a2 <loop+0x702>
mov    -0x40(%rbp),%rdi
lea    0xe5c(%rip),%rsi
lea    -0x48(%rbp),%rdx
lea    -0x58(%rbp),%rcx
call   1060 <fscanf@plt>
mov    -0x40(%rbp),%rdi
lea    0xe44(%rip),%rsi
lea    -0x50(%rbp),%rdx
lea    -0x60(%rbp),%rcx
call   1060 <fscanf@plt>
mov    -0x40(%rbp),%rdi
lea    0xe2c(%rip),%rsi
lea    -0x68(%rbp),%rdx
lea    -0x78(%rbp),%rcx
call   1060 <fscanf@plt>
mov    -0x40(%rbp),%rdi
lea    0xe14(%rip),%rsi
lea    -0x70(%rbp),%rdx
lea    -0x80(%rbp),%rcx
call   1060 <fscanf@plt>
mov    -0x40(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xdff(%rip),%rdi
lea    0xe09(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1899 <loop+0x6f9>
movsd  0xd5d(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  0xd45(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x38(%rbp),%rdi
movsd  -0x98(%rbp),%xmm0
ff
lea    0xda2(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
xor    %eax,%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     186d <loop+0x6cd>
xor    %eax,%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x88(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1854 <loop+0x6b4>
xor    %eax,%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     183b <loop+0x69b>
xor    %eax,%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1822 <loop+0x682>
cvtsi2sdl -0x84(%rbp),%xmm0
ff
movsd  -0x48(%rbp),%xmm2
cvtsi2sdl -0x88(%rbp),%xmm1
ff
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
cvtsi2sdl -0x8c(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   10a0 <cos@plt>
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x188(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1080 <sin@plt>
movsd  -0x188(%rbp),%xmm1
ff
movsd  -0x180(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x178(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
cvtsi2sdl -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   10a0 <cos@plt>
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1080 <sin@plt>
movsd  -0x170(%rbp),%xmm4
ff
movsd  -0x168(%rbp),%xmm3
ff
movsd  -0x160(%rbp),%xmm5
ff
movsd  -0x158(%rbp),%xmm1
ff
movsd  -0x150(%rbp),%xmm2
ff
movaps %xmm0,%xmm6
movsd  -0x148(%rbp),%xmm0
ff
mulsd  %xmm6,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
cvtsi2sdl -0x84(%rbp),%xmm0
ff
movsd  -0x50(%rbp),%xmm2
cvtsi2sdl -0x88(%rbp),%xmm1
ff
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
cvtsi2sdl -0x8c(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1080 <sin@plt>
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   10a0 <cos@plt>
movsd  -0x140(%rbp),%xmm1
ff
movsd  -0x138(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x130(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
cvtsi2sdl -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1080 <sin@plt>
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   10a0 <cos@plt>
movsd  -0x128(%rbp),%xmm4
ff
movsd  -0x120(%rbp),%xmm3
ff
movsd  -0x118(%rbp),%xmm5
ff
movsd  -0x110(%rbp),%xmm1
ff
movsd  -0x108(%rbp),%xmm2
ff
movaps %xmm0,%xmm6
movsd  -0x100(%rbp),%xmm0
ff
mulsd  %xmm6,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10c0 <pow@plt>
mov    %rax,-0xf8(%rbp)
movsd  -0xc0(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10c0 <pow@plt>
mov    -0xf8(%rbp),%rdi
add    %rax,%rdi
call   1090 <sqrtf@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10c0 <pow@plt>
mov    %rax,-0xf0(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10c0 <pow@plt>
mov    -0xf0(%rbp),%rdi
add    %rax,%rdi
call   1090 <sqrtf@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
ucomisd -0xe8(%rbp),%xmm0
ff
jb     16ae <loop+0x50e>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    16be <loop+0x51e>
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0xc0(%rbp),%xmm1
ff
mulsd  -0xd0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0xe0(%rbp),%xmm1
ff
mulsd  -0xe8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0x8fe(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    172c <loop+0x58c>
movsd  0x8ec(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
call   1050 <acos@plt>
imul   $0xb4,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  0x8bd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
subsd  -0xc8(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10c0 <pow@plt>
mov    %rax,-0x190(%rbp)
movsd  -0xc0(%rbp),%xmm0
ff
subsd  -0xd0(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10c0 <pow@plt>
mov    -0x190(%rbp),%rdi
add    %rax,%rdi
call   1090 <sqrtf@plt>
movaps %xmm0,%xmm1
divsd  -0xd8(%rbp),%xmm1
ff
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1809 <loop+0x669>
movsd  -0xa8(%rbp),%xmm1
ff
movaps 0x856(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1809 <loop+0x669>
mov    -0x38(%rbp),%rdi
mov    -0x84(%rbp),%edx
mov    -0x88(%rbp),%ecx
mov    -0x8c(%rbp),%r8d
mov    -0x90(%rbp),%r9d
lea    0x880(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    180e <loop+0x66e>
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    133a <loop+0x19a>
jmp    1827 <loop+0x687>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1320 <loop+0x180>
jmp    1840 <loop+0x6a0>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1306 <loop+0x166>
jmp    1859 <loop+0x6b9>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    12ec <loop+0x14c>
mov    -0x38(%rbp),%rdi
lea    0x7e7(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    1287 <loop+0xe7>
mov    -0x38(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
movsd  %xmm4,0xe0(%rsp)
movsd  %xmm3,0xe8(%rsp)
mov    %edi,%ebx
movsd  %xmm2,0xa8(%rsp)
movsd  %xmm1,0x98(%rsp)
movsd  %xmm0,0x48(%rsp)
lea    0xe3c(%rip),%rdi
lea    0xe42(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     17f1 <loop+0x641>
mov    %rax,%rbp
lea    0xe2c(%rip),%r14
lea    0x108(%rsp),%rdx
lea    0xf8(%rsp),%rcx
mov    %rax,%rdi
mov    %r14,%rsi
call   1060 <fscanf@plt>
lea    0x100(%rsp),%rdx
lea    0xf0(%rsp),%rcx
mov    %rbp,%rdi
mov    %r14,%rsi
call   1060 <fscanf@plt>
lea    0xd8(%rsp),%rdx
lea    0xc8(%rsp),%rcx
mov    %rbp,%rdi
mov    %r14,%rsi
call   1060 <fscanf@plt>
lea    0xd0(%rsp),%rdx
lea    0xc0(%rsp),%rcx
mov    %rbp,%rdi
mov    %r14,%rsi
call   1060 <fscanf@plt>
mov    %rbp,%rdi
call   1040 <fclose@plt>
lea    0xdb9(%rip),%rdi
lea    0xdc3(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,%rbp
movsd  0xa8(%rsp),%xmm2
movsd  0x98(%rsp),%xmm1
addsd  %xmm2,%xmm1
movsd  0x48(%rsp),%xmm0
ucomisd %xmm0,%xmm1
jbe    17d7 <loop+0x627>
mov    %ebx,%eax
neg    %eax
mov    %ebx,%ecx
mov    %eax,0xc(%rsp)
cmovns %eax,%ecx
mov    %ecx,0x1c(%rsp)
movsd  %xmm1,0x98(%rsp)
mov    %rbp,0xb0(%rsp)
jmp    132b <loop+0x17b>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
mov    0xb0(%rsp),%rbp
mov    %rbp,%rsi
call   1070 <fputc@plt>
movsd  0xa8(%rsp),%xmm2
movsd  0x48(%rsp),%xmm0
addsd  %xmm2,%xmm0
movsd  0x98(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    17d7 <loop+0x627>
movsd  %xmm0,0x48(%rsp)
mov    %rbp,%rdi
lea    0xd1f(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
movsd  0x48(%rsp),%xmm0
mulsd  0xcb0(%rip),%xmm0
divsd  0xcb0(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
test   %ebx,%ebx
js     12f0 <loop+0x140>
mov    0xc(%rsp),%eax
jmp    1385 <loop+0x1d5>
nopl   0x0(%rax,%rax,1)
mov    0xb8(%rsp),%rcx
lea    0x1(%rcx),%eax
cmp    0x1c(%rsp),%ecx
je     12f0 <loop+0x140>
mov    %rax,0xb8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm0,0x120(%rsp)
mov    0xc(%rsp),%eax
mov    %eax,%r13d
jmp    13be <loop+0x20e>
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%r13),%eax
cmp    0x1c(%rsp),%r13d
mov    %eax,%r13d
je     1370 <loop+0x1c0>
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
movapd %xmm0,0x130(%rsp)
mov    0xc(%rsp),%eax
mov    %eax,%r15d
jmp    13ee <loop+0x23e>
nopl   0x0(%rax,%rax,1)
lea    0x1(%r15),%eax
cmp    0x1c(%rsp),%r15d
mov    %eax,%r15d
je     13b0 <loop+0x200>
test   %ebx,%ebx
jle    13e0 <loop+0x230>
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
movapd 0x120(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
movapd %xmm1,0x110(%rsp)
mov    0xc(%rsp),%r12d
jmp    1429 <loop+0x279>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12d
cmp    %ebx,%r12d
jge    13e0 <loop+0x230>
movsd  0xd8(%rsp),%xmm0
movsd  %xmm0,0x60(%rsp)
movsd  0xf8(%rsp),%xmm0
movaps %xmm0,0x20(%rsp)
movsd  0x108(%rsp),%xmm0
movaps %xmm0,0x70(%rsp)
movsd  0x10(%rsp),%xmm0
call   10b0 <cos@plt>
movaps %xmm0,0x50(%rsp)
movsd  0xd0(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
call   1090 <sin@plt>
mulsd  0x30(%rsp),%xmm0
movapd 0x50(%rsp),%xmm1
mulsd  0x60(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd 0x70(%rsp),%xmm0
unpcklpd %xmm1,%xmm0
movapd %xmm0,0x70(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
movapd %xmm0,0x60(%rsp)
movsd  0xc8(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  0x10(%rsp),%xmm0
call   10b0 <cos@plt>
movaps %xmm0,0x30(%rsp)
movsd  0xc0(%rsp),%xmm0
movsd  %xmm0,0x80(%rsp)
movsd  0x10(%rsp),%xmm0
call   1090 <sin@plt>
mulsd  0x80(%rsp),%xmm0
movapd 0x30(%rsp),%xmm1
mulsd  0x50(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movapd 0x20(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
movapd 0x130(%rsp),%xmm0
unpcklpd 0x60(%rsp),%xmm0
movapd %xmm0,0x60(%rsp)
mulpd  %xmm0,%xmm1
movapd 0x70(%rsp),%xmm0
mulpd  0x110(%rsp),%xmm0
addpd  %xmm1,%xmm0
movapd %xmm0,0x70(%rsp)
movsd  0xd8(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0xf0(%rsp),%xmm0
movaps %xmm0,0x50(%rsp)
movsd  0x100(%rsp),%xmm0
movaps %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
call   1090 <sin@plt>
movsd  %xmm0,0x80(%rsp)
movsd  0xd0(%rsp),%xmm0
movsd  %xmm0,0xa0(%rsp)
movsd  0x10(%rsp),%xmm0
call   10b0 <cos@plt>
mulsd  0xa0(%rsp),%xmm0
movsd  0x80(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
subsd  %xmm1,%xmm0
movapd 0x20(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0xc8(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
call   1090 <sin@plt>
movsd  %xmm0,0x80(%rsp)
movsd  0xc0(%rsp),%xmm0
movsd  %xmm0,0xa0(%rsp)
movsd  0x10(%rsp),%xmm0
call   10b0 <cos@plt>
mulsd  0xa0(%rsp),%xmm0
movsd  0x80(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
subsd  %xmm1,%xmm0
movapd 0x50(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0x60(%rsp),%xmm1
movapd 0x20(%rsp),%xmm0
mulpd  0x110(%rsp),%xmm0
addpd  %xmm1,%xmm0
movapd %xmm0,0x20(%rsp)
movaps 0x70(%rsp),%xmm0
mov    $0x2,%edi
call   10d0 <pow@plt>
mov    %rax,%rbp
movaps 0x20(%rsp),%xmm0
mov    $0x2,%edi
call   10d0 <pow@plt>
add    %rax,%rbp
mov    %rbp,%rdi
call   10a0 <sqrtf@plt>
movaps %xmm0,0x80(%rsp)
movaps 0x70(%rsp),%xmm0
movhlps %xmm0,%xmm0
movaps %xmm0,0x60(%rsp)
mov    $0x2,%edi
call   10d0 <pow@plt>
mov    %rax,%rbp
movapd 0x20(%rsp),%xmm0
unpckhpd %xmm0,%xmm0
movapd %xmm0,0x50(%rsp)
mov    $0x2,%edi
call   10d0 <pow@plt>
add    %rax,%rbp
mov    %rbp,%rdi
call   10a0 <sqrtf@plt>
movapd %xmm0,%xmm2
movapd 0x80(%rsp),%xmm3
cmplesd %xmm3,%xmm2
movapd %xmm2,%xmm1
andpd  %xmm0,%xmm1
andnpd %xmm3,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,0x30(%rsp)
movapd 0x20(%rsp),%xmm1
mulsd  0x50(%rsp),%xmm1
movapd 0x70(%rsp),%xmm2
mulsd  0x60(%rsp),%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm3
divsd  %xmm3,%xmm2
movsd  0x8f5(%rip),%xmm0
minsd  %xmm2,%xmm0
call   1050 <acos@plt>
mov    %eax,%r14d
movapd 0x70(%rsp),%xmm0
subsd  0x60(%rsp),%xmm0
mov    $0x2,%edi
call   10d0 <pow@plt>
mov    %rax,%rbp
movapd 0x20(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
mov    $0x2,%edi
call   10d0 <pow@plt>
add    %rax,%rbp
mov    %rbp,%rdi
call   10a0 <sqrtf@plt>
divsd  0x30(%rsp),%xmm0
movsd  0xe8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    1420 <loop+0x270>
imul   $0xb4,%r14d,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0x870(%rip),%xmm0
andpd  0x888(%rip),%xmm0
movsd  0xe0(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    1420 <loop+0x270>
mov    0xb0(%rsp),%rdi
lea    0x8a6(%rip),%rsi
mov    0xb8(%rsp),%rdx
mov    %r13d,%ecx
mov    %r15d,%r8d
mov    %r12d,%r9d
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1420 <loop+0x270>
mov    %rbp,%rdi
call   1040 <fclose@plt>
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x875(%rip),%rdi
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"lattices.tmp\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [34 x i8] c"Couldn't find file lattices.tmp!\0A\00"
@.str.3 = [8 x i8] c"%lf %lf\00"
@.str.4 = [17 x i8] c"coincidences.tmp\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [6 x i8] c"%.2f\0A\00"
@.str.7 = [13 x i8] c"%d %d %d %d\0A\00"
@.str.8 = [2 x i8] c"\0A\00"
define void @loop(double %0, double %1, double %2, i32 %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store i32 %3, i32* %10
store double %4, double* %11
store double %5, double* %12
%38 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %38, i32** %14
%39 = load i32*, i32** %14
%40 = icmp eq i32* %39, null
br i1 %40, label %41, label %43
41: ; preds = %6
%42 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
br label %250
43: ; preds = %6
%44 = load i32*, i32** %14
%45 = call i32 @fscanf(i32* %44, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double* %15, double* %17)
%46 = load i32*, i32** %14
%47 = call i32 @fscanf(i32* %46, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double* %16, double* %18)
%48 = load i32*, i32** %14
%49 = call i32 @fscanf(i32* %48, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double* %19, double* %21)
%50 = load i32*, i32** %14
%51 = call i32 @fscanf(i32* %50, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double* %20, double* %22)
%52 = load i32*, i32** %14
%53 = call i32 @fclose(i32* %52)
%54 = call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %54, i32** %13
%55 = load double, double* %7
store double %55, double* %27
br label %56
56: ; preds = %243, %43
%57 = load double, double* %27
%58 = load double, double* %8
%59 = load double, double* %9
%60 = fadd double %58, %59
%61 = fcmp olt double %57, %60
br i1 %61, label %62, label %247
62: ; preds = %56
%63 = load double, double* %27
%64 = fmul double %63, 0x400921FB54442D11
%65 = fdiv double %64, 1.800000e+02
store double %65, double* %28
%66 = load i32*, i32** %13
%67 = load double, double* %27
%68 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), double %67)
%69 = load i32, i32* %10
%70 = sub nsw i32 0, %69
store i32 %70, i32* %23
br label %71
71: ; preds = %237, %62
%72 = load i32, i32* %23
%73 = load i32, i32* %10
%74 = icmp sle i32 %72, %73
br i1 %74, label %75, label %240
75: ; preds = %71
%76 = load i32, i32* %10
%77 = sub nsw i32 0, %76
store i32 %77, i32* %24
br label %78
78: ; preds = %233, %75
%79 = load i32, i32* %24
%80 = load i32, i32* %10
%81 = icmp sle i32 %79, %80
br i1 %81, label %82, label %236
82: ; preds = %78
%83 = load i32, i32* %10
%84 = sub nsw i32 0, %83
store i32 %84, i32* %25
br label %85
85: ; preds = %229, %82
%86 = load i32, i32* %25
%87 = load i32, i32* %10
%88 = icmp sle i32 %86, %87
br i1 %88, label %89, label %232
89: ; preds = %85
%90 = load i32, i32* %10
%91 = sub nsw i32 0, %90
store i32 %91, i32* %26
br label %92
92: ; preds = %225, %89
%93 = load i32, i32* %26
%94 = load i32, i32* %10
%95 = icmp slt i32 %93, %94
br i1 %95, label %96, label %228
96: ; preds = %92
%97 = load i32, i32* %23
%98 = sitofp i32 %97 to double
%99 = load double, double* %15
%100 = load i32, i32* %24
%101 = sitofp i32 %100 to double
%102 = load double, double* %17
%103 = fmul double %101, %102
%104 = call double @llvm.fmuladd.f64(double %98, double %99, double %103)
store double %104, double* %31
%105 = load i32, i32* %25
%106 = sitofp i32 %105 to double
%107 = load double, double* %19
%108 = load double, double* %28
%109 = call double @cos(double %108)
%110 = load double, double* %20
%111 = load double, double* %28
%112 = call double @sin(double %111)
%113 = fmul double %110, %112
%114 = call double @llvm.fmuladd.f64(double %107, double %109, double %113)
%115 = load i32, i32* %26
%116 = sitofp i32 %115 to double
%117 = load double, double* %21
%118 = load double, double* %28
%119 = call double @cos(double %118)
%120 = load double, double* %22
%121 = load double, double* %28
%122 = call double @sin(double %121)
%123 = fmul double %120, %122
%124 = call double @llvm.fmuladd.f64(double %117, double %119, double %123)
%125 = fmul double %116, %124
%126 = call double @llvm.fmuladd.f64(double %106, double %114, double %125)
store double %126, double* %33
%127 = load i32, i32* %23
%128 = sitofp i32 %127 to double
%129 = load double, double* %16
%130 = load i32, i32* %24
%131 = sitofp i32 %130 to double
%132 = load double, double* %18
%133 = fmul double %131, %132
%134 = call double @llvm.fmuladd.f64(double %128, double %129, double %133)
store double %134, double* %32
%135 = load i32, i32* %25
%136 = sitofp i32 %135 to double
%137 = load double, double* %19
%138 = fneg double %137
%139 = load double, double* %28
%140 = call double @sin(double %139)
%141 = load double, double* %20
%142 = load double, double* %28
%143 = call double @cos(double %142)
%144 = fmul double %141, %143
%145 = call double @llvm.fmuladd.f64(double %138, double %140, double %144)
%146 = load i32, i32* %26
%147 = sitofp i32 %146 to double
%148 = load double, double* %21
%149 = fneg double %148
%150 = load double, double* %28
%151 = call double @sin(double %150)
%152 = load double, double* %22
%153 = load double, double* %28
%154 = call double @cos(double %153)
%155 = fmul double %152, %154
%156 = call double @llvm.fmuladd.f64(double %149, double %151, double %155)
%157 = fmul double %147, %156
%158 = call double @llvm.fmuladd.f64(double %136, double %145, double %157)
store double %158, double* %34
%159 = load double, double* %31
%160 = call i64 @pow(double %159, i32 2)
%161 = load double, double* %32
%162 = call i64 @pow(double %161, i32 2)
%163 = add nsw i64 %160, %162
%164 = call double @sqrtf(i64 %163)
store double %164, double* %36
%165 = load double, double* %33
%166 = call i64 @pow(double %165, i32 2)
%167 = load double, double* %34
%168 = call i64 @pow(double %167, i32 2)
%169 = add nsw i64 %166, %168
%170 = call double @sqrtf(i64 %169)
store double %170, double* %37
%171 = load double, double* %36
%172 = load double, double* %37
%173 = fcmp oge double %171, %172
br i1 %173, label %174, label %176
174: ; preds = %96
%175 = load double, double* %37
store double %175, double* %35
br label %178
176: ; preds = %96
%177 = load double, double* %36
store double %177, double* %35
br label %178
178: ; preds = %176, %174
%179 = load double, double* %31
%180 = load double, double* %33
%181 = load double, double* %32
%182 = load double, double* %34
%183 = fmul double %181, %182
%184 = call double @llvm.fmuladd.f64(double %179, double %180, double %183)
%185 = load double, double* %36
%186 = load double, double* %37
%187 = fmul double %185, %186
%188 = fdiv double %184, %187
store double %188, double* %30
%189 = load double, double* %30
%190 = fcmp ogt double %189, 1.000000e+00
br i1 %190, label %191, label %192
191: ; preds = %178
store double 1.000000e+00, double* %30
br label %192
192: ; preds = %191, %178
%193 = load double, double* %30
%194 = call i32 @acos(double %193)
%195 = mul nsw i32 180, %194
%196 = sitofp i32 %195 to double
%197 = fdiv double %196, 0x400921FB54442D11
store double %197, double* %29
%198 = load double, double* %31
%199 = load double, double* %33
%200 = fsub double %198, %199
%201 = call i64 @pow(double %200, i32 2)
%202 = load double, double* %32
%203 = load double, double* %34
%204 = fsub double %202, %203
%205 = call i64 @pow(double %204, i32 2)
%206 = add nsw i64 %201, %205
%207 = call double @sqrtf(i64 %206)
%208 = load double, double* %35
%209 = fdiv double %207, %208
%210 = load double, double* %11
%211 = fcmp olt double %209, %210
br i1 %211, label %212, label %224
212: ; preds = %192
%213 = load double, double* %29
%214 = call double @llvm.fabs.f64(double %213)
%215 = load double, double* %12
%216 = fcmp olt double %214, %215
br i1 %216, label %217, label %224
217: ; preds = %212
%218 = load i32*, i32** %13
%219 = load i32, i32* %23
%220 = load i32, i32* %24
%221 = load i32, i32* %25
%222 = load i32, i32* %26
%223 = call i32 (i32*, i8*, ...) @fprintf(i32* %218, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %219, i32 %220, i32 %221, i32 %222)
br label %224
224: ; preds = %217, %212, %192
br label %225
225: ; preds = %224
%226 = load i32, i32* %26
%227 = add nsw i32 %226, 1
store i32 %227, i32* %26
br label %92
228: ; preds = %92
br label %229
229: ; preds = %228
%230 = load i32, i32* %25
%231 = add nsw i32 %230, 1
store i32 %231, i32* %25
br label %85
232: ; preds = %85
br label %233
233: ; preds = %232
%234 = load i32, i32* %24
%235 = add nsw i32 %234, 1
store i32 %235, i32* %24
br label %78
236: ; preds = %78
br label %237
237: ; preds = %236
%238 = load i32, i32* %23
%239 = add nsw i32 %238, 1
store i32 %239, i32* %23
br label %71
240: ; preds = %71
%241 = load i32*, i32** %13
%242 = call i32 (i32*, i8*, ...) @fprintf(i32* %241, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %243
243: ; preds = %240
%244 = load double, double* %27
%245 = load double, double* %9
%246 = fadd double %244, %245
store double %246, double* %27
br label %56
247: ; preds = %56
%248 = load i32*, i32** %13
%249 = call i32 @fclose(i32* %248)
br label %250
250: ; preds = %247, %41
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"lattices.tmp\00"
@.str.1 = [2 x i8] c"r\00"
@.str.3 = [8 x i8] c"%lf %lf\00"
@.str.4 = [17 x i8] c"coincidences.tmp\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [6 x i8] c"%.2f\0A\00"
@.str.7 = [13 x i8] c"%d %d %d %d\0A\00"
@str = [33 x i8] c"Couldn't find file lattices.tmp!\00"
define void @loop(double %0, double %1, double %2, i32 %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = bitcast double* %7 to i8*
%16 = bitcast double* %8 to i8*
%17 = bitcast double* %9 to i8*
%18 = bitcast double* %10 to i8*
%19 = bitcast double* %11 to i8*
%20 = bitcast double* %12 to i8*
%21 = bitcast double* %13 to i8*
%22 = bitcast double* %14 to i8*
%23 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %27
25: ; preds = %6
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
br label %164
27: ; preds = %6
%28 = call i32 @fscanf(i32* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double* %7, double* %9)
%29 = call i32 @fscanf(i32* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double* %8, double* %10)
%30 = call i32 @fscanf(i32* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double* %11, double* %13)
%31 = call i32 @fscanf(i32* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double* %12, double* %14)
%32 = call i32 @fclose(i32* %23)
%33 = call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%34 = fadd double %1, %2
%35 = fcmp ogt double %34, %0
br i1 %35, label %36, label %162
36: ; preds = %27
%37 = sub i32 0, %3
%38 = icmp slt i32 %3, 0
%39 = icmp sgt i32 %3, 0
%40 = call i32 @llvm.abs.i32(i32 %3, i1 false)
br label %41
41: ; preds = %36, %158
%42 = phi double [ %0, %36 ], [ %160, %158 ]
%43 = fmul double %42, 0x400921FB54442D11
%44 = fdiv double %43, 1.800000e+02
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), double %42)
br i1 %38, label %158, label %46
46: ; preds = %41, %155
%47 = phi i32 [ %156, %155 ], [ %37, %41 ]
%48 = sitofp i32 %47 to double
%49 = insertelement <2 x double> poison, double %48, i64 0
%50 = insertelement <2 x double> poison, double %48, i64 0
br label %51
51: ; preds = %152, %46
%52 = phi i32 [ %37, %46 ], [ %153, %152 ]
%53 = sitofp i32 %52 to double
%54 = insertelement <2 x double> poison, double %53, i64 0
%55 = insertelement <2 x double> poison, double %53, i64 0
br label %56
56: ; preds = %51, %149
%57 = phi i32 [ %37, %51 ], [ %150, %149 ]
br i1 %39, label %58, label %149
58: ; preds = %56
%59 = sitofp i32 %57 to double
%60 = insertelement <2 x double> %49, double %59, i64 1
%61 = insertelement <2 x double> %50, double %59, i64 1
br label %62
62: ; preds = %58, %146
%63 = phi i32 [ %37, %58 ], [ %147, %146 ]
%64 = load double, double* %7
%65 = load double, double* %9
%66 = load double, double* %11
%67 = call double @cos(double %44)
%68 = load double, double* %12
%69 = call double @sin(double %44)
%70 = fmul double %68, %69
%71 = call double @llvm.fmuladd.f64(double %66, double %67, double %70)
%72 = sitofp i32 %63 to double
%73 = load double, double* %13
%74 = call double @cos(double %44)
%75 = load double, double* %14
%76 = call double @sin(double %44)
%77 = fmul double %75, %76
%78 = call double @llvm.fmuladd.f64(double %73, double %74, double %77)
%79 = insertelement <2 x double> poison, double %65, i64 0
%80 = insertelement <2 x double> %79, double %78, i64 1
%81 = insertelement <2 x double> %55, double %72, i64 1
%82 = fmul <2 x double> %80, %81
%83 = insertelement <2 x double> poison, double %64, i64 0
%84 = insertelement <2 x double> %83, double %71, i64 1
%85 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %61, <2 x double> %84, <2 x double> %82)
%86 = load double, double* %8
%87 = load double, double* %10
%88 = load double, double* %11
%89 = fneg double %88
%90 = call double @sin(double %44)
%91 = load double, double* %12
%92 = call double @cos(double %44)
%93 = fmul double %91, %92
%94 = call double @llvm.fmuladd.f64(double %89, double %90, double %93)
%95 = load double, double* %13
%96 = fneg double %95
%97 = call double @sin(double %44)
%98 = load double, double* %14
%99 = call double @cos(double %44)
%100 = fmul double %98, %99
%101 = call double @llvm.fmuladd.f64(double %96, double %97, double %100)
%102 = insertelement <2 x double> poison, double %87, i64 0
%103 = insertelement <2 x double> %102, double %101, i64 1
%104 = insertelement <2 x double> %54, double %72, i64 1
%105 = fmul <2 x double> %103, %104
%106 = insertelement <2 x double> poison, double %86, i64 0
%107 = insertelement <2 x double> %106, double %94, i64 1
%108 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %60, <2 x double> %107, <2 x double> %105)
%109 = extractelement <2 x double> %85, i64 0
%110 = call i64 @pow(double %109, i32 2)
%111 = extractelement <2 x double> %108, i64 0
%112 = call i64 @pow(double %111, i32 2)
%113 = add nsw i64 %112, %110
%114 = call double @sqrtf(i64 %113)
%115 = extractelement <2 x double> %85, i64 1
%116 = call i64 @pow(double %115, i32 2)
%117 = extractelement <2 x double> %108, i64 1
%118 = call i64 @pow(double %117, i32 2)
%119 = add nsw i64 %118, %116
%120 = call double @sqrtf(i64 %119)
%121 = fcmp oge double %114, %120
%122 = select i1 %121, double %120, double %114
%123 = fmul double %111, %117
%124 = call double @llvm.fmuladd.f64(double %109, double %115, double %123)
%125 = fmul double %114, %120
%126 = fdiv double %124, %125
%127 = fcmp ogt double %126, 1.000000e+00
%128 = select i1 %127, double 1.000000e+00, double %126
%129 = call i32 @acos(double %128)
%130 = fsub double %109, %115
%131 = call i64 @pow(double %130, i32 2)
%132 = fsub double %111, %117
%133 = call i64 @pow(double %132, i32 2)
%134 = add nsw i64 %133, %131
%135 = call double @sqrtf(i64 %134)
%136 = fdiv double %135, %122
%137 = fcmp olt double %136, %4
br i1 %137, label %138, label %146
138: ; preds = %62
%139 = mul nsw i32 %129, 180
%140 = sitofp i32 %139 to double
%141 = fdiv double %140, 0x400921FB54442D11
%142 = call double @llvm.fabs.f64(double %141)
%143 = fcmp olt double %142, %5
br i1 %143, label %144, label %146
144: ; preds = %138
%145 = call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %47, i32 %52, i32 %57, i32 %63)
br label %146
146: ; preds = %62, %138, %144
%147 = add nsw i32 %63, 1
%148 = icmp slt i32 %147, %3
br i1 %148, label %62, label %149
149: ; preds = %146, %56
%150 = add i32 %57, 1
%151 = icmp eq i32 %57, %40
br i1 %151, label %152, label %56
152: ; preds = %149
%153 = add i32 %52, 1
%154 = icmp eq i32 %52, %40
br i1 %154, label %155, label %51
155: ; preds = %152
%156 = add i32 %47, 1
%157 = icmp eq i32 %47, %40
br i1 %157, label %158, label %46
158: ; preds = %155, %41
%159 = call i32 @fputc(i32 10, i32* %33)
%160 = fadd double %42, %2
%161 = fcmp olt double %160, %34
br i1 %161, label %41, label %162
162: ; preds = %158, %27
%163 = call i32 @fclose(i32* %33)
br label %164
164: ; preds = %162, %25
ret void
}