#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 /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int fscanf(int /*<<< orphan*/ *, char *, ...);
float *malloc(int);
int /*<<< orphan*/ skipComments(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int pnmRead(FILE *file, int *w, int *h, float **pixels) {
  unsigned char dummyByte;
  int i;
  float max;
  char token;
  int width, height;
  float *rgbPixels;
  fscanf(file, " ");
  skipComments(file);
  if (fscanf(file, "P%c ", &token) != 1) {
    fprintf(stderr, "pnmRead: Had trouble reading PNM tag\n");
    return (0);
  }
  skipComments(file);
  if (fscanf(file, "%d ", &width) != 1) {
    fprintf(stderr, "pnmRead: Had trouble reading PNM width\n");
    return (0);
  }
  skipComments(file);
  if (fscanf(file, "%d ", &height) != 1) {
    fprintf(stderr, "pnmRead: Had trouble reading PNM height\n");
    return (0);
  }
  skipComments(file);
  if (token != '1' && token != '4')
    if (fscanf(file, "%f", &max) != 1) {
      fprintf(stderr, "pnmRead: Had trouble reading PNM max value\n");
      return (0);
    }
  rgbPixels = malloc(width * height * 4 * sizeof(float));
  if (rgbPixels == NULL) {
    fprintf(stderr, "pnmRead: Couldn't allocate %d bytes\n",
            width * height * 4 * sizeof(float));
    fprintf(stderr, "pnmRead: (For a %d by %d image)\n", width, height);
    return (0);
  }
  if (token != '4')
    skipComments(file);
  if (token != '4')
    fread(&dummyByte, 1, 1, file);
  if (token == '1') {
    for (i = 0; i < width * height; i++) {
      int pixel;
      fscanf(file, "%d", &pixel);
      pixel = 1 - pixel;
      rgbPixels[i * 4 + 0] = pixel;
      rgbPixels[i * 4 + 1] = pixel;
      rgbPixels[i * 4 + 2] = pixel;
      rgbPixels[i * 4 + 3] = 1.0;
    }
  } else if (token == '2') {
    for (i = 0; i < width * height; i++) {
      int pixel;
      fscanf(file, "%d", &pixel);
      rgbPixels[i * 4 + 0] = pixel / max;
      rgbPixels[i * 4 + 1] = pixel / max;
      rgbPixels[i * 4 + 2] = pixel / max;
      rgbPixels[i * 4 + 3] = 1.0;
    }
  } else if (token == '3') {
    for (i = 0; i < width * height; i++) {
      int r, g, b;
      fscanf(file, "%d %d %d", &r, &g, &b);
      rgbPixels[i * 4 + 0] = r / max;
      rgbPixels[i * 4 + 1] = g / max;
      rgbPixels[i * 4 + 2] = b / max;
      rgbPixels[i * 4 + 3] = 1.0;
    }
  } else if (token == '4') {
    int bitnum = 0;
    for (i = 0; i < width * height; i++) {
      unsigned char pixel;
      unsigned char value;
      if (bitnum == 0)
        fread(&value, 1, 1, file);
      pixel = (1 - ((value >> (7 - bitnum)) & 1));
      rgbPixels[i * 4 + 0] = pixel;
      rgbPixels[i * 4 + 1] = pixel;
      rgbPixels[i * 4 + 2] = pixel;
      rgbPixels[i * 4 + 3] = 1.0;
      if (++bitnum == 8 || ((i + 1) % width) == 0)
        bitnum = 0;
    }
  } else if (token == '5') {
    for (i = 0; i < width * height; i++) {
      unsigned char pixel;
      fread(&pixel, 1, 1, file);
      rgbPixels[i * 4 + 0] = pixel / max;
      rgbPixels[i * 4 + 1] = pixel / max;
      rgbPixels[i * 4 + 2] = pixel / max;
      rgbPixels[i * 4 + 3] = 1.0;
    }
  } else if (token == '6') {
    for (i = 0; i < width * height; i++) {
      unsigned char rgb[3];
      fread(rgb, 3, 1, file);
      rgbPixels[i * 4 + 0] = rgb[0] / max;
      rgbPixels[i * 4 + 1] = rgb[1] / max;
      rgbPixels[i * 4 + 2] = rgb[2] / max;
      rgbPixels[i * 4 + 3] = 1.0;
    }
  }
  *w = width;
  *h = height;
  *pixels = rgbPixels;
  return (1);
}


x86 assembly (clang, -O0):
<pnmRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe94(%rip),%rsi
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <skipComments@plt>
mov    -0x10(%rbp),%rdi
lea    0xe76(%rip),%rsi
lea    -0x35(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
cmp    $0x1,%eax
je     11c5 <pnmRead+0x75>
mov    0x2e37(%rip),%rax
mov    (%rax),%edi
lea    0xe57(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    18c4 <pnmRead+0x774>
mov    -0x10(%rbp),%rdi
call   1030 <skipComments@plt>
mov    -0x10(%rbp),%rdi
lea    0xe56(%rip),%rsi
lea    -0x3c(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
cmp    $0x1,%eax
je     1210 <pnmRead+0xc0>
mov    0x2dec(%rip),%rax
mov    (%rax),%edi
lea    0xe36(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    18c4 <pnmRead+0x774>
mov    -0x10(%rbp),%rdi
call   1030 <skipComments@plt>
mov    -0x10(%rbp),%rdi
lea    0xe0b(%rip),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
cmp    $0x1,%eax
je     125b <pnmRead+0x10b>
mov    0x2da1(%rip),%rax
mov    (%rax),%edi
lea    0xe13(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    18c4 <pnmRead+0x774>
mov    -0x10(%rbp),%rdi
call   1030 <skipComments@plt>
movsbl -0x35(%rbp),%eax
cmp    $0x31,%eax
je     12c5 <pnmRead+0x175>
movsbl -0x35(%rbp),%eax
cmp    $0x34,%eax
je     12c5 <pnmRead+0x175>
mov    -0x10(%rbp),%rdi
lea    0xdfb(%rip),%rsi
lea    -0x34(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
cmp    $0x1,%eax
je     12c0 <pnmRead+0x170>
mov    0x2d3c(%rip),%rax
mov    (%rax),%edi
lea    0xdda(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    18c4 <pnmRead+0x774>
jmp    12c5 <pnmRead+0x175>
mov    -0x3c(%rbp),%eax
imul   -0x40(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    133c <pnmRead+0x1ec>
mov    0x2cee(%rip),%rax
mov    (%rax),%edi
mov    -0x3c(%rbp),%eax
imul   -0x40(%rbp),%eax
shl    $0x2,%eax
movslq %eax,%rdx
shl    $0x2,%rdx
lea    0xda7(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2cc6(%rip),%rax
mov    (%rax),%edi
mov    -0x3c(%rbp),%edx
mov    -0x40(%rbp),%ecx
lea    0xdaf(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    18c4 <pnmRead+0x774>
movsbl -0x35(%rbp),%eax
cmp    $0x34,%eax
je     1352 <pnmRead+0x202>
mov    -0x10(%rbp),%rdi
call   1030 <skipComments@plt>
movsbl -0x35(%rbp),%eax
cmp    $0x34,%eax
je     1373 <pnmRead+0x223>
mov    -0x10(%rbp),%rcx
lea    -0x29(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fread@plt>
movsbl -0x35(%rbp),%eax
cmp    $0x31,%eax
jne    1438 <pnmRead+0x2e8>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x3c(%rbp),%ecx
imul   -0x40(%rbp),%ecx
cmp    %ecx,%eax
jge    1433 <pnmRead+0x2e3>
mov    -0x10(%rbp),%rdi
lea    0xd5b(%rip),%rsi
lea    -0x4c(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    $0x1,%eax
sub    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
cvtsi2ssl -0x4c(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
cvtsi2ssl -0x4c(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
cvtsi2ssl -0x4c(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movss  0xbe0(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1387 <pnmRead+0x237>
jmp    18a0 <pnmRead+0x750>
movsbl -0x35(%rbp),%eax
cmp    $0x32,%eax
jne    1501 <pnmRead+0x3b1>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x3c(%rbp),%ecx
imul   -0x40(%rbp),%ecx
cmp    %ecx,%eax
jge    14fc <pnmRead+0x3ac>
mov    -0x10(%rbp),%rdi
lea    0xc96(%rip),%rsi
lea    -0x50(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
cvtsi2ssl -0x50(%rbp),%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
cvtsi2ssl -0x50(%rbp),%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
cvtsi2ssl -0x50(%rbp),%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movss  0xb17(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    144c <pnmRead+0x2fc>
jmp    189b <pnmRead+0x74b>
movsbl -0x35(%rbp),%eax
cmp    $0x33,%eax
jne    15d2 <pnmRead+0x482>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x3c(%rbp),%ecx
imul   -0x40(%rbp),%ecx
cmp    %ecx,%eax
jge    15cd <pnmRead+0x47d>
mov    -0x10(%rbp),%rdi
lea    0xbc7(%rip),%rsi
lea    -0x54(%rbp),%rdx
lea    -0x58(%rbp),%rcx
lea    -0x5c(%rbp),%r8
mov    $0x0,%al
call   1050 <fscanf@plt>
cvtsi2ssl -0x54(%rbp),%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
cvtsi2ssl -0x58(%rbp),%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
cvtsi2ssl -0x5c(%rbp),%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movss  0xa46(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1515 <pnmRead+0x3c5>
jmp    1896 <pnmRead+0x746>
movsbl -0x35(%rbp),%eax
cmp    $0x34,%eax
jne    16e4 <pnmRead+0x594>
movl   $0x0,-0x60(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x3c(%rbp),%ecx
imul   -0x40(%rbp),%ecx
cmp    %ecx,%eax
jge    16df <pnmRead+0x58f>
cmpl   $0x0,-0x60(%rbp)
jne    161d <pnmRead+0x4cd>
mov    -0x10(%rbp),%rcx
lea    -0x62(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fread@plt>
movzbl -0x62(%rbp),%eax
mov    -0x60(%rbp),%dl
mov    $0x7,%cl
sub    %dl,%cl
shr    %cl,%eax
not    %al
and    $0x1,%al
mov    %al,-0x61(%rbp)
movzbl -0x61(%rbp),%eax
cvtsi2ss %eax,%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
movzbl -0x61(%rbp),%eax
cvtsi2ss %eax,%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
movss  %xmm0,0x4(%rax,%rcx,4)
movzbl -0x61(%rbp),%eax
cvtsi2ss %eax,%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movss  0x965(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
cmp    $0x8,%eax
je     16c5 <pnmRead+0x575>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x3c(%rbp)
cmp    $0x0,%edx
jne    16cc <pnmRead+0x57c>
movl   $0x0,-0x60(%rbp)
jmp    16d1 <pnmRead+0x581>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    15ed <pnmRead+0x49d>
jmp    1891 <pnmRead+0x741>
movsbl -0x35(%rbp),%eax
cmp    $0x35,%eax
jne    17b4 <pnmRead+0x664>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x3c(%rbp),%ecx
imul   -0x40(%rbp),%ecx
cmp    %ecx,%eax
jge    17af <pnmRead+0x65f>
mov    -0x10(%rbp),%rcx
lea    -0x63(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fread@plt>
movzbl -0x63(%rbp),%eax
cvtsi2ss %eax,%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
movzbl -0x63(%rbp),%eax
cvtsi2ss %eax,%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
movzbl -0x63(%rbp),%eax
cvtsi2ss %eax,%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movss  0x864(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    16f8 <pnmRead+0x5a8>
jmp    188c <pnmRead+0x73c>
movsbl -0x35(%rbp),%eax
cmp    $0x36,%eax
jne    1887 <pnmRead+0x737>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x3c(%rbp),%ecx
imul   -0x40(%rbp),%ecx
cmp    %ecx,%eax
jge    1882 <pnmRead+0x732>
lea    -0x66(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x3,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
movzbl -0x66(%rbp),%eax
cvtsi2ss %eax,%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
movzbl -0x65(%rbp),%eax
cvtsi2ss %eax,%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
movzbl -0x64(%rbp),%eax
cvtsi2ss %eax,%xmm0
divss  -0x34(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movss  0x791(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    17c8 <pnmRead+0x678>
jmp    1887 <pnmRead+0x737>
jmp    188c <pnmRead+0x73c>
jmp    1891 <pnmRead+0x741>
jmp    1896 <pnmRead+0x746>
jmp    189b <pnmRead+0x74b>
jmp    18a0 <pnmRead+0x750>
mov    -0x3c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x40(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x48(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pnmRead>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,%r12
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0xeba(%rip),%rsi
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <fscanf@plt>
mov    %r15,%rdi
call   1030 <skipComments@plt>
lea    0xe9f(%rip),%rsi
lea    0x3(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <fscanf@plt>
cmp    $0x1,%eax
jne    1327 <pnmRead+0x1d7>
mov    %r15,%rdi
call   1030 <skipComments@plt>
lea    0xea3(%rip),%rsi
xor    %ebp,%ebp
lea    0x4(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <fscanf@plt>
cmp    $0x1,%eax
jne    1339 <pnmRead+0x1e9>
mov    %r15,%rdi
call   1030 <skipComments@plt>
lea    0xe7a(%rip),%rsi
xor    %ebp,%ebp
lea    0x8(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <fscanf@plt>
cmp    $0x1,%eax
jne    134b <pnmRead+0x1fb>
mov    %r15,%rdi
call   1030 <skipComments@plt>
mov    0x3(%rsp),%al
cmp    $0x31,%al
je     1228 <pnmRead+0xd8>
cmp    $0x34,%al
je     1228 <pnmRead+0xd8>
lea    0xe9a(%rip),%rsi
xor    %ebp,%ebp
lea    0x10(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <fscanf@plt>
cmp    $0x1,%eax
jne    13ad <pnmRead+0x25d>
mov    %rbx,0x28(%rsp)
mov    %r14,0x30(%rsp)
movslq 0x4(%rsp),%rax
movslq 0x8(%rsp),%r14
imul   %rax,%r14
mov    %r14d,%edi
shl    $0x4,%edi
call   1070 <malloc@plt>
test   %rax,%rax
je     1373 <pnmRead+0x223>
mov    %rax,%r13
mov    %r12,0x20(%rsp)
cmpb   $0x34,0x3(%rsp)
je     1276 <pnmRead+0x126>
mov    %r15,%rdi
call   1030 <skipComments@plt>
cmpb   $0x34,0x3(%rsp)
jne    13bf <pnmRead+0x26f>
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
test   %edx,%edx
jle    16f1 <pnmRead+0x5a1>
xor    %ebp,%ebp
lea    0xc(%rsp),%r14
movaps 0xd67(%rip),%xmm1
xor    %ebx,%ebx
jmp    12bf <pnmRead+0x16f>
nopl   (%rax)
mov    0x4(%rsp),%ecx
add    $0x1,%rbp
xor    %ebx,%ebx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
movslq %edx,%rdx
cmp    %rdx,%rbp
jge    16f1 <pnmRead+0x5a1>
test   %ebx,%ebx
jne    12e4 <pnmRead+0x194>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1040 <fread@plt>
movaps 0xd21(%rip),%xmm1
movzbl 0xc(%rsp),%eax
movzbl %al,%eax
mov    $0x7,%cl
sub    %bl,%cl
shr    %cl,%eax
not    %al
and    $0x1,%al
movzbl %al,%eax
lea    0x0(,%rbp,4),%ecx
movaps %xmm1,%xmm0
cvtsi2ss %eax,%xmm0
shufps $0x40,%xmm0,%xmm0
movups %xmm0,0x0(%r13,%rcx,4)
add    $0x1,%ebx
cmp    $0x8,%ebx
je     12a0 <pnmRead+0x150>
add    $0x1,%rbp
mov    0x4(%rsp),%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
test   %edx,%edx
jne    12aa <pnmRead+0x15a>
jmp    12a8 <pnmRead+0x158>
mov    0x2cb2(%rip),%rax
mov    (%rax),%edi
lea    0xcf6(%rip),%rsi
jmp    135b <pnmRead+0x20b>
mov    0x2ca0(%rip),%rax
mov    (%rax),%edi
lea    0xd0e(%rip),%rsi
jmp    135b <pnmRead+0x20b>
mov    0x2c8e(%rip),%rax
mov    (%rax),%edi
lea    0xd24(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %ebp,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c66(%rip),%rbx
mov    (%rbx),%edi
shl    $0x4,%r14
lea    0xd50(%rip),%rsi
xor    %ebp,%ebp
mov    %r14,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%rbx),%edi
mov    0x4(%rsp),%edx
mov    0x8(%rsp),%ecx
lea    0xd58(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1362 <pnmRead+0x212>
mov    0x2c2c(%rip),%rax
mov    (%rax),%edi
lea    0xcee(%rip),%rsi
jmp    135b <pnmRead+0x20b>
lea    0x17(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1040 <fread@plt>
mov    0x3(%rsp),%al
add    $0xcf,%al
cmp    $0x5,%al
ja     1471 <pnmRead+0x321>
movzbl %al,%eax
lea    0xc22(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
test   %edx,%edx
jle    16f1 <pnmRead+0x5a1>
lea    0xd10(%rip),%r12
lea    0xc(%rsp),%r14
xor    %ebx,%ebx
xor    %ebp,%ebp
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
mov    $0x1,%eax
sub    0xc(%rsp),%eax
mov    %ebx,%ecx
and    $0xfffffffc,%ecx
movaps 0xbbf(%rip),%xmm0
cvtsi2ss %eax,%xmm0
shufps $0x40,%xmm0,%xmm0
movups %xmm0,0x0(%r13,%rcx,4)
add    $0x1,%rbp
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
movslq %edx,%rdx
add    $0x4,%rbx
cmp    %rdx,%rbp
jl     141c <pnmRead+0x2cc>
jmp    16f1 <pnmRead+0x5a1>
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
jmp    16f1 <pnmRead+0x5a1>
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
test   %edx,%edx
jle    16f1 <pnmRead+0x5a1>
lea    0xc89(%rip),%r12
lea    0xc(%rsp),%r14
xor    %ebx,%ebx
xor    %ebp,%ebp
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0xc(%rsp),%xmm0
divss  0x10(%rsp),%xmm0
movaps 0xb37(%rip),%xmm1
movss  %xmm0,%xmm1
mov    %ebx,%eax
and    $0xfffffffc,%eax
shufps $0x40,%xmm1,%xmm1
movups %xmm1,0x0(%r13,%rax,4)
add    $0x1,%rbp
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
movslq %edx,%rdx
add    $0x4,%rbx
cmp    %rdx,%rbp
jl     14a3 <pnmRead+0x353>
jmp    16f1 <pnmRead+0x5a1>
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
test   %edx,%edx
jle    16f1 <pnmRead+0x5a1>
mov    $0x3,%ebx
lea    0xbfe(%rip),%r12
lea    0x18(%rsp),%r14
xor    %ebp,%ebp
mov    %r15,%rdi
mov    %r12,%rsi
lea    0xc(%rsp),%rdx
lea    0x1c(%rsp),%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <fscanf@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
divss  %xmm1,%xmm0
xorps  %xmm2,%xmm2
cvtsi2ssl 0x1c(%rsp),%xmm2
lea    -0x3(%rbx),%eax
movss  %xmm0,0x0(%r13,%rax,4)
divss  %xmm1,%xmm2
lea    -0x2(%rbx),%eax
movss  %xmm2,0x0(%r13,%rax,4)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x18(%rsp),%xmm0
divss  %xmm1,%xmm0
lea    -0x1(%rbx),%eax
movss  %xmm0,0x0(%r13,%rax,4)
mov    %ebx,%eax
movl   $0x3f800000,0x0(%r13,%rax,4)
80 3f
add    $0x1,%rbp
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
movslq %edx,%rdx
add    $0x4,%ebx
cmp    %rdx,%rbp
jl     1526 <pnmRead+0x3d6>
jmp    16f1 <pnmRead+0x5a1>
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
test   %edx,%edx
jle    16f1 <pnmRead+0x5a1>
xor    %ebx,%ebx
lea    0xc(%rsp),%r14
xor    %ebp,%ebp
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1040 <fread@plt>
movzbl 0xc(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  0x10(%rsp),%xmm0
movaps 0x9f9(%rip),%xmm1
movss  %xmm0,%xmm1
mov    %ebx,%eax
and    $0xfffffffc,%eax
shufps $0x40,%xmm1,%xmm1
movups %xmm1,0x0(%r13,%rax,4)
add    $0x1,%rbp
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
movslq %edx,%rdx
add    $0x4,%rbx
cmp    %rdx,%rbp
jl     15d9 <pnmRead+0x489>
jmp    16f1 <pnmRead+0x5a1>
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
test   %edx,%edx
jle    16f1 <pnmRead+0x5a1>
mov    $0x3,%ebx
xor    %ebp,%ebp
lea    0xc(%rsp),%r14
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1040 <fread@plt>
movzbl 0xc(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x10(%rsp),%xmm1
divss  %xmm1,%xmm0
lea    -0x3(%rbx),%eax
movzbl 0xd(%rsp),%ecx
xorps  %xmm2,%xmm2
cvtsi2ss %ecx,%xmm2
movss  %xmm0,0x0(%r13,%rax,4)
divss  %xmm1,%xmm2
lea    -0x2(%rbx),%eax
movss  %xmm2,0x0(%r13,%rax,4)
movzbl 0xe(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  %xmm1,%xmm0
lea    -0x1(%rbx),%eax
movss  %xmm0,0x0(%r13,%rax,4)
mov    %ebx,%eax
movl   $0x3f800000,0x0(%r13,%rax,4)
80 3f
add    $0x1,%rbp
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %eax,%edx
imul   %ecx,%edx
movslq %edx,%rdx
add    $0x4,%ebx
cmp    %rdx,%rbp
jl     165d <pnmRead+0x50d>
mov    0x28(%rsp),%rdx
mov    %ecx,(%rdx)
mov    0x30(%rsp),%rcx
mov    %eax,(%rcx)
mov    0x20(%rsp),%rax
mov    %r13,(%rax)
mov    $0x1,%ebp
jmp    1362 <pnmRead+0x212>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [5 x i8] c"P%c \00"
@stderr = global i32 0
@.str.2 = [38 x i8] c"pnmRead: Had trouble reading PNM tag\0A\00"
@.str.3 = [4 x i8] c"%d \00"
@.str.4 = [40 x i8] c"pnmRead: Had trouble reading PNM width\0A\00"
@.str.5 = [41 x i8] c"pnmRead: Had trouble reading PNM height\0A\00"
@.str.6 = [3 x i8] c"%f\00"
@.str.7 = [44 x i8] c"pnmRead: Had trouble reading PNM max value\0A\00"
@.str.8 = [37 x i8] c"pnmRead: Couldn't allocate %d bytes\0A\00"
@.str.9 = [33 x i8] c"pnmRead: (For a %d by %d image)\0A\00"
@.str.10 = [3 x i8] c"%d\00"
@.str.11 = [9 x i8] c"%d %d %d\00"
define i32 @pnmRead(i32* %0, i32* %1, i32* %2, float** %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca float**
%10 = alloca i8
%11 = alloca i32
%12 = alloca float
%13 = alloca i8
%14 = alloca i32
%15 = alloca i32
%16 = alloca float*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i8
%24 = alloca i8
%25 = alloca i8
%26 = alloca [3 x i8]
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store float** %3, float*** %9
%27 = load i32*, i32** %6
%28 = call i32 (i32*, i8*, ...) @fscanf(i32* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%29 = load i32*, i32** %6
%30 = call i32 @skipComments(i32* %29)
%31 = load i32*, i32** %6
%32 = call i32 (i32*, i8*, ...) @fscanf(i32* %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%33 = icmp ne i32 %32, 1
br i1 %33, label %34, label %37
34: ; preds = %4
%35 = load i32, i32* @stderr
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %470
37: ; preds = %4
%38 = load i32*, i32** %6
%39 = call i32 @skipComments(i32* %38)
%40 = load i32*, i32** %6
%41 = call i32 (i32*, i8*, ...) @fscanf(i32* %40, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %14)
%42 = icmp ne i32 %41, 1
br i1 %42, label %43, label %46
43: ; preds = %37
%44 = load i32, i32* @stderr
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %5
br label %470
46: ; preds = %37
%47 = load i32*, i32** %6
%48 = call i32 @skipComments(i32* %47)
%49 = load i32*, i32** %6
%50 = call i32 (i32*, i8*, ...) @fscanf(i32* %49, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %15)
%51 = icmp ne i32 %50, 1
br i1 %51, label %52, label %55
52: ; preds = %46
%53 = load i32, i32* @stderr
%54 = call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %5
br label %470
55: ; preds = %46
%56 = load i32*, i32** %6
%57 = call i32 @skipComments(i32* %56)
%58 = load i8, i8* %13
%59 = sext i8 %58 to i32
%60 = icmp ne i32 %59, 49
br i1 %60, label %61, label %73
61: ; preds = %55
%62 = load i8, i8* %13
%63 = sext i8 %62 to i32
%64 = icmp ne i32 %63, 52
br i1 %64, label %65, label %73
65: ; preds = %61
%66 = load i32*, i32** %6
%67 = call i32 (i32*, i8*, ...) @fscanf(i32* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %12)
%68 = icmp ne i32 %67, 1
br i1 %68, label %69, label %72
69: ; preds = %65
%70 = load i32, i32* @stderr
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %5
br label %470
72: ; preds = %65
br label %73
73: ; preds = %72, %61, %55
%74 = load i32, i32* %14
%75 = load i32, i32* %15
%76 = mul nsw i32 %74, %75
%77 = mul nsw i32 %76, 4
%78 = sext i32 %77 to i64
%79 = mul i64 %78, 4
%80 = trunc i64 %79 to i32
%81 = call float* @malloc(i32 %80)
store float* %81, float** %16
%82 = load float*, float** %16
%83 = icmp eq float* %82, null
br i1 %83, label %84, label %97
84: ; preds = %73
%85 = load i32, i32* @stderr
%86 = load i32, i32* %14
%87 = load i32, i32* %15
%88 = mul nsw i32 %86, %87
%89 = mul nsw i32 %88, 4
%90 = sext i32 %89 to i64
%91 = mul i64 %90, 4
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i64 %91)
%93 = load i32, i32* @stderr
%94 = load i32, i32* %14
%95 = load i32, i32* %15
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %93, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i32 %94, i32 %95)
store i32 0, i32* %5
br label %470
97: ; preds = %73
%98 = load i8, i8* %13
%99 = sext i8 %98 to i32
%100 = icmp ne i32 %99, 52
br i1 %100, label %101, label %104
101: ; preds = %97
%102 = load i32*, i32** %6
%103 = call i32 @skipComments(i32* %102)
br label %104
104: ; preds = %101, %97
%105 = load i8, i8* %13
%106 = sext i8 %105 to i32
%107 = icmp ne i32 %106, 52
br i1 %107, label %108, label %111
108: ; preds = %104
%109 = load i32*, i32** %6
%110 = call i32 @fread(i8* %10, i32 1, i32 1, i32* %109)
br label %111
111: ; preds = %108, %104
%112 = load i8, i8* %13
%113 = sext i8 %112 to i32
%114 = icmp eq i32 %113, 49
br i1 %114, label %115, label %161
115: ; preds = %111
store i32 0, i32* %11
br label %116
116: ; preds = %157, %115
%117 = load i32, i32* %11
%118 = load i32, i32* %14
%119 = load i32, i32* %15
%120 = mul nsw i32 %118, %119
%121 = icmp slt i32 %117, %120
br i1 %121, label %122, label %160
122: ; preds = %116
%123 = load i32*, i32** %6
%124 = call i32 (i32*, i8*, ...) @fscanf(i32* %123, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %17)
%125 = load i32, i32* %17
%126 = sub nsw i32 1, %125
store i32 %126, i32* %17
%127 = load i32, i32* %17
%128 = sitofp i32 %127 to float
%129 = load float*, float** %16
%130 = load i32, i32* %11
%131 = mul nsw i32 %130, 4
%132 = add nsw i32 %131, 0
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds float, float* %129, i64 %133
store float %128, float* %134
%135 = load i32, i32* %17
%136 = sitofp i32 %135 to float
%137 = load float*, float** %16
%138 = load i32, i32* %11
%139 = mul nsw i32 %138, 4
%140 = add nsw i32 %139, 1
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds float, float* %137, i64 %141
store float %136, float* %142
%143 = load i32, i32* %17
%144 = sitofp i32 %143 to float
%145 = load float*, float** %16
%146 = load i32, i32* %11
%147 = mul nsw i32 %146, 4
%148 = add nsw i32 %147, 2
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds float, float* %145, i64 %149
store float %144, float* %150
%151 = load float*, float** %16
%152 = load i32, i32* %11
%153 = mul nsw i32 %152, 4
%154 = add nsw i32 %153, 3
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds float, float* %151, i64 %155
store float 1.000000e+00, float* %156
br label %157
157: ; preds = %122
%158 = load i32, i32* %11
%159 = add nsw i32 %158, 1
store i32 %159, i32* %11
br label %116
160: ; preds = %116
br label %463
161: ; preds = %111
%162 = load i8, i8* %13
%163 = sext i8 %162 to i32
%164 = icmp eq i32 %163, 50
br i1 %164, label %165, label %215
165: ; preds = %161
store i32 0, i32* %11
br label %166
166: ; preds = %211, %165
%167 = load i32, i32* %11
%168 = load i32, i32* %14
%169 = load i32, i32* %15
%170 = mul nsw i32 %168, %169
%171 = icmp slt i32 %167, %170
br i1 %171, label %172, label %214
172: ; preds = %166
%173 = load i32*, i32** %6
%174 = call i32 (i32*, i8*, ...) @fscanf(i32* %173, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %18)
%175 = load i32, i32* %18
%176 = sitofp i32 %175 to float
%177 = load float, float* %12
%178 = fdiv float %176, %177
%179 = load float*, float** %16
%180 = load i32, i32* %11
%181 = mul nsw i32 %180, 4
%182 = add nsw i32 %181, 0
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds float, float* %179, i64 %183
store float %178, float* %184
%185 = load i32, i32* %18
%186 = sitofp i32 %185 to float
%187 = load float, float* %12
%188 = fdiv float %186, %187
%189 = load float*, float** %16
%190 = load i32, i32* %11
%191 = mul nsw i32 %190, 4
%192 = add nsw i32 %191, 1
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds float, float* %189, i64 %193
store float %188, float* %194
%195 = load i32, i32* %18
%196 = sitofp i32 %195 to float
%197 = load float, float* %12
%198 = fdiv float %196, %197
%199 = load float*, float** %16
%200 = load i32, i32* %11
%201 = mul nsw i32 %200, 4
%202 = add nsw i32 %201, 2
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds float, float* %199, i64 %203
store float %198, float* %204
%205 = load float*, float** %16
%206 = load i32, i32* %11
%207 = mul nsw i32 %206, 4
%208 = add nsw i32 %207, 3
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds float, float* %205, i64 %209
store float 1.000000e+00, float* %210
br label %211
211: ; preds = %172
%212 = load i32, i32* %11
%213 = add nsw i32 %212, 1
store i32 %213, i32* %11
br label %166
214: ; preds = %166
br label %462
215: ; preds = %161
%216 = load i8, i8* %13
%217 = sext i8 %216 to i32
%218 = icmp eq i32 %217, 51
br i1 %218, label %219, label %269
219: ; preds = %215
store i32 0, i32* %11
br label %220
220: ; preds = %265, %219
%221 = load i32, i32* %11
%222 = load i32, i32* %14
%223 = load i32, i32* %15
%224 = mul nsw i32 %222, %223
%225 = icmp slt i32 %221, %224
br i1 %225, label %226, label %268
226: ; preds = %220
%227 = load i32*, i32** %6
%228 = call i32 (i32*, i8*, ...) @fscanf(i32* %227, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32* %19, i32* %20, i32* %21)
%229 = load i32, i32* %19
%230 = sitofp i32 %229 to float
%231 = load float, float* %12
%232 = fdiv float %230, %231
%233 = load float*, float** %16
%234 = load i32, i32* %11
%235 = mul nsw i32 %234, 4
%236 = add nsw i32 %235, 0
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds float, float* %233, i64 %237
store float %232, float* %238
%239 = load i32, i32* %20
%240 = sitofp i32 %239 to float
%241 = load float, float* %12
%242 = fdiv float %240, %241
%243 = load float*, float** %16
%244 = load i32, i32* %11
%245 = mul nsw i32 %244, 4
%246 = add nsw i32 %245, 1
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds float, float* %243, i64 %247
store float %242, float* %248
%249 = load i32, i32* %21
%250 = sitofp i32 %249 to float
%251 = load float, float* %12
%252 = fdiv float %250, %251
%253 = load float*, float** %16
%254 = load i32, i32* %11
%255 = mul nsw i32 %254, 4
%256 = add nsw i32 %255, 2
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds float, float* %253, i64 %257
store float %252, float* %258
%259 = load float*, float** %16
%260 = load i32, i32* %11
%261 = mul nsw i32 %260, 4
%262 = add nsw i32 %261, 3
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds float, float* %259, i64 %263
store float 1.000000e+00, float* %264
br label %265
265: ; preds = %226
%266 = load i32, i32* %11
%267 = add nsw i32 %266, 1
store i32 %267, i32* %11
br label %220
268: ; preds = %220
br label %461
269: ; preds = %215
%270 = load i8, i8* %13
%271 = sext i8 %270 to i32
%272 = icmp eq i32 %271, 52
br i1 %272, label %273, label %340
273: ; preds = %269
store i32 0, i32* %22
store i32 0, i32* %11
br label %274
274: ; preds = %336, %273
%275 = load i32, i32* %11
%276 = load i32, i32* %14
%277 = load i32, i32* %15
%278 = mul nsw i32 %276, %277
%279 = icmp slt i32 %275, %278
br i1 %279, label %280, label %339
280: ; preds = %274
%281 = load i32, i32* %22
%282 = icmp eq i32 %281, 0
br i1 %282, label %283, label %286
283: ; preds = %280
%284 = load i32*, i32** %6
%285 = call i32 @fread(i8* %24, i32 1, i32 1, i32* %284)
br label %286
286: ; preds = %283, %280
%287 = load i8, i8* %24
%288 = zext i8 %287 to i32
%289 = load i32, i32* %22
%290 = sub nsw i32 7, %289
%291 = ashr i32 %288, %290
%292 = and i32 %291, 1
%293 = sub nsw i32 1, %292
%294 = trunc i32 %293 to i8
store i8 %294, i8* %23
%295 = load i8, i8* %23
%296 = uitofp i8 %295 to float
%297 = load float*, float** %16
%298 = load i32, i32* %11
%299 = mul nsw i32 %298, 4
%300 = add nsw i32 %299, 0
%301 = sext i32 %300 to i64
%302 = getelementptr inbounds float, float* %297, i64 %301
store float %296, float* %302
%303 = load i8, i8* %23
%304 = uitofp i8 %303 to float
%305 = load float*, float** %16
%306 = load i32, i32* %11
%307 = mul nsw i32 %306, 4
%308 = add nsw i32 %307, 1
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds float, float* %305, i64 %309
store float %304, float* %310
%311 = load i8, i8* %23
%312 = uitofp i8 %311 to float
%313 = load float*, float** %16
%314 = load i32, i32* %11
%315 = mul nsw i32 %314, 4
%316 = add nsw i32 %315, 2
%317 = sext i32 %316 to i64
%318 = getelementptr inbounds float, float* %313, i64 %317
store float %312, float* %318
%319 = load float*, float** %16
%320 = load i32, i32* %11
%321 = mul nsw i32 %320, 4
%322 = add nsw i32 %321, 3
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds float, float* %319, i64 %323
store float 1.000000e+00, float* %324
%325 = load i32, i32* %22
%326 = add nsw i32 %325, 1
store i32 %326, i32* %22
%327 = icmp eq i32 %326, 8
br i1 %327, label %334, label %328
328: ; preds = %286
%329 = load i32, i32* %11
%330 = add nsw i32 %329, 1
%331 = load i32, i32* %14
%332 = srem i32 %330, %331
%333 = icmp eq i32 %332, 0
br i1 %333, label %334, label %335
334: ; preds = %328, %286
store i32 0, i32* %22
br label %335
335: ; preds = %334, %328
br label %336
336: ; preds = %335
%337 = load i32, i32* %11
%338 = add nsw i32 %337, 1
store i32 %338, i32* %11
br label %274
339: ; preds = %274
br label %460
340: ; preds = %269
%341 = load i8, i8* %13
%342 = sext i8 %341 to i32
%343 = icmp eq i32 %342, 53
br i1 %343, label %344, label %397
344: ; preds = %340
store i32 0, i32* %11
br label %345
345: ; preds = %393, %344
%346 = load i32, i32* %11
%347 = load i32, i32* %14
%348 = load i32, i32* %15
%349 = mul nsw i32 %347, %348
%350 = icmp slt i32 %346, %349
br i1 %350, label %351, label %396
351: ; preds = %345
%352 = load i32*, i32** %6
%353 = call i32 @fread(i8* %25, i32 1, i32 1, i32* %352)
%354 = load i8, i8* %25
%355 = zext i8 %354 to i32
%356 = sitofp i32 %355 to float
%357 = load float, float* %12
%358 = fdiv float %356, %357
%359 = load float*, float** %16
%360 = load i32, i32* %11
%361 = mul nsw i32 %360, 4
%362 = add nsw i32 %361, 0
%363 = sext i32 %362 to i64
%364 = getelementptr inbounds float, float* %359, i64 %363
store float %358, float* %364
%365 = load i8, i8* %25
%366 = zext i8 %365 to i32
%367 = sitofp i32 %366 to float
%368 = load float, float* %12
%369 = fdiv float %367, %368
%370 = load float*, float** %16
%371 = load i32, i32* %11
%372 = mul nsw i32 %371, 4
%373 = add nsw i32 %372, 1
%374 = sext i32 %373 to i64
%375 = getelementptr inbounds float, float* %370, i64 %374
store float %369, float* %375
%376 = load i8, i8* %25
%377 = zext i8 %376 to i32
%378 = sitofp i32 %377 to float
%379 = load float, float* %12
%380 = fdiv float %378, %379
%381 = load float*, float** %16
%382 = load i32, i32* %11
%383 = mul nsw i32 %382, 4
%384 = add nsw i32 %383, 2
%385 = sext i32 %384 to i64
%386 = getelementptr inbounds float, float* %381, i64 %385
store float %380, float* %386
%387 = load float*, float** %16
%388 = load i32, i32* %11
%389 = mul nsw i32 %388, 4
%390 = add nsw i32 %389, 3
%391 = sext i32 %390 to i64
%392 = getelementptr inbounds float, float* %387, i64 %391
store float 1.000000e+00, float* %392
br label %393
393: ; preds = %351
%394 = load i32, i32* %11
%395 = add nsw i32 %394, 1
store i32 %395, i32* %11
br label %345
396: ; preds = %345
br label %459
397: ; preds = %340
%398 = load i8, i8* %13
%399 = sext i8 %398 to i32
%400 = icmp eq i32 %399, 54
br i1 %400, label %401, label %458
401: ; preds = %397
store i32 0, i32* %11
br label %402
402: ; preds = %454, %401
%403 = load i32, i32* %11
%404 = load i32, i32* %14
%405 = load i32, i32* %15
%406 = mul nsw i32 %404, %405
%407 = icmp slt i32 %403, %406
br i1 %407, label %408, label %457
408: ; preds = %402
%409 = getelementptr inbounds [3 x i8], [3 x i8]* %26, i64 0, i64 0
%410 = load i32*, i32** %6
%411 = call i32 @fread(i8* %409, i32 3, i32 1, i32* %410)
%412 = getelementptr inbounds [3 x i8], [3 x i8]* %26, i64 0, i64 0
%413 = load i8, i8* %412
%414 = zext i8 %413 to i32
%415 = sitofp i32 %414 to float
%416 = load float, float* %12
%417 = fdiv float %415, %416
%418 = load float*, float** %16
%419 = load i32, i32* %11
%420 = mul nsw i32 %419, 4
%421 = add nsw i32 %420, 0
%422 = sext i32 %421 to i64
%423 = getelementptr inbounds float, float* %418, i64 %422
store float %417, float* %423
%424 = getelementptr inbounds [3 x i8], [3 x i8]* %26, i64 0, i64 1
%425 = load i8, i8* %424
%426 = zext i8 %425 to i32
%427 = sitofp i32 %426 to float
%428 = load float, float* %12
%429 = fdiv float %427, %428
%430 = load float*, float** %16
%431 = load i32, i32* %11
%432 = mul nsw i32 %431, 4
%433 = add nsw i32 %432, 1
%434 = sext i32 %433 to i64
%435 = getelementptr inbounds float, float* %430, i64 %434
store float %429, float* %435
%436 = getelementptr inbounds [3 x i8], [3 x i8]* %26, i64 0, i64 2
%437 = load i8, i8* %436
%438 = zext i8 %437 to i32
%439 = sitofp i32 %438 to float
%440 = load float, float* %12
%441 = fdiv float %439, %440
%442 = load float*, float** %16
%443 = load i32, i32* %11
%444 = mul nsw i32 %443, 4
%445 = add nsw i32 %444, 2
%446 = sext i32 %445 to i64
%447 = getelementptr inbounds float, float* %442, i64 %446
store float %441, float* %447
%448 = load float*, float** %16
%449 = load i32, i32* %11
%450 = mul nsw i32 %449, 4
%451 = add nsw i32 %450, 3
%452 = sext i32 %451 to i64
%453 = getelementptr inbounds float, float* %448, i64 %452
store float 1.000000e+00, float* %453
br label %454
454: ; preds = %408
%455 = load i32, i32* %11
%456 = add nsw i32 %455, 1
store i32 %456, i32* %11
br label %402
457: ; preds = %402
br label %458
458: ; preds = %457, %397
br label %459
459: ; preds = %458, %396
br label %460
460: ; preds = %459, %339
br label %461
461: ; preds = %460, %268
br label %462
462: ; preds = %461, %214
br label %463
463: ; preds = %462, %160
%464 = load i32, i32* %14
%465 = load i32*, i32** %7
store i32 %464, i32* %465
%466 = load i32, i32* %15
%467 = load i32*, i32** %8
store i32 %466, i32* %467
%468 = load float*, float** %16
%469 = load float**, float*** %9
store float* %468, float** %469
store i32 1, i32* %5
br label %470
470: ; preds = %463, %84, %69, %52, %43, %34
%471 = load i32, i32* %5
ret i32 %471
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [5 x i8] c"P%c \00"
@stderr = global i32 0
@.str.2 = [38 x i8] c"pnmRead: Had trouble reading PNM tag\0A\00"
@.str.3 = [4 x i8] c"%d \00"
@.str.4 = [40 x i8] c"pnmRead: Had trouble reading PNM width\0A\00"
@.str.5 = [41 x i8] c"pnmRead: Had trouble reading PNM height\0A\00"
@.str.6 = [3 x i8] c"%f\00"
@.str.7 = [44 x i8] c"pnmRead: Had trouble reading PNM max value\0A\00"
@.str.8 = [37 x i8] c"pnmRead: Couldn't allocate %d bytes\0A\00"
@.str.9 = [33 x i8] c"pnmRead: (For a %d by %d image)\0A\00"
@.str.10 = [3 x i8] c"%d\00"
@.str.11 = [9 x i8] c"%d %d %d\00"
define i32 @pnmRead(i32* %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, float** nocapture writeonly %3) {
%5 = alloca i8
%6 = alloca float
%7 = alloca i8
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8
%16 = alloca i8
%17 = alloca [3 x i8]
%18 = bitcast float* %6 to i8*
%19 = bitcast i32* %8 to i8*
%20 = bitcast i32* %9 to i8*
%21 = tail call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%22 = tail call i32 @skipComments(i32* %0)
%23 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%24 = icmp eq i32 %23, 1
br i1 %24, label %28, label %25
25: ; preds = %4
%26 = load i32, i32* @stderr
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
br label %290
28: ; preds = %4
%29 = call i32 @skipComments(i32* %0)
%30 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%31 = icmp eq i32 %30, 1
br i1 %31, label %35, label %32
32: ; preds = %28
%33 = load i32, i32* @stderr
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
br label %290
35: ; preds = %28
%36 = call i32 @skipComments(i32* %0)
%37 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %9)
%38 = icmp eq i32 %37, 1
br i1 %38, label %42, label %39
39: ; preds = %35
%40 = load i32, i32* @stderr
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
br label %290
42: ; preds = %35
%43 = call i32 @skipComments(i32* %0)
%44 = load i8, i8* %7
switch i8 %44, label %45 [
i8 52, label %51
i8 49, label %51
]
45: ; preds = %42
%46 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %6)
%47 = icmp eq i32 %46, 1
br i1 %47, label %51, label %48
48: ; preds = %45
%49 = load i32, i32* @stderr
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0))
br label %290
51: ; preds = %42, %42, %45
%52 = load i32, i32* %8
%53 = load i32, i32* %9
%54 = mul nsw i32 %53, %52
%55 = shl i32 %54, 4
%56 = call float* @malloc(i32 %55)
%57 = icmp eq float* %56, null
br i1 %57, label %58, label %68
58: ; preds = %51
%59 = load i32, i32* @stderr
%60 = shl nsw i32 %54, 2
%61 = sext i32 %60 to i64
%62 = shl nsw i64 %61, 2
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i64 %62)
%64 = load i32, i32* @stderr
%65 = load i32, i32* %8
%66 = load i32, i32* %9
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i32 %65, i32 %66)
br label %290
68: ; preds = %51
%69 = load i8, i8* %7
%70 = icmp eq i8 %69, 52
br i1 %70, label %95, label %71
71: ; preds = %68
%72 = call i32 @skipComments(i32* %0)
%73 = load i8, i8* %7
%74 = icmp eq i8 %73, 52
br i1 %74, label %95, label %75
75: ; preds = %71
%76 = call i32 @fread(i8* %5, i32 1, i32 1, i32* %0)
%77 = load i8, i8* %7
switch i8 %77, label %78 [
i8 49, label %116
i8 50, label %109
i8 51, label %100
i8 52, label %95
i8 53, label %90
i8 54, label %81
]
78: ; preds = %75
%79 = load i32, i32* %8
%80 = load i32, i32* %9
br label %287
81: ; preds = %75
%82 = load i32, i32* %8
%83 = load i32, i32* %9
%84 = mul nsw i32 %83, %82
%85 = icmp sgt i32 %84, 0
br i1 %85, label %86, label %287
86: ; preds = %81
%87 = getelementptr inbounds [3 x i8], [3 x i8]* %17, i64 0, i64 0
%88 = getelementptr inbounds [3 x i8], [3 x i8]* %17, i64 0, i64 1
%89 = getelementptr inbounds [3 x i8], [3 x i8]* %17, i64 0, i64 2
br label %255
90: ; preds = %75
%91 = load i32, i32* %8
%92 = load i32, i32* %9
%93 = mul nsw i32 %92, %91
%94 = icmp sgt i32 %93, 0
br i1 %94, label %236, label %287
95: ; preds = %68, %71, %75
%96 = load i32, i32* %8
%97 = load i32, i32* %9
%98 = mul nsw i32 %97, %96
%99 = icmp sgt i32 %98, 0
br i1 %99, label %192, label %287
100: ; preds = %75
%101 = load i32, i32* %8
%102 = load i32, i32* %9
%103 = mul nsw i32 %102, %101
%104 = icmp sgt i32 %103, 0
br i1 %104, label %105, label %287
105: ; preds = %100
%106 = bitcast i32* %12 to i8*
%107 = bitcast i32* %13 to i8*
%108 = bitcast i32* %14 to i8*
br label %160
109: ; preds = %75
%110 = load i32, i32* %8
%111 = load i32, i32* %9
%112 = mul nsw i32 %111, %110
%113 = icmp sgt i32 %112, 0
br i1 %113, label %114, label %287
114: ; preds = %109
%115 = bitcast i32* %11 to i8*
br label %141
116: ; preds = %75
%117 = load i32, i32* %8
%118 = load i32, i32* %9
%119 = mul nsw i32 %118, %117
%120 = icmp sgt i32 %119, 0
br i1 %120, label %121, label %287
121: ; preds = %116
%122 = bitcast i32* %10 to i8*
br label %123
123: ; preds = %121, %123
%124 = phi i64 [ 0, %121 ], [ %135, %123 ]
%125 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %10)
%126 = load i32, i32* %10
%127 = sub nsw i32 1, %126
%128 = sitofp i32 %127 to float
%129 = shl i64 %124, 2
%130 = and i64 %129, 4294967292
%131 = getelementptr inbounds float, float* %56, i64 %130
%132 = insertelement <4 x float> <float poison, float 1.000000e+00, float poison, float poison>, float %128, i64 0
%133 = shufflevector <4 x float> %132, <4 x float> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
%134 = bitcast float* %131 to <4 x float>*
store <4 x float> %133, <4 x float>* %134
%135 = add nuw nsw i64 %124, 1
%136 = load i32, i32* %8
%137 = load i32, i32* %9
%138 = mul nsw i32 %137, %136
%139 = sext i32 %138 to i64
%140 = icmp slt i64 %135, %139
br i1 %140, label %123, label %287
141: ; preds = %114, %141
%142 = phi i64 [ 0, %114 ], [ %154, %141 ]
%143 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %11)
%144 = load i32, i32* %11
%145 = sitofp i32 %144 to float
%146 = load float, float* %6
%147 = fdiv float %145, %146
%148 = shl i64 %142, 2
%149 = and i64 %148, 4294967292
%150 = getelementptr inbounds float, float* %56, i64 %149
%151 = insertelement <4 x float> <float poison, float 1.000000e+00, float poison, float poison>, float %147, i64 0
%152 = shufflevector <4 x float> %151, <4 x float> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
%153 = bitcast float* %150 to <4 x float>*
store <4 x float> %152, <4 x float>* %153
%154 = add nuw nsw i64 %142, 1
%155 = load i32, i32* %8
%156 = load i32, i32* %9
%157 = mul nsw i32 %156, %155
%158 = sext i32 %157 to i64
%159 = icmp slt i64 %154, %158
br i1 %159, label %141, label %287
160: ; preds = %105, %160
%161 = phi i64 [ 0, %105 ], [ %186, %160 ]
%162 = call i32 (i32*, i8*, ...) @fscanf(i32* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32* %12, i32* %13, i32* %14)
%163 = load i32, i32* %12
%164 = sitofp i32 %163 to float
%165 = load float, float* %6
%166 = fdiv float %164, %165
%167 = trunc i64 %161 to i32
%168 = shl nsw i32 %167, 2
%169 = zext i32 %168 to i64
%170 = getelementptr inbounds float, float* %56, i64 %169
store float %166, float* %170
%171 = load i32, i32* %13
%172 = sitofp i32 %171 to float
%173 = fdiv float %172, %165
%174 = or i32 %168, 1
%175 = zext i32 %174 to i64
%176 = getelementptr inbounds float, float* %56, i64 %175
store float %173, float* %176
%177 = load i32, i32* %14
%178 = sitofp i32 %177 to float
%179 = fdiv float %178, %165
%180 = or i32 %168, 2
%181 = zext i32 %180 to i64
%182 = getelementptr inbounds float, float* %56, i64 %181
store float %179, float* %182
%183 = or i32 %168, 3
%184 = zext i32 %183 to i64
%185 = getelementptr inbounds float, float* %56, i64 %184
store float 1.000000e+00, float* %185
%186 = add nuw nsw i64 %161, 1
%187 = load i32, i32* %8
%188 = load i32, i32* %9
%189 = mul nsw i32 %188, %187
%190 = sext i32 %189 to i64
%191 = icmp slt i64 %186, %190
br i1 %191, label %160, label %287
192: ; preds = %95, %228
%193 = phi i64 [ %229, %228 ], [ 0, %95 ]
%194 = phi i32 [ %231, %228 ], [ 0, %95 ]
%195 = icmp eq i32 %194, 0
br i1 %195, label %196, label %199
196: ; preds = %192
%197 = call i32 @fread(i8* %15, i32 1, i32 1, i32* %0)
%198 = load i8, i8* %15
br label %199
199: ; preds = %196, %192
%200 = phi i8 [ %198, %196 ], [ undef, %192 ]
%201 = zext i8 %200 to i32
%202 = sub nsw i32 7, %194
%203 = lshr i32 %201, %202
%204 = trunc i32 %203 to i8
%205 = and i8 %204, 1
%206 = xor i8 %205, 1
%207 = uitofp i8 %206 to float
%208 = shl i64 %193, 2
%209 = and i64 %208, 4294967292
%210 = getelementptr inbounds float, float* %56, i64 %209
%211 = insertelement <4 x float> <float poison, float 1.000000e+00, float poison, float poison>, float %207, i64 0
%212 = shufflevector <4 x float> %211, <4 x float> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
%213 = bitcast float* %210 to <4 x float>*
store <4 x float> %212, <4 x float>* %213
%214 = add nsw i32 %194, 1
%215 = icmp eq i32 %214, 8
br i1 %215, label %216, label %219
216: ; preds = %199
%217 = load i32, i32* %8
%218 = add nuw nsw i64 %193, 1
br label %225
219: ; preds = %199
%220 = add nuw nsw i64 %193, 1
%221 = load i32, i32* %8
%222 = trunc i64 %220 to i32
%223 = srem i32 %222, %221
%224 = icmp eq i32 %223, 0
br i1 %224, label %225, label %228
225: ; preds = %216, %219
%226 = phi i64 [ %218, %216 ], [ %220, %219 ]
%227 = phi i32 [ %217, %216 ], [ %221, %219 ]
br label %228
228: ; preds = %225, %219
%229 = phi i64 [ %226, %225 ], [ %220, %219 ]
%230 = phi i32 [ %227, %225 ], [ %221, %219 ]
%231 = phi i32 [ 0, %225 ], [ %214, %219 ]
%232 = load i32, i32* %9
%233 = mul nsw i32 %232, %230
%234 = sext i32 %233 to i64
%235 = icmp slt i64 %229, %234
br i1 %235, label %192, label %287
236: ; preds = %90, %236
%237 = phi i64 [ %249, %236 ], [ 0, %90 ]
%238 = call i32 @fread(i8* %16, i32 1, i32 1, i32* %0)
%239 = load i8, i8* %16
%240 = uitofp i8 %239 to float
%241 = load float, float* %6
%242 = fdiv float %240, %241
%243 = shl i64 %237, 2
%244 = and i64 %243, 4294967292
%245 = getelementptr inbounds float, float* %56, i64 %244
%246 = insertelement <4 x float> <float poison, float 1.000000e+00, float poison, float poison>, float %242, i64 0
%247 = shufflevector <4 x float> %246, <4 x float> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
%248 = bitcast float* %245 to <4 x float>*
store <4 x float> %247, <4 x float>* %248
%249 = add nuw nsw i64 %237, 1
%250 = load i32, i32* %8
%251 = load i32, i32* %9
%252 = mul nsw i32 %251, %250
%253 = sext i32 %252 to i64
%254 = icmp slt i64 %249, %253
br i1 %254, label %236, label %287
255: ; preds = %86, %255
%256 = phi i64 [ 0, %86 ], [ %281, %255 ]
%257 = call i32 @fread(i8* %87, i32 3, i32 1, i32* %0)
%258 = load i8, i8* %87
%259 = uitofp i8 %258 to float
%260 = load float, float* %6
%261 = fdiv float %259, %260
%262 = trunc i64 %256 to i32
%263 = shl nsw i32 %262, 2
%264 = zext i32 %263 to i64
%265 = getelementptr inbounds float, float* %56, i64 %264
store float %261, float* %265
%266 = load i8, i8* %88
%267 = uitofp i8 %266 to float
%268 = fdiv float %267, %260
%269 = or i32 %263, 1
%270 = zext i32 %269 to i64
%271 = getelementptr inbounds float, float* %56, i64 %270
store float %268, float* %271
%272 = load i8, i8* %89
%273 = uitofp i8 %272 to float
%274 = fdiv float %273, %260
%275 = or i32 %263, 2
%276 = zext i32 %275 to i64
%277 = getelementptr inbounds float, float* %56, i64 %276
store float %274, float* %277
%278 = or i32 %263, 3
%279 = zext i32 %278 to i64
%280 = getelementptr inbounds float, float* %56, i64 %279
store float 1.000000e+00, float* %280
%281 = add nuw nsw i64 %256, 1
%282 = load i32, i32* %8
%283 = load i32, i32* %9
%284 = mul nsw i32 %283, %282
%285 = sext i32 %284 to i64
%286 = icmp slt i64 %281, %285
br i1 %286, label %255, label %287
287: ; preds = %255, %236, %160, %141, %123, %228, %78, %81, %90, %95, %100, %109, %116
%288 = phi i32 [ %80, %78 ], [ %83, %81 ], [ %92, %90 ], [ %97, %95 ], [ %102, %100 ], [ %111, %109 ], [ %118, %116 ], [ %232, %228 ], [ %137, %123 ], [ %156, %141 ], [ %188, %160 ], [ %251, %236 ], [ %283, %255 ]
%289 = phi i32 [ %79, %78 ], [ %82, %81 ], [ %91, %90 ], [ %96, %95 ], [ %101, %100 ], [ %110, %109 ], [ %117, %116 ], [ %230, %228 ], [ %136, %123 ], [ %155, %141 ], [ %187, %160 ], [ %250, %236 ], [ %282, %255 ]
store i32 %289, i32* %1
store i32 %288, i32* %2
store float* %56, float** %3
br label %290
290: ; preds = %287, %58, %48, %39, %32, %25
%291 = phi i32 [ 0, %25 ], [ 0, %32 ], [ 0, %39 ], [ 0, %48 ], [ 0, %58 ], [ 1, %287 ]
ret i32 %291
}