#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 */
double HUGE_VAL;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
void pdf_kmean(float *xObjects, float *yObjects, int nObjects, float *xClusters,
               float *yClusters, int nClusters, int *membership) {
  int i, j, k;
  double min_x, max_x, min_y, max_y, scale, cx, cy;
  double *colors = (double *)malloc(sizeof(double) * nClusters * 3);
  FILE *fptr = fopen("results.eps", "w");
  if (fptr == NULL) {
    printf("[display] Cannot create results.pdf file!\n");
    return;
  }
  for (i = 0; i < nClusters; i++) {
    colors[3 * i + 0] = (3 * (i + 1) % 11) / 11.;
    colors[3 * i + 1] = (7 * i % 11) / 11.;
    colors[3 * i + 2] = (9 * i % 11) / 11.;
  }
  max_x = max_y = -(min_x = min_y = HUGE_VAL);
  for (j = 0; j < nObjects; j++) {
    if (max_x < xObjects[j])
      max_x = xObjects[j];
    if (min_x > xObjects[j])
      min_x = xObjects[j];
    if (max_y < yObjects[j])
      max_y = yObjects[j];
    if (min_y > yObjects[j])
      min_y = yObjects[j];
  }
  scale = 400 / (max_x - min_x);
  if (scale > 400 / (max_y - min_y))
    scale = 400 / (max_y - min_y);
  cx = (max_x + min_x) / 2;
  cy = (max_y + min_y) / 2;
  fprintf(fptr, "%%!PS-Adobe-3.0\n%%%%BoundingBox: -5 -5 %d %d\n", 400 + 10,
          400 + 10);
  fprintf(fptr, "/l {rlineto} def /m {rmoveto} def\n"
                "/c { .25 sub exch .25 sub exch .5 0 360 arc fill } def\n"
                "/s { moveto -2 0 m 2 2 l 2 -2 l -2 -2 l closepath "
                "	gsave 1 setgray fill grestore gsave 3 setlinewidth"
                " 1 setgray stroke grestore 0 setgray stroke }def\n");
  for (i = 0; i < nClusters; i++) {
    fprintf(fptr, "%g %g %g setrgbcolor\n", colors[3 * i], colors[3 * i + 1],
            colors[3 * i + 2]);
    for (j = 0; j < nObjects; j++) {
      if (membership[j] != i)
        continue;
      fprintf(fptr, "%.3f %.3f c\n", (xObjects[j] - cx) * scale + 400 / 2,
              (yObjects[j] - cy) * scale + 400 / 2);
    }
    fprintf(fptr, "\n0 setgray %g %g s\n",
            (xClusters[i] - cx) * scale + 400 / 2,
            (yClusters[i] - cy) * scale + 400 / 2);
  }
  fprintf(fptr, "\n%%%%EOF");
  fclose(fptr);
  free(colors);
}


x86 assembly (clang, -O0):
<pdf_kmean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
imul   $0x3,%rax,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x78(%rbp)
lea    0xe7c(%rip),%rdi
lea    0xe81(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x80(%rbp)
cmpq   $0x0,-0x80(%rbp)
jne    11d0 <pdf_kmean+0x70>
lea    0xe68(%rip),%rdi
call   1050 <printf@plt>
jmp    160a <pdf_kmean+0x4aa>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1283 <pdf_kmean+0x123>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
imul   $0x3,%eax,%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xe18(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x78(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
imul   $0x7,-0x30(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xde9(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x78(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
imul   $0x9,-0x30(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xdba(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x78(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11d7 <pdf_kmean+0x77>
mov    0x2d5e(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  %xmm0,-0x40(%rbp)
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13b7 <pdf_kmean+0x257>
movsd  -0x48(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1302 <pdf_kmean+0x1a2>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1338 <pdf_kmean+0x1d8>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x58(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    136e <pdf_kmean+0x20e>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13a4 <pdf_kmean+0x244>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    13a9 <pdf_kmean+0x249>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12c0 <pdf_kmean+0x160>
movsd  -0x48(%rbp),%xmm1
subsd  -0x40(%rbp),%xmm1
movsd  0xc37(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
subsd  -0x50(%rbp),%xmm2
movsd  0xc17(%rip),%xmm1
divsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    1412 <pdf_kmean+0x2b2>
movsd  -0x58(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
movsd  0xbf7(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  0xbe4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  0xbc9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x80(%rbp),%rdi
lea    0xc06(%rip),%rsi
mov    $0x19a,%ecx
mov    %ecx,%edx
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x80(%rbp),%rdi
lea    0xc1b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    15e6 <pdf_kmean+0x486>
mov    -0x80(%rbp),%rdi
mov    -0x78(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x78(%rbp),%rax
imul   $0x3,-0x30(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
lea    0xcb0(%rip),%rsi
mov    $0x3,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1570 <pdf_kmean+0x410>
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x30(%rbp),%eax
je     14fa <pdf_kmean+0x39a>
jmp    1562 <pdf_kmean+0x402>
mov    -0x80(%rbp),%rdi
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xaeb(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  -0x70(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xac0(%rip),%xmm2
addsd  %xmm2,%xmm1
lea    0xc32(%rip),%rsi
mov    $0x2,%al
call   1060 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    14d5 <pdf_kmean+0x375>
mov    -0x80(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xa75(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  -0x70(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xa4a(%rip),%xmm2
addsd  %xmm2,%xmm1
lea    0xbc9(%rip),%rsi
mov    $0x2,%al
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    147a <pdf_kmean+0x31a>
mov    -0x80(%rbp),%rdi
lea    0xbbd(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x80(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdf_kmean>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9d,%r13d
mov    %r8,0x58(%rsp)
mov    %rcx,0x50(%rsp)
mov    %edx,%r12d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    0xb0(%rsp),%r15
lea    0x0(,%r13,8),%eax
lea    (%rax,%rax,2),%edi
call   1070 <malloc@plt>
mov    %rax,(%rsp)
lea    0xf21(%rip),%rdi
lea    0xf26(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     11ee <pdf_kmean+0x7e>
mov    %rax,%r14
mov    %rbp,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r13d,%r8d
test   %r13d,%r13d
jle    1480 <pdf_kmean+0x310>
cmp    $0x1,%r13d
jne    1208 <pdf_kmean+0x98>
xor    %eax,%eax
jmp    139d <pdf_kmean+0x22d>
lea    0x104f(%rip),%rdi
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>
mov    %r8d,%eax
and    $0xfffffffe,%eax
movdqa 0xdea(%rip),%xmm7
movdqa 0xdf1(%rip),%xmm14
movdqa 0xdf8(%rip),%xmm8
movdqa 0xdff(%rip),%xmm12
movdqa 0xe06(%rip),%xmm13
movapd 0xe0d(%rip),%xmm11
movdqa 0xe14(%rip),%xmm9
movdqa 0xe1b(%rip),%xmm10
mov    %rax,%rcx
mov    (%rsp),%rdx
nopl   0x0(%rax)
movdqa %xmm14,%xmm0
paddd  %xmm14,%xmm0
paddd  %xmm14,%xmm0
pshufd $0xe8,%xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqa %xmm2,%xmm0
pmuludq %xmm12,%xmm0
pshufd $0xed,%xmm0,%xmm6
pshufd $0xf5,%xmm2,%xmm0
pmuludq %xmm12,%xmm0
pshufd $0xed,%xmm0,%xmm5
movdqa %xmm7,%xmm0
punpckldq %xmm5,%xmm6
pslld  $0x3,%xmm0
movdqa %xmm0,%xmm3
psubd  %xmm7,%xmm3
movdqa %xmm3,%xmm5
pmuludq %xmm12,%xmm5
psrld  $0x3,%xmm6
pshufd $0xed,%xmm5,%xmm5
pshufd $0xf5,%xmm3,%xmm4
pmuludq %xmm12,%xmm4
pshufd $0xf5,%xmm6,%xmm1
pshufd $0xed,%xmm4,%xmm4
punpckldq %xmm4,%xmm5
psrld  $0x3,%xmm5
pmuludq %xmm13,%xmm6
pshufd $0xf5,%xmm5,%xmm4
pmuludq %xmm13,%xmm5
pmuludq %xmm13,%xmm4
pmuludq %xmm13,%xmm1
punpckldq %xmm4,%xmm5
paddd  %xmm7,%xmm0
movdqa %xmm0,%xmm4
pmuludq %xmm12,%xmm4
psubd  %xmm5,%xmm3
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm0,%xmm5
pmuludq %xmm12,%xmm5
punpckldq %xmm1,%xmm6
pshufd $0xed,%xmm5,%xmm1
punpckldq %xmm1,%xmm4
cvtdq2pd %xmm3,%xmm1
psrld  $0x3,%xmm4
pshufd $0xf5,%xmm4,%xmm3
pmuludq %xmm13,%xmm4
psubd  %xmm6,%xmm2
pmuludq %xmm13,%xmm3
punpckldq %xmm3,%xmm4
cvtdq2pd %xmm2,%xmm2
psubd  %xmm4,%xmm0
cvtdq2pd %xmm0,%xmm0
divpd  %xmm11,%xmm2
divpd  %xmm11,%xmm1
divpd  %xmm11,%xmm0
movapd %xmm2,%xmm3
unpcklpd %xmm1,%xmm3
movsd  %xmm0,%xmm2
movhlps %xmm1,%xmm0
movups %xmm0,0x20(%rdx)
movupd %xmm2,0x10(%rdx)
movupd %xmm3,(%rdx)
paddq  %xmm9,%xmm14
paddd  %xmm10,%xmm7
add    $0x30,%rdx
add    $0xfffffffffffffffe,%rcx
jne    1260 <pdf_kmean+0xf0>
cmp    %r8,%rax
je     1480 <pdf_kmean+0x310>
lea    (%rax,%rax,2),%rcx
mov    (%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
add    $0x8,%rcx
lea    0x3(%rax,%rax,2),%ebx
mov    $0xba2e8ba3,%esi
movsd  0xd01(%rip),%xmm8
movdqa 0xcb9(%rip),%xmm1
movdqa 0xcc1(%rip),%xmm2
movdqa 0xc59(%rip),%xmm3
movdqa 0xc61(%rip),%xmm4
movapd 0xc69(%rip),%xmm5
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
imul   %rsi,%rdi
shr    $0x23,%rdi
lea    (%rdi,%rdi,4),%ebp
lea    (%rdi,%rbp,2),%edi
mov    %ebx,%edx
sub    %edi,%edx
xorps  %xmm6,%xmm6
cvtsi2sd %edx,%xmm6
movd   %eax,%xmm7
lea    0x1(%rax),%rdi
divsd  %xmm8,%xmm6
movsd  %xmm6,-0x8(%rcx)
movdqa %xmm7,%xmm6
pmuludq %xmm1,%xmm6
pmuludq %xmm2,%xmm7
movdqa %xmm7,%xmm0
punpckldq %xmm6,%xmm0
pmuludq %xmm3,%xmm6
pshufd $0xed,%xmm6,%xmm6
pmuludq %xmm3,%xmm7
pshufd $0xed,%xmm7,%xmm7
punpckldq %xmm6,%xmm7
psrld  $0x3,%xmm7
pshufd $0xf5,%xmm7,%xmm6
pmuludq %xmm4,%xmm7
pmuludq %xmm4,%xmm6
punpckldq %xmm6,%xmm7
psubd  %xmm7,%xmm0
cvtdq2pd %xmm0,%xmm0
divpd  %xmm5,%xmm0
movupd %xmm0,(%rcx)
add    $0x18,%rcx
add    $0x3,%ebx
mov    %rdi,%rax
cmp    %rdi,%r8
jne    13f0 <pdf_kmean+0x280>
mov    %r13,%rbx
mov    0x2b5e(%rip),%rax
movq   (%rax),%xmm4
movdqa 0xc0a(%rip),%xmm0
pxor   %xmm4,%xmm0
pshufd $0x44,%xmm0,%xmm3
punpcklqdq %xmm4,%xmm4
mov    %r12d,%r13d
test   %r12d,%r12d
mov    %r12d,0xc(%rsp)
mov    %r8,0x48(%rsp)
jle    154e <pdf_kmean+0x3de>
cmp    $0x1,%r12d
mov    0x18(%rsp),%rdx
mov    0x10(%rsp),%rsi
jne    14cd <pdf_kmean+0x35d>
xor    %eax,%eax
jmp    1524 <pdf_kmean+0x3b4>
mov    %r13d,%ecx
and    $0xfffffffe,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movss  (%rdx,%rax,4),%xmm0
movd   0x4(%rdx,%rax,4),%xmm1
movss  (%rsi,%rax,4),%xmm2
unpcklps %xmm0,%xmm2
movd   0x4(%rsi,%rax,4),%xmm0
punpckldq %xmm1,%xmm0
cvtps2pd %xmm2,%xmm1
movapd %xmm1,%xmm2
maxpd  %xmm3,%xmm2
minpd  %xmm4,%xmm1
cvtps2pd %xmm0,%xmm4
movapd %xmm4,%xmm3
maxpd  %xmm2,%xmm3
minpd  %xmm1,%xmm4
add    $0x2,%rax
cmp    %rax,%rcx
jne    14e0 <pdf_kmean+0x370>
test   $0x1,%r13b
je     154e <pdf_kmean+0x3de>
movss  (%rdx,%rax,4),%xmm0
movss  (%rsi,%rax,4),%xmm1
unpcklps %xmm0,%xmm1
cvtps2pd %xmm1,%xmm0
movapd %xmm0,%xmm1
maxpd  %xmm3,%xmm1
minpd  %xmm4,%xmm0
movapd %xmm1,%xmm3
movapd %xmm0,%xmm4
movaps %xmm4,0x20(%rsp)
movaps %xmm3,0x30(%rsp)
lea    0xb87(%rip),%rsi
mov    %r14,%rdi
mov    $0x19a,%edx
mov    $0x19a,%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xb9a(%rip),%rdi
mov    $0xef,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1090 <fwrite@plt>
test   %ebx,%ebx
jle    171b <pdf_kmean+0x5ab>
movapd 0x30(%rsp),%xmm2
movapd %xmm2,%xmm0
movapd 0x20(%rsp),%xmm3
subpd  %xmm3,%xmm0
movapd 0xb00(%rip),%xmm1
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
minsd  %xmm1,%xmm0
movapd %xmm0,0x60(%rsp)
addpd  %xmm3,%xmm2
movsd  0xaf6(%rip),%xmm0
movapd %xmm2,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
unpckhpd %xmm2,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm2,0x30(%rsp)
xor    %ebp,%ebp
lea    0xc23(%rip),%r12
jmp    1666 <pdf_kmean+0x4f6>
nopl   0x0(%rax)
mov    0x50(%rsp),%rax
movss  (%rax,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
subsd  0x20(%rsp),%xmm0
movapd 0x60(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xaaa(%rip),%xmm3
addsd  %xmm3,%xmm0
mov    0x58(%rsp),%rax
movss  (%rax,%rbp,4),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  0x30(%rsp),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm3,%xmm1
mov    %r14,%rdi
lea    0xbd7(%rip),%rsi
mov    $0x2,%al
call   1060 <fprintf@plt>
add    $0x1,%rbp
cmp    0x48(%rsp),%rbp
je     171b <pdf_kmean+0x5ab>
lea    0x0(,%rbp,2),%rax
add    %rbp,%rax
mov    (%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  0x8(%rcx,%rax,8),%xmm1
movsd  0x10(%rcx,%rax,8),%xmm2
mov    %r14,%rdi
lea    0xb74(%rip),%rsi
mov    $0x3,%al
call   1060 <fprintf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1600 <pdf_kmean+0x490>
xor    %ebx,%ebx
jmp    16bd <pdf_kmean+0x54d>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r13
je     1600 <pdf_kmean+0x490>
mov    (%r15,%rbx,4),%eax
cmp    %rax,%rbp
jne    16b0 <pdf_kmean+0x540>
mov    0x10(%rsp),%rax
movss  (%rax,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
subsd  0x20(%rsp),%xmm0
movapd 0x60(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x9e4(%rip),%xmm3
addsd  %xmm3,%xmm0
mov    0x18(%rsp),%rax
movss  (%rax,%rbx,4),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  0x30(%rsp),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm3,%xmm1
mov    %r14,%rdi
mov    %r12,%rsi
mov    $0x2,%al
call   1060 <fprintf@plt>
jmp    16b0 <pdf_kmean+0x540>
lea    0xb19(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    (%rsp),%rdi
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"results.eps\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [43 x i8] c"[display] Cannot create results.pdf file!\0A\00"
@HUGE_VAL = global double 0.000000e+00
@.str.3 = [46 x i8] c"%%!PS-Adobe-3.0\0A%%%%BoundingBox: -5 -5 %d %d\0A\00"
@.str.4 = [240 x i8] c"/l {rlineto} def /m {rmoveto} def\0A/c { .25 sub exch .25 sub exch .5 0 360 arc fill } def\0A/s { moveto -2 0 m 2 2 l 2 -2 l -2 -2 l closepath \09gsave 1 setgray fill grestore gsave 3 setlinewidth 1 setgray stroke grestore 0 setgray stroke }def\0A\00"
@.str.5 = [22 x i8] c"%g %g %g setrgbcolor\0A\00"
@.str.6 = [13 x i8] c"%.3f %.3f c\0A\00"
@.str.7 = [20 x i8] c"\0A0 setgray %g %g s\0A\00"
@.str.8 = [9 x i8] c"\0A%%%%EOF\00"
define void @pdf_kmean(float* %0, float* %1, i32 %2, float* %3, float* %4, i32 %5, i32* %6) {
%8 = alloca float*
%9 = alloca float*
%10 = alloca i32
%11 = alloca float*
%12 = alloca float*
%13 = alloca i32
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double*
%26 = alloca i32*
store float* %0, float** %8
store float* %1, float** %9
store i32 %2, i32* %10
store float* %3, float** %11
store float* %4, float** %12
store i32 %5, i32* %13
store i32* %6, i32** %14
%27 = load i32, i32* %13
%28 = sext i32 %27 to i64
%29 = mul i64 8, %28
%30 = mul i64 %29, 3
%31 = trunc i64 %30 to i32
%32 = call i64 @malloc(i32 %31)
%33 = inttoptr i64 %32 to double*
store double* %33, double** %25
%34 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %34, i32** %26
%35 = load i32*, i32** %26
%36 = icmp eq i32* %35, null
br i1 %36, label %37, label %39
37: ; preds = %7
%38 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
br label %285
39: ; preds = %7
store i32 0, i32* %15
br label %40
40: ; preds = %79, %39
%41 = load i32, i32* %15
%42 = load i32, i32* %13
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %82
44: ; preds = %40
%45 = load i32, i32* %15
%46 = add nsw i32 %45, 1
%47 = mul nsw i32 3, %46
%48 = srem i32 %47, 11
%49 = sitofp i32 %48 to double
%50 = fdiv double %49, 1.100000e+01
%51 = load double*, double** %25
%52 = load i32, i32* %15
%53 = mul nsw i32 3, %52
%54 = add nsw i32 %53, 0
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds double, double* %51, i64 %55
store double %50, double* %56
%57 = load i32, i32* %15
%58 = mul nsw i32 7, %57
%59 = srem i32 %58, 11
%60 = sitofp i32 %59 to double
%61 = fdiv double %60, 1.100000e+01
%62 = load double*, double** %25
%63 = load i32, i32* %15
%64 = mul nsw i32 3, %63
%65 = add nsw i32 %64, 1
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %62, i64 %66
store double %61, double* %67
%68 = load i32, i32* %15
%69 = mul nsw i32 9, %68
%70 = srem i32 %69, 11
%71 = sitofp i32 %70 to double
%72 = fdiv double %71, 1.100000e+01
%73 = load double*, double** %25
%74 = load i32, i32* %15
%75 = mul nsw i32 3, %74
%76 = add nsw i32 %75, 2
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %73, i64 %77
store double %72, double* %78
br label %79
79: ; preds = %44
%80 = load i32, i32* %15
%81 = add nsw i32 %80, 1
store i32 %81, i32* %15
br label %40
82: ; preds = %40
%83 = load double, double* @HUGE_VAL
store double %83, double* %20
store double %83, double* %18
%84 = fneg double %83
store double %84, double* %21
store double %84, double* %19
store i32 0, i32* %16
br label %85
85: ; preds = %154, %82
%86 = load i32, i32* %16
%87 = load i32, i32* %10
%88 = icmp slt i32 %86, %87
br i1 %88, label %89, label %157
89: ; preds = %85
%90 = load double, double* %19
%91 = load float*, float** %8
%92 = load i32, i32* %16
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds float, float* %91, i64 %93
%95 = load float, float* %94
%96 = fpext float %95 to double
%97 = fcmp olt double %90, %96
br i1 %97, label %98, label %105
98: ; preds = %89
%99 = load float*, float** %8
%100 = load i32, i32* %16
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds float, float* %99, i64 %101
%103 = load float, float* %102
%104 = fpext float %103 to double
store double %104, double* %19
br label %105
105: ; preds = %98, %89
%106 = load double, double* %18
%107 = load float*, float** %8
%108 = load i32, i32* %16
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds float, float* %107, i64 %109
%111 = load float, float* %110
%112 = fpext float %111 to double
%113 = fcmp ogt double %106, %112
br i1 %113, label %114, label %121
114: ; preds = %105
%115 = load float*, float** %8
%116 = load i32, i32* %16
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds float, float* %115, i64 %117
%119 = load float, float* %118
%120 = fpext float %119 to double
store double %120, double* %18
br label %121
121: ; preds = %114, %105
%122 = load double, double* %21
%123 = load float*, float** %9
%124 = load i32, i32* %16
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds float, float* %123, i64 %125
%127 = load float, float* %126
%128 = fpext float %127 to double
%129 = fcmp olt double %122, %128
br i1 %129, label %130, label %137
130: ; preds = %121
%131 = load float*, float** %9
%132 = load i32, i32* %16
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds float, float* %131, i64 %133
%135 = load float, float* %134
%136 = fpext float %135 to double
store double %136, double* %21
br label %137
137: ; preds = %130, %121
%138 = load double, double* %20
%139 = load float*, float** %9
%140 = load i32, i32* %16
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds float, float* %139, i64 %141
%143 = load float, float* %142
%144 = fpext float %143 to double
%145 = fcmp ogt double %138, %144
br i1 %145, label %146, label %153
146: ; preds = %137
%147 = load float*, float** %9
%148 = load i32, i32* %16
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds float, float* %147, i64 %149
%151 = load float, float* %150
%152 = fpext float %151 to double
store double %152, double* %20
br label %153
153: ; preds = %146, %137
br label %154
154: ; preds = %153
%155 = load i32, i32* %16
%156 = add nsw i32 %155, 1
store i32 %156, i32* %16
br label %85
157: ; preds = %85
%158 = load double, double* %19
%159 = load double, double* %18
%160 = fsub double %158, %159
%161 = fdiv double 4.000000e+02, %160
store double %161, double* %22
%162 = load double, double* %22
%163 = load double, double* %21
%164 = load double, double* %20
%165 = fsub double %163, %164
%166 = fdiv double 4.000000e+02, %165
%167 = fcmp ogt double %162, %166
br i1 %167, label %168, label %173
168: ; preds = %157
%169 = load double, double* %21
%170 = load double, double* %20
%171 = fsub double %169, %170
%172 = fdiv double 4.000000e+02, %171
store double %172, double* %22
br label %173
173: ; preds = %168, %157
%174 = load double, double* %19
%175 = load double, double* %18
%176 = fadd double %174, %175
%177 = fdiv double %176, 2.000000e+00
store double %177, double* %23
%178 = load double, double* %21
%179 = load double, double* %20
%180 = fadd double %178, %179
%181 = fdiv double %180, 2.000000e+00
store double %181, double* %24
%182 = load i32*, i32** %26
%183 = call i32 (i32*, i8*, ...) @fprintf(i32* %182, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 410, i32 410)
%184 = load i32*, i32** %26
%185 = call i32 (i32*, i8*, ...) @fprintf(i32* %184, i8* getelementptr inbounds ([240 x i8], [240 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %15
br label %186
186: ; preds = %275, %173
%187 = load i32, i32* %15
%188 = load i32, i32* %13
%189 = icmp slt i32 %187, %188
br i1 %189, label %190, label %278
190: ; preds = %186
%191 = load i32*, i32** %26
%192 = load double*, double** %25
%193 = load i32, i32* %15
%194 = mul nsw i32 3, %193
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds double, double* %192, i64 %195
%197 = load double, double* %196
%198 = load double*, double** %25
%199 = load i32, i32* %15
%200 = mul nsw i32 3, %199
%201 = add nsw i32 %200, 1
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds double, double* %198, i64 %202
%204 = load double, double* %203
%205 = load double*, double** %25
%206 = load i32, i32* %15
%207 = mul nsw i32 3, %206
%208 = add nsw i32 %207, 2
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds double, double* %205, i64 %209
%211 = load double, double* %210
%212 = call i32 (i32*, i8*, ...) @fprintf(i32* %191, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %197, double %204, double %211)
store i32 0, i32* %16
br label %213
213: ; preds = %249, %190
%214 = load i32, i32* %16
%215 = load i32, i32* %10
%216 = icmp slt i32 %214, %215
br i1 %216, label %217, label %252
217: ; preds = %213
%218 = load i32*, i32** %14
%219 = load i32, i32* %16
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds i32, i32* %218, i64 %220
%222 = load i32, i32* %221
%223 = load i32, i32* %15
%224 = icmp ne i32 %222, %223
br i1 %224, label %225, label %226
225: ; preds = %217
br label %249
226: ; preds = %217
%227 = load i32*, i32** %26
%228 = load float*, float** %8
%229 = load i32, i32* %16
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds float, float* %228, i64 %230
%232 = load float, float* %231
%233 = fpext float %232 to double
%234 = load double, double* %23
%235 = fsub double %233, %234
%236 = load double, double* %22
%237 = call double @llvm.fmuladd.f64(double %235, double %236, double 2.000000e+02)
%238 = load float*, float** %9
%239 = load i32, i32* %16
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds float, float* %238, i64 %240
%242 = load float, float* %241
%243 = fpext float %242 to double
%244 = load double, double* %24
%245 = fsub double %243, %244
%246 = load double, double* %22
%247 = call double @llvm.fmuladd.f64(double %245, double %246, double 2.000000e+02)
%248 = call i32 (i32*, i8*, ...) @fprintf(i32* %227, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), double %237, double %247)
br label %249
249: ; preds = %226, %225
%250 = load i32, i32* %16
%251 = add nsw i32 %250, 1
store i32 %251, i32* %16
br label %213
252: ; preds = %213
%253 = load i32*, i32** %26
%254 = load float*, float** %11
%255 = load i32, i32* %15
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds float, float* %254, i64 %256
%258 = load float, float* %257
%259 = fpext float %258 to double
%260 = load double, double* %23
%261 = fsub double %259, %260
%262 = load double, double* %22
%263 = call double @llvm.fmuladd.f64(double %261, double %262, double 2.000000e+02)
%264 = load float*, float** %12
%265 = load i32, i32* %15
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds float, float* %264, i64 %266
%268 = load float, float* %267
%269 = fpext float %268 to double
%270 = load double, double* %24
%271 = fsub double %269, %270
%272 = load double, double* %22
%273 = call double @llvm.fmuladd.f64(double %271, double %272, double 2.000000e+02)
%274 = call i32 (i32*, i8*, ...) @fprintf(i32* %253, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), double %263, double %273)
br label %275
275: ; preds = %252
%276 = load i32, i32* %15
%277 = add nsw i32 %276, 1
store i32 %277, i32* %15
br label %186
278: ; preds = %186
%279 = load i32*, i32** %26
%280 = call i32 (i32*, i8*, ...) @fprintf(i32* %279, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%281 = load i32*, i32** %26
%282 = call i32 @fclose(i32* %281)
%283 = load double*, double** %25
%284 = call i32 @free(double* %283)
br label %285
285: ; preds = %278, %37
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"results.eps\00"
@.str.1 = [2 x i8] c"w\00"
@HUGE_VAL = global double 0.000000e+00
@.str.3 = [46 x i8] c"%%!PS-Adobe-3.0\0A%%%%BoundingBox: -5 -5 %d %d\0A\00"
@.str.4 = [240 x i8] c"/l {rlineto} def /m {rmoveto} def\0A/c { .25 sub exch .25 sub exch .5 0 360 arc fill } def\0A/s { moveto -2 0 m 2 2 l 2 -2 l -2 -2 l closepath \09gsave 1 setgray fill grestore gsave 3 setlinewidth 1 setgray stroke grestore 0 setgray stroke }def\0A\00"
@.str.5 = [22 x i8] c"%g %g %g setrgbcolor\0A\00"
@.str.6 = [13 x i8] c"%.3f %.3f c\0A\00"
@.str.7 = [20 x i8] c"\0A0 setgray %g %g s\0A\00"
@.str.8 = [9 x i8] c"\0A%%%%EOF\00"
@str = [42 x i8] c"[display] Cannot create results.pdf file!\00"
define void @pdf_kmean(float* nocapture %0, float* nocapture %1, i32 %2, float* nocapture %3, float* nocapture %4, i32 %5, i32* nocapture %6) {
%8 = mul i32 %5, 24
%9 = tail call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to double*
%11 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %52, label %13
13: ; preds = %7
%14 = icmp sgt i32 %5, 0
br i1 %14, label %15, label %75
15: ; preds = %13
%16 = zext i32 %5 to i64
%17 = icmp eq i32 %5, 1
br i1 %17, label %50, label %18
18: ; preds = %15
%19 = and i64 %16, 4294967294
br label %20
20: ; preds = %20, %18
%21 = phi i64 [ 0, %18 ], [ %44, %20 ]
%22 = phi <2 x i64> [ <i64 0, i64 1>, %18 ], [ %45, %20 ]
%23 = phi <2 x i32> [ <i32 0, i32 1>, %18 ], [ %46, %20 ]
%24 = trunc <2 x i64> %22 to <2 x i32>
%25 = mul <2 x i32> %24, <i32 3, i32 3>
%26 = add <2 x i32> %25, <i32 3, i32 3>
%27 = urem <2 x i32> %26, <i32 11, i32 11>
%28 = sitofp <2 x i32> %27 to <2 x double>
%29 = fdiv <2 x double> %28, <double 1.100000e+01, double 1.100000e+01>
%30 = mul nuw nsw i64 %21, 3
%31 = mul nsw <2 x i32> %23, <i32 7, i32 7>
%32 = urem <2 x i32> %31, <i32 11, i32 11>
%33 = sitofp <2 x i32> %32 to <2 x double>
%34 = fdiv <2 x double> %33, <double 1.100000e+01, double 1.100000e+01>
%35 = mul nsw <2 x i32> %23, <i32 9, i32 9>
%36 = urem <2 x i32> %35, <i32 11, i32 11>
%37 = sitofp <2 x i32> %36 to <2 x double>
%38 = fdiv <2 x double> %37, <double 1.100000e+01, double 1.100000e+01>
%39 = getelementptr inbounds double, double* %10, i64 %30
%40 = bitcast double* %39 to <6 x double>*
%41 = shufflevector <2 x double> %29, <2 x double> %34, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%42 = shufflevector <2 x double> %38, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%43 = shufflevector <4 x double> %41, <4 x double> %42, <6 x i32> <i32 0, i32 2, i32 4, i32 1, i32 3, i32 5>
store <6 x double> %43, <6 x double>* %40
%44 = add nuw i64 %21, 2
%45 = add <2 x i64> %22, <i64 2, i64 2>
%46 = add <2 x i32> %23, <i32 2, i32 2>
%47 = icmp eq i64 %44, %19
br i1 %47, label %48, label %20
48: ; preds = %20
%49 = icmp eq i64 %19, %16
br i1 %49, label %75, label %50
50: ; preds = %15, %48
%51 = phi i64 [ 0, %15 ], [ %19, %48 ]
br label %54
52: ; preds = %7
%53 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
br label %210
54: ; preds = %50, %54
%55 = phi i64 [ %56, %54 ], [ %51, %50 ]
%56 = add nuw nsw i64 %55, 1
%57 = trunc i64 %56 to i32
%58 = mul i32 %57, 3
%59 = urem i32 %58, 11
%60 = sitofp i32 %59 to double
%61 = fdiv double %60, 1.100000e+01
%62 = mul nuw nsw i64 %55, 3
%63 = getelementptr inbounds double, double* %10, i64 %62
store double %61, double* %63
%64 = trunc i64 %55 to i32
%65 = add nuw nsw i64 %62, 1
%66 = getelementptr inbounds double, double* %10, i64 %65
%67 = insertelement <2 x i32> poison, i32 %64, i64 0
%68 = shufflevector <2 x i32> %67, <2 x i32> poison, <2 x i32> zeroinitializer
%69 = mul nsw <2 x i32> %68, <i32 7, i32 9>
%70 = urem <2 x i32> %69, <i32 11, i32 11>
%71 = sitofp <2 x i32> %70 to <2 x double>
%72 = fdiv <2 x double> %71, <double 1.100000e+01, double 1.100000e+01>
%73 = bitcast double* %66 to <2 x double>*
store <2 x double> %72, <2 x double>* %73
%74 = icmp eq i64 %56, %16
br i1 %74, label %75, label %54
75: ; preds = %54, %48, %13
%76 = load double, double* @HUGE_VAL
%77 = fneg double %76
%78 = icmp sgt i32 %2, 0
%79 = insertelement <2 x double> poison, double %77, i64 0
%80 = shufflevector <2 x double> %79, <2 x double> poison, <2 x i32> zeroinitializer
%81 = insertelement <2 x double> poison, double %76, i64 0
%82 = shufflevector <2 x double> %81, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %78, label %83, label %139
83: ; preds = %75
%84 = zext i32 %2 to i64
%85 = and i64 %84, 1
%86 = icmp eq i32 %2, 1
br i1 %86, label %120, label %87
87: ; preds = %83
%88 = and i64 %84, 4294967294
br label %89
89: ; preds = %89, %87
%90 = phi i64 [ 0, %87 ], [ %117, %89 ]
%91 = phi <2 x double> [ %80, %87 ], [ %114, %89 ]
%92 = phi <2 x double> [ %82, %87 ], [ %116, %89 ]
%93 = phi i64 [ 0, %87 ], [ %118, %89 ]
%94 = getelementptr inbounds float, float* %0, i64 %90
%95 = load float, float* %94
%96 = getelementptr inbounds float, float* %1, i64 %90
%97 = load float, float* %96
%98 = insertelement <2 x float> poison, float %95, i64 0
%99 = insertelement <2 x float> %98, float %97, i64 1
%100 = fpext <2 x float> %99 to <2 x double>
%101 = fcmp olt <2 x double> %91, %100
%102 = select <2 x i1> %101, <2 x double> %100, <2 x double> %91
%103 = fcmp ogt <2 x double> %92, %100
%104 = select <2 x i1> %103, <2 x double> %100, <2 x double> %92
%105 = or i64 %90, 1
%106 = getelementptr inbounds float, float* %0, i64 %105
%107 = load float, float* %106
%108 = getelementptr inbounds float, float* %1, i64 %105
%109 = load float, float* %108
%110 = insertelement <2 x float> poison, float %107, i64 0
%111 = insertelement <2 x float> %110, float %109, i64 1
%112 = fpext <2 x float> %111 to <2 x double>
%113 = fcmp olt <2 x double> %102, %112
%114 = select <2 x i1> %113, <2 x double> %112, <2 x double> %102
%115 = fcmp ogt <2 x double> %104, %112
%116 = select <2 x i1> %115, <2 x double> %112, <2 x double> %104
%117 = add nuw nsw i64 %90, 2
%118 = add i64 %93, 2
%119 = icmp eq i64 %118, %88
br i1 %119, label %120, label %89
120: ; preds = %89, %83
%121 = phi <2 x double> [ undef, %83 ], [ %114, %89 ]
%122 = phi <2 x double> [ undef, %83 ], [ %116, %89 ]
%123 = phi i64 [ 0, %83 ], [ %117, %89 ]
%124 = phi <2 x double> [ %80, %83 ], [ %114, %89 ]
%125 = phi <2 x double> [ %82, %83 ], [ %116, %89 ]
%126 = icmp eq i64 %85, 0
br i1 %126, label %139, label %127
127: ; preds = %120
%128 = getelementptr inbounds float, float* %0, i64 %123
%129 = load float, float* %128
%130 = getelementptr inbounds float, float* %1, i64 %123
%131 = load float, float* %130
%132 = insertelement <2 x float> poison, float %129, i64 0
%133 = insertelement <2 x float> %132, float %131, i64 1
%134 = fpext <2 x float> %133 to <2 x double>
%135 = fcmp olt <2 x double> %124, %134
%136 = select <2 x i1> %135, <2 x double> %134, <2 x double> %124
%137 = fcmp ogt <2 x double> %125, %134
%138 = select <2 x i1> %137, <2 x double> %134, <2 x double> %125
br label %139
139: ; preds = %127, %120, %75
%140 = phi <2 x double> [ %80, %75 ], [ %121, %120 ], [ %136, %127 ]
%141 = phi <2 x double> [ %82, %75 ], [ %122, %120 ], [ %138, %127 ]
%142 = fsub <2 x double> %140, %141
%143 = fdiv <2 x double> <double 4.000000e+02, double 4.000000e+02>, %142
%144 = extractelement <2 x double> %143, i64 0
%145 = extractelement <2 x double> %143, i64 1
%146 = fcmp ogt double %144, %145
%147 = select i1 %146, double %145, double %144
%148 = fadd <2 x double> %140, %141
%149 = extractelement <2 x double> %148, i64 0
%150 = fmul double %149, 5.000000e-01
%151 = fadd <2 x double> %141, %140
%152 = extractelement <2 x double> %151, i64 1
%153 = fmul double %152, 5.000000e-01
%154 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 410, i32 410)
%155 = tail call i64 @fwrite(i8* getelementptr inbounds ([240 x i8], [240 x i8]* @.str.4, i64 0, i64 0), i64 239, i64 1, i32* %11)
br i1 %14, label %156, label %206
156: ; preds = %139
%157 = zext i32 %5 to i64
%158 = zext i32 %2 to i64
br label %159
159: ; preds = %156, %192
%160 = phi i64 [ 0, %156 ], [ %204, %192 ]
%161 = mul nuw nsw i64 %160, 3
%162 = getelementptr inbounds double, double* %10, i64 %161
%163 = load double, double* %162
%164 = add nuw nsw i64 %161, 1
%165 = getelementptr inbounds double, double* %10, i64 %164
%166 = load double, double* %165
%167 = add nuw nsw i64 %161, 2
%168 = getelementptr inbounds double, double* %10, i64 %167
%169 = load double, double* %168
%170 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %163, double %166, double %169)
br i1 %78, label %171, label %192
171: ; preds = %159, %189
%172 = phi i64 [ %190, %189 ], [ 0, %159 ]
%173 = getelementptr inbounds i32, i32* %6, i64 %172
%174 = load i32, i32* %173
%175 = zext i32 %174 to i64
%176 = icmp eq i64 %160, %175
br i1 %176, label %177, label %189
177: ; preds = %171
%178 = getelementptr inbounds float, float* %0, i64 %172
%179 = load float, float* %178
%180 = fpext float %179 to double
%181 = fsub double %180, %150
%182 = tail call double @llvm.fmuladd.f64(double %181, double %147, double 2.000000e+02)
%183 = getelementptr inbounds float, float* %1, i64 %172
%184 = load float, float* %183
%185 = fpext float %184 to double
%186 = fsub double %185, %153
%187 = tail call double @llvm.fmuladd.f64(double %186, double %147, double 2.000000e+02)
%188 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), double %182, double %187)
br label %189
189: ; preds = %171, %177
%190 = add nuw nsw i64 %172, 1
%191 = icmp eq i64 %190, %158
br i1 %191, label %192, label %171
192: ; preds = %189, %159
%193 = getelementptr inbounds float, float* %3, i64 %160
%194 = load float, float* %193
%195 = fpext float %194 to double
%196 = fsub double %195, %150
%197 = tail call double @llvm.fmuladd.f64(double %196, double %147, double 2.000000e+02)
%198 = getelementptr inbounds float, float* %4, i64 %160
%199 = load float, float* %198
%200 = fpext float %199 to double
%201 = fsub double %200, %153
%202 = tail call double @llvm.fmuladd.f64(double %201, double %147, double 2.000000e+02)
%203 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), double %197, double %202)
%204 = add nuw nsw i64 %160, 1
%205 = icmp eq i64 %204, %157
br i1 %205, label %206, label %159
206: ; preds = %192, %139
%207 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%208 = tail call i32 @fclose(i32* %11)
%209 = tail call i32 @free(double* %10)
br label %210
210: ; preds = %206, %52
ret void
}