#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 */
char EOF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int fread(char *, int, int, int /*<<< orphan*/ *);
char getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *stderr;
char *tmpnam(int /*<<< orphan*/ *);
char ungetc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ unlink(char *);
int main(int argc, char *argv[]) {
  char *name;
  FILE *fp = NULL;
  int retval = 0;
  int c;
  char buffer[64];
  name = tmpnam(NULL);
  fp = fopen(name, "w");
  if (!(fp != NULL)) {
    fputs("test failed: "
          "fp != NULL"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  }
  fputs("bla", fp);
  fclose(fp);
  fp = NULL;
  fp = fopen(name, "r");
  if (!(fp != NULL)) {
    fputs("test failed: "
          "fp != NULL"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(ungetc('z', fp) == 'z')) {
    fputs("test failed: "
          "ungetc ('z', fp) == 'z'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(getc(fp) == 'z')) {
    fputs("test failed: "
          "getc (fp) == 'z'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(getc(fp) == 'b')) {
    fputs("test failed: "
          "getc (fp) == 'b'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(getc(fp) == 'l')) {
    fputs("test failed: "
          "getc (fp) == 'l'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(ungetc('m', fp) == 'm')) {
    fputs("test failed: "
          "ungetc ('m', fp) == 'm'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(getc(fp) == 'm')) {
    fputs("test failed: "
          "getc (fp) == 'm'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!((c = getc(fp)) == 'a')) {
    fputs("test failed: "
          "(c = getc (fp)) == 'a'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(getc(fp) == EOF)) {
    fputs("test failed: "
          "getc (fp) == EOF"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(ungetc(c, fp) == c)) {
    fputs("test failed: "
          "ungetc (c, fp) == c"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(feof(fp) == 0)) {
    fputs("test failed: "
          "feof (fp) == 0"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(getc(fp) == c)) {
    fputs("test failed: "
          "getc (fp) == c"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(getc(fp) == EOF)) {
    fputs("test failed: "
          "getc (fp) == EOF"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  fclose(fp);
  fp = NULL;
  fp = fopen(name, "r");
  if (!(fp != NULL)) {
    fputs("test failed: "
          "fp != NULL"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(getc(fp) == 'b')) {
    fputs("test failed: "
          "getc (fp) == 'b'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(getc(fp) == 'l')) {
    fputs("test failed: "
          "getc (fp) == 'l'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(ungetc('b', fp) == 'b')) {
    fputs("test failed: "
          "ungetc ('b', fp) == 'b'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(fread(buffer, 1, 64, fp) == 2)) {
    fputs("test failed: "
          "fread (buffer, 1, 64, fp) == 2"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(buffer[0] == 'b')) {
    fputs("test failed: "
          "buffer[0] == 'b'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
  if (!(buffer[1] == 'a')) {
    fputs("test failed: "
          "buffer[1] == 'a'"
          "\n",
          stderr);
    retval = 1;
    goto the_end;
  };
the_end:
  if (fp != NULL)
    fclose(fp);
  unlink(name);
  return retval;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10a0 <tmpnam@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe33(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1203 <main+0x73>
mov    0x2df0(%rip),%rax
mov    (%rax),%rsi
lea    0xe10(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rsi
lea    0xe0d(%rip),%rdi
call   1060 <fputs@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xdf0(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1265 <main+0xd5>
mov    0x2d8e(%rip),%rax
mov    (%rax),%rsi
lea    0xdae(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rsi
mov    $0x7a,%edi
call   1080 <ungetc@plt>
movsbl %al,%eax
cmp    $0x7a,%eax
je     12a1 <main+0x111>
mov    0x2d52(%rip),%rax
mov    (%rax),%rsi
lea    0xd91(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   10b0 <getc@plt>
movsbl %al,%eax
cmp    $0x7a,%eax
je     12d8 <main+0x148>
mov    0x2d1b(%rip),%rax
mov    (%rax),%rsi
lea    0xd80(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   10b0 <getc@plt>
movsbl %al,%eax
cmp    $0x62,%eax
je     130f <main+0x17f>
mov    0x2ce4(%rip),%rax
mov    (%rax),%rsi
lea    0xd68(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   10b0 <getc@plt>
movsbl %al,%eax
cmp    $0x6c,%eax
je     1346 <main+0x1b6>
mov    0x2cad(%rip),%rax
mov    (%rax),%rsi
lea    0xd50(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rsi
mov    $0x6d,%edi
call   1080 <ungetc@plt>
movsbl %al,%eax
cmp    $0x6d,%eax
je     1382 <main+0x1f2>
mov    0x2c71(%rip),%rax
mov    (%rax),%rsi
lea    0xd33(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   10b0 <getc@plt>
movsbl %al,%eax
cmp    $0x6d,%eax
je     13b9 <main+0x229>
mov    0x2c3a(%rip),%rax
mov    (%rax),%rsi
lea    0xd22(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   10b0 <getc@plt>
movsbl %al,%eax
mov    %eax,-0x28(%rbp)
cmp    $0x61,%eax
je     13f3 <main+0x263>
mov    0x2c00(%rip),%rax
mov    (%rax),%rsi
lea    0xd07(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   10b0 <getc@plt>
movsbl %al,%eax
mov    0x2be2(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1433 <main+0x2a3>
mov    0x2bc0(%rip),%rax
mov    (%rax),%rsi
lea    0xcec(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x28(%rbp),%eax
mov    -0x20(%rbp),%rsi
movsbl %al,%edi
call   1080 <ungetc@plt>
movsbl %al,%eax
cmp    -0x28(%rbp),%eax
je     1470 <main+0x2e0>
mov    0x2b83(%rip),%rax
mov    (%rax),%rsi
lea    0xcce(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%rax
je     14a5 <main+0x315>
mov    0x2b4e(%rip),%rax
mov    (%rax),%rsi
lea    0xcbb(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   10b0 <getc@plt>
movsbl %al,%eax
cmp    -0x28(%rbp),%eax
je     14dc <main+0x34c>
mov    0x2b17(%rip),%rax
mov    (%rax),%rsi
lea    0xca1(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   10b0 <getc@plt>
movsbl %al,%eax
mov    0x2af9(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     151c <main+0x38c>
mov    0x2ad7(%rip),%rax
mov    (%rax),%rsi
lea    0xc03(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xae7(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    156e <main+0x3de>
mov    0x2a85(%rip),%rax
mov    (%rax),%rsi
lea    0xaa5(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   10b0 <getc@plt>
movsbl %al,%eax
cmp    $0x62,%eax
je     15a5 <main+0x415>
mov    0x2a4e(%rip),%rax
mov    (%rax),%rsi
lea    0xad2(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rdi
call   10b0 <getc@plt>
movsbl %al,%eax
cmp    $0x6c,%eax
je     15dc <main+0x44c>
mov    0x2a17(%rip),%rax
mov    (%rax),%rsi
lea    0xaba(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
mov    -0x20(%rbp),%rsi
mov    $0x62,%edi
call   1080 <ungetc@plt>
movsbl %al,%eax
cmp    $0x62,%eax
je     1618 <main+0x488>
mov    0x29db(%rip),%rax
mov    (%rax),%rsi
lea    0xb82(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
lea    -0x70(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    $0x1,%esi
mov    $0x40,%edx
call   1040 <fread@plt>
cmp    $0x2,%eax
je     165a <main+0x4ca>
mov    0x2999(%rip),%rax
mov    (%rax),%rsi
lea    0xb66(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
movsbl -0x70(%rbp),%eax
cmp    $0x62,%eax
je     1689 <main+0x4f9>
mov    0x296a(%rip),%rax
mov    (%rax),%rsi
lea    0xb64(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
movsbl -0x6f(%rbp),%eax
cmp    $0x61,%eax
je     16b8 <main+0x528>
mov    0x293b(%rip),%rax
mov    (%rax),%rsi
lea    0xb54(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x24(%rbp)
jmp    16bd <main+0x52d>
jmp    16bd <main+0x52d>
cmpq   $0x0,-0x20(%rbp)
je     16d1 <main+0x541>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x24(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
xor    %edi,%edi
call   10a0 <tmpnam@plt>
mov    %rax,%rbx
lea    0xe57(%rip),%rsi
mov    %rax,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     140d <main+0x27d>
mov    %rax,%rbp
lea    0xe57(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1090 <fwrite@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
lea    0xe3a(%rip),%rsi
mov    %rbx,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     140d <main+0x27d>
mov    %rax,%r14
mov    $0x7a,%edi
mov    %rax,%rsi
call   1070 <ungetc@plt>
cmp    $0x7a,%al
jne    12cc <main+0x13c>
mov    %r14,%rdi
call   10b0 <getc@plt>
cmp    $0x7a,%al
jne    12e7 <main+0x157>
mov    %r14,%rdi
call   10b0 <getc@plt>
cmp    $0x62,%al
jne    1434 <main+0x2a4>
mov    %r14,%rdi
call   10b0 <getc@plt>
cmp    $0x6c,%al
jne    1447 <main+0x2b7>
mov    $0x6d,%edi
mov    %r14,%rsi
call   1070 <ungetc@plt>
cmp    $0x6d,%al
jne    12fd <main+0x16d>
mov    %r14,%rdi
call   10b0 <getc@plt>
cmp    $0x6d,%al
jne    1310 <main+0x180>
mov    %r14,%rdi
call   10b0 <getc@plt>
cmp    $0x61,%al
jne    1326 <main+0x196>
mov    %r14,%rdi
call   10b0 <getc@plt>
mov    0x2d66(%rip),%rbp
cmp    0x0(%rbp),%al
jne    1487 <main+0x2f7>
mov    $0x61,%edi
mov    %r14,%rsi
call   1070 <ungetc@plt>
cmp    $0x61,%al
jne    1341 <main+0x1b1>
mov    %r14,%rdi
call   1060 <feof@plt>
test   %rax,%rax
je     135c <main+0x1cc>
mov    0x2d20(%rip),%rax
mov    (%rax),%rcx
lea    0xe8d(%rip),%rdi
mov    $0x1c,%esi
jmp    145d <main+0x2cd>
mov    0x2d05(%rip),%rax
mov    (%rax),%rcx
lea    0xd44(%rip),%rdi
mov    $0x25,%esi
jmp    145d <main+0x2cd>
mov    0x2cea(%rip),%rax
mov    (%rax),%rcx
lea    0xd4f(%rip),%rdi
jmp    1458 <main+0x2c8>
mov    0x2cd4(%rip),%rax
mov    (%rax),%rcx
lea    0xd96(%rip),%rdi
jmp    12dd <main+0x14d>
mov    0x2cc1(%rip),%rax
mov    (%rax),%rcx
lea    0xda9(%rip),%rdi
jmp    1458 <main+0x2c8>
mov    0x2cab(%rip),%rax
mov    (%rax),%rcx
lea    0xdb2(%rip),%rdi
mov    $0x24,%esi
jmp    145d <main+0x2cd>
mov    0x2c90(%rip),%rax
mov    (%rax),%rcx
lea    0xddb(%rip),%rdi
mov    $0x21,%esi
jmp    145d <main+0x2cd>
mov    %r14,%rdi
call   10b0 <getc@plt>
cmp    $0x61,%al
jne    149a <main+0x30a>
mov    %r14,%rdi
call   10b0 <getc@plt>
cmp    0x0(%rbp),%al
jne    1487 <main+0x2f7>
mov    %r14,%rdi
call   1050 <fclose@plt>
lea    0xc93(%rip),%rsi
mov    %rbx,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     140d <main+0x27d>
mov    %rax,%r14
mov    %rax,%rdi
call   10b0 <getc@plt>
cmp    $0x62,%al
jne    1434 <main+0x2a4>
mov    %r14,%rdi
call   10b0 <getc@plt>
cmp    $0x6c,%al
jne    1447 <main+0x2b7>
mov    $0x62,%edi
mov    %r14,%rsi
call   1070 <ungetc@plt>
cmp    $0x62,%al
jne    14b2 <main+0x322>
mov    %rsp,%rdi
mov    $0x1,%ebp
mov    $0x1,%esi
mov    $0x40,%edx
mov    %r14,%rcx
call   1040 <fread@plt>
cmp    $0x2,%eax
jne    14c8 <main+0x338>
cmpb   $0x62,(%rsp)
jne    14e0 <main+0x350>
cmpb   $0x61,0x1(%rsp)
jne    14f3 <main+0x363>
xor    %ebp,%ebp
jmp    146c <main+0x2dc>
mov    0x2bc4(%rip),%rax
mov    (%rax),%rcx
lea    0xbe4(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
call   1090 <fwrite@plt>
mov    $0x1,%ebp
jmp    1474 <main+0x2e4>
mov    0x2b9d(%rip),%rax
mov    (%rax),%rcx
lea    0xc21(%rip),%rdi
jmp    1458 <main+0x2c8>
mov    0x2b8a(%rip),%rax
mov    (%rax),%rcx
lea    0xc2d(%rip),%rdi
mov    $0x1e,%esi
mov    $0x1,%edx
call   1090 <fwrite@plt>
mov    $0x1,%ebp
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
call   1030 <unlink@plt>
mov    %ebp,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    0x2b4a(%rip),%rax
mov    (%rax),%rcx
lea    0xc76(%rip),%rdi
jmp    1458 <main+0x2c8>
mov    0x2b37(%rip),%rax
mov    (%rax),%rcx
lea    0xcc1(%rip),%rdi
mov    $0x1c,%esi
jmp    145d <main+0x2cd>
mov    0x2b1f(%rip),%rax
mov    (%rax),%rcx
lea    0xcc6(%rip),%rdi
jmp    12dd <main+0x14d>
mov    0x2b09(%rip),%rax
mov    (%rax),%rcx
lea    0xcd6(%rip),%rdi
mov    $0x2c,%esi
jmp    1509 <main+0x379>
mov    0x2af1(%rip),%rax
mov    (%rax),%rcx
lea    0xceb(%rip),%rdi
jmp    1504 <main+0x374>
mov    0x2ade(%rip),%rax
mov    (%rax),%rcx
lea    0xcf7(%rip),%rdi
mov    $0x1e,%esi
mov    $0x1,%edx
call   1090 <fwrite@plt>
jmp    146c <main+0x2dc>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [25 x i8] c"test failed: fp != NULL\0A\00"
@stderr = global i32* null
@.str.2 = [4 x i8] c"bla\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [38 x i8] c"test failed: ungetc ('z', fp) == 'z'\0A\00"
@.str.5 = [31 x i8] c"test failed: getc (fp) == 'z'\0A\00"
@.str.6 = [31 x i8] c"test failed: getc (fp) == 'b'\0A\00"
@.str.7 = [31 x i8] c"test failed: getc (fp) == 'l'\0A\00"
@.str.8 = [38 x i8] c"test failed: ungetc ('m', fp) == 'm'\0A\00"
@.str.9 = [31 x i8] c"test failed: getc (fp) == 'm'\0A\00"
@.str.10 = [37 x i8] c"test failed: (c = getc (fp)) == 'a'\0A\00"
@EOF = global i8 0
@.str.11 = [31 x i8] c"test failed: getc (fp) == EOF\0A\00"
@.str.12 = [34 x i8] c"test failed: ungetc (c, fp) == c\0A\00"
@.str.13 = [29 x i8] c"test failed: feof (fp) == 0\0A\00"
@.str.14 = [29 x i8] c"test failed: getc (fp) == c\0A\00"
@.str.15 = [38 x i8] c"test failed: ungetc ('b', fp) == 'b'\0A\00"
@.str.16 = [45 x i8] c"test failed: fread (buffer, 1, 64, fp) == 2\0A\00"
@.str.17 = [31 x i8] c"test failed: buffer[0] == 'b'\0A\00"
@.str.18 = [31 x i8] c"test failed: buffer[1] == 'a'\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca [64 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %7
store i32 0, i32* %8
%11 = call i8* @tmpnam(i32* null)
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = call i32* @fopen(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %13, i32** %7
%14 = load i32*, i32** %7
%15 = icmp ne i32* %14, null
br i1 %15, label %19, label %16
16: ; preds = %2
%17 = load i32*, i32** @stderr
%18 = call i32 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32* %17)
store i32 1, i32* %8
br label %193
19: ; preds = %2
%20 = load i32*, i32** %7
%21 = call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %20)
%22 = load i32*, i32** %7
%23 = call i32 @fclose(i32* %22)
store i32* null, i32** %7
%24 = load i8*, i8** %6
%25 = call i32* @fopen(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %25, i32** %7
%26 = load i32*, i32** %7
%27 = icmp ne i32* %26, null
br i1 %27, label %31, label %28
28: ; preds = %19
%29 = load i32*, i32** @stderr
%30 = call i32 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32* %29)
store i32 1, i32* %8
br label %193
31: ; preds = %19
%32 = load i32*, i32** %7
%33 = call signext i8 @ungetc(i8 signext 122, i32* %32)
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 122
br i1 %35, label %39, label %36
36: ; preds = %31
%37 = load i32*, i32** @stderr
%38 = call i32 @fputs(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32* %37)
store i32 1, i32* %8
br label %193
39: ; preds = %31
%40 = load i32*, i32** %7
%41 = call signext i8 @getc(i32* %40)
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 122
br i1 %43, label %47, label %44
44: ; preds = %39
%45 = load i32*, i32** @stderr
%46 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i32* %45)
store i32 1, i32* %8
br label %193
47: ; preds = %39
%48 = load i32*, i32** %7
%49 = call signext i8 @getc(i32* %48)
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 98
br i1 %51, label %55, label %52
52: ; preds = %47
%53 = load i32*, i32** @stderr
%54 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32* %53)
store i32 1, i32* %8
br label %193
55: ; preds = %47
%56 = load i32*, i32** %7
%57 = call signext i8 @getc(i32* %56)
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 108
br i1 %59, label %63, label %60
60: ; preds = %55
%61 = load i32*, i32** @stderr
%62 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32* %61)
store i32 1, i32* %8
br label %193
63: ; preds = %55
%64 = load i32*, i32** %7
%65 = call signext i8 @ungetc(i8 signext 109, i32* %64)
%66 = sext i8 %65 to i32
%67 = icmp eq i32 %66, 109
br i1 %67, label %71, label %68
68: ; preds = %63
%69 = load i32*, i32** @stderr
%70 = call i32 @fputs(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), i32* %69)
store i32 1, i32* %8
br label %193
71: ; preds = %63
%72 = load i32*, i32** %7
%73 = call signext i8 @getc(i32* %72)
%74 = sext i8 %73 to i32
%75 = icmp eq i32 %74, 109
br i1 %75, label %79, label %76
76: ; preds = %71
%77 = load i32*, i32** @stderr
%78 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i32* %77)
store i32 1, i32* %8
br label %193
79: ; preds = %71
%80 = load i32*, i32** %7
%81 = call signext i8 @getc(i32* %80)
%82 = sext i8 %81 to i32
store i32 %82, i32* %9
%83 = icmp eq i32 %82, 97
br i1 %83, label %87, label %84
84: ; preds = %79
%85 = load i32*, i32** @stderr
%86 = call i32 @fputs(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i32* %85)
store i32 1, i32* %8
br label %193
87: ; preds = %79
%88 = load i32*, i32** %7
%89 = call signext i8 @getc(i32* %88)
%90 = sext i8 %89 to i32
%91 = load i8, i8* @EOF
%92 = sext i8 %91 to i32
%93 = icmp eq i32 %90, %92
br i1 %93, label %97, label %94
94: ; preds = %87
%95 = load i32*, i32** @stderr
%96 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i32* %95)
store i32 1, i32* %8
br label %193
97: ; preds = %87
%98 = load i32, i32* %9
%99 = trunc i32 %98 to i8
%100 = load i32*, i32** %7
%101 = call signext i8 @ungetc(i8 signext %99, i32* %100)
%102 = sext i8 %101 to i32
%103 = load i32, i32* %9
%104 = icmp eq i32 %102, %103
br i1 %104, label %108, label %105
105: ; preds = %97
%106 = load i32*, i32** @stderr
%107 = call i32 @fputs(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.12, i64 0, i64 0), i32* %106)
store i32 1, i32* %8
br label %193
108: ; preds = %97
%109 = load i32*, i32** %7
%110 = call i64 @feof(i32* %109)
%111 = icmp eq i64 %110, 0
br i1 %111, label %115, label %112
112: ; preds = %108
%113 = load i32*, i32** @stderr
%114 = call i32 @fputs(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), i32* %113)
store i32 1, i32* %8
br label %193
115: ; preds = %108
%116 = load i32*, i32** %7
%117 = call signext i8 @getc(i32* %116)
%118 = sext i8 %117 to i32
%119 = load i32, i32* %9
%120 = icmp eq i32 %118, %119
br i1 %120, label %124, label %121
121: ; preds = %115
%122 = load i32*, i32** @stderr
%123 = call i32 @fputs(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0), i32* %122)
store i32 1, i32* %8
br label %193
124: ; preds = %115
%125 = load i32*, i32** %7
%126 = call signext i8 @getc(i32* %125)
%127 = sext i8 %126 to i32
%128 = load i8, i8* @EOF
%129 = sext i8 %128 to i32
%130 = icmp eq i32 %127, %129
br i1 %130, label %134, label %131
131: ; preds = %124
%132 = load i32*, i32** @stderr
%133 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i32* %132)
store i32 1, i32* %8
br label %193
134: ; preds = %124
%135 = load i32*, i32** %7
%136 = call i32 @fclose(i32* %135)
store i32* null, i32** %7
%137 = load i8*, i8** %6
%138 = call i32* @fopen(i8* %137, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %138, i32** %7
%139 = load i32*, i32** %7
%140 = icmp ne i32* %139, null
br i1 %140, label %144, label %141
141: ; preds = %134
%142 = load i32*, i32** @stderr
%143 = call i32 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32* %142)
store i32 1, i32* %8
br label %193
144: ; preds = %134
%145 = load i32*, i32** %7
%146 = call signext i8 @getc(i32* %145)
%147 = sext i8 %146 to i32
%148 = icmp eq i32 %147, 98
br i1 %148, label %152, label %149
149: ; preds = %144
%150 = load i32*, i32** @stderr
%151 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32* %150)
store i32 1, i32* %8
br label %193
152: ; preds = %144
%153 = load i32*, i32** %7
%154 = call signext i8 @getc(i32* %153)
%155 = sext i8 %154 to i32
%156 = icmp eq i32 %155, 108
br i1 %156, label %160, label %157
157: ; preds = %152
%158 = load i32*, i32** @stderr
%159 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32* %158)
store i32 1, i32* %8
br label %193
160: ; preds = %152
%161 = load i32*, i32** %7
%162 = call signext i8 @ungetc(i8 signext 98, i32* %161)
%163 = sext i8 %162 to i32
%164 = icmp eq i32 %163, 98
br i1 %164, label %168, label %165
165: ; preds = %160
%166 = load i32*, i32** @stderr
%167 = call i32 @fputs(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.15, i64 0, i64 0), i32* %166)
store i32 1, i32* %8
br label %193
168: ; preds = %160
%169 = getelementptr inbounds [64 x i8], [64 x i8]* %10, i64 0, i64 0
%170 = load i32*, i32** %7
%171 = call i32 @fread(i8* %169, i32 1, i32 64, i32* %170)
%172 = icmp eq i32 %171, 2
br i1 %172, label %176, label %173
173: ; preds = %168
%174 = load i32*, i32** @stderr
%175 = call i32 @fputs(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0), i32* %174)
store i32 1, i32* %8
br label %193
176: ; preds = %168
%177 = getelementptr inbounds [64 x i8], [64 x i8]* %10, i64 0, i64 0
%178 = load i8, i8* %177
%179 = sext i8 %178 to i32
%180 = icmp eq i32 %179, 98
br i1 %180, label %184, label %181
181: ; preds = %176
%182 = load i32*, i32** @stderr
%183 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0), i32* %182)
store i32 1, i32* %8
br label %193
184: ; preds = %176
%185 = getelementptr inbounds [64 x i8], [64 x i8]* %10, i64 0, i64 1
%186 = load i8, i8* %185
%187 = sext i8 %186 to i32
%188 = icmp eq i32 %187, 97
br i1 %188, label %192, label %189
189: ; preds = %184
%190 = load i32*, i32** @stderr
%191 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0), i32* %190)
store i32 1, i32* %8
br label %193
192: ; preds = %184
br label %193
193: ; preds = %192, %189, %181, %173, %165, %157, %149, %141, %131, %121, %112, %105, %94, %84, %76, %68, %60, %52, %44, %36, %28, %16
%194 = load i32*, i32** %7
%195 = icmp ne i32* %194, null
br i1 %195, label %196, label %199
196: ; preds = %193
%197 = load i32*, i32** %7
%198 = call i32 @fclose(i32* %197)
br label %199
199: ; preds = %196, %193
%200 = load i8*, i8** %6
%201 = call i32 @unlink(i8* %200)
%202 = load i32, i32* %8
ret i32 %202
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [25 x i8] c"test failed: fp != NULL\0A\00"
@stderr = global i32* null
@.str.2 = [4 x i8] c"bla\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [38 x i8] c"test failed: ungetc ('z', fp) == 'z'\0A\00"
@.str.5 = [31 x i8] c"test failed: getc (fp) == 'z'\0A\00"
@.str.6 = [31 x i8] c"test failed: getc (fp) == 'b'\0A\00"
@.str.7 = [31 x i8] c"test failed: getc (fp) == 'l'\0A\00"
@.str.8 = [38 x i8] c"test failed: ungetc ('m', fp) == 'm'\0A\00"
@.str.9 = [31 x i8] c"test failed: getc (fp) == 'm'\0A\00"
@.str.10 = [37 x i8] c"test failed: (c = getc (fp)) == 'a'\0A\00"
@EOF = global i8 0
@.str.11 = [31 x i8] c"test failed: getc (fp) == EOF\0A\00"
@.str.12 = [34 x i8] c"test failed: ungetc (c, fp) == c\0A\00"
@.str.13 = [29 x i8] c"test failed: feof (fp) == 0\0A\00"
@.str.14 = [29 x i8] c"test failed: getc (fp) == c\0A\00"
@.str.15 = [38 x i8] c"test failed: ungetc ('b', fp) == 'b'\0A\00"
@.str.16 = [45 x i8] c"test failed: fread (buffer, 1, 64, fp) == 2\0A\00"
@.str.17 = [31 x i8] c"test failed: buffer[0] == 'b'\0A\00"
@.str.18 = [31 x i8] c"test failed: buffer[1] == 'a'\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = tail call i8* @tmpnam(i32* null)
%6 = tail call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32*, i32** @stderr
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i64 24, i64 1, i32* %9)
br label %141
11: ; preds = %2
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %6)
%13 = tail call i32 @fclose(i32* %6)
%14 = tail call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %19
16: ; preds = %11
%17 = load i32*, i32** @stderr
%18 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i64 24, i64 1, i32* %17)
br label %141
19: ; preds = %11
%20 = tail call signext i8 @ungetc(i8 signext 122, i32* %14)
%21 = icmp eq i8 %20, 122
br i1 %21, label %25, label %22
22: ; preds = %19
%23 = load i32*, i32** @stderr
%24 = tail call i64 @fwrite(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i64 37, i64 1, i32* %23)
br label %137
25: ; preds = %19
%26 = tail call signext i8 @getc(i32* %14)
%27 = icmp eq i8 %26, 122
br i1 %27, label %31, label %28
28: ; preds = %25
%29 = load i32*, i32** @stderr
%30 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i64 30, i64 1, i32* %29)
br label %137
31: ; preds = %25
%32 = tail call signext i8 @getc(i32* %14)
%33 = icmp eq i8 %32, 98
br i1 %33, label %37, label %34
34: ; preds = %31
%35 = load i32*, i32** @stderr
%36 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i64 30, i64 1, i32* %35)
br label %137
37: ; preds = %31
%38 = tail call signext i8 @getc(i32* %14)
%39 = icmp eq i8 %38, 108
br i1 %39, label %43, label %40
40: ; preds = %37
%41 = load i32*, i32** @stderr
%42 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i64 30, i64 1, i32* %41)
br label %137
43: ; preds = %37
%44 = tail call signext i8 @ungetc(i8 signext 109, i32* %14)
%45 = icmp eq i8 %44, 109
br i1 %45, label %49, label %46
46: ; preds = %43
%47 = load i32*, i32** @stderr
%48 = tail call i64 @fwrite(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), i64 37, i64 1, i32* %47)
br label %137
49: ; preds = %43
%50 = tail call signext i8 @getc(i32* %14)
%51 = icmp eq i8 %50, 109
br i1 %51, label %55, label %52
52: ; preds = %49
%53 = load i32*, i32** @stderr
%54 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i64 30, i64 1, i32* %53)
br label %137
55: ; preds = %49
%56 = tail call signext i8 @getc(i32* %14)
%57 = icmp eq i8 %56, 97
br i1 %57, label %61, label %58
58: ; preds = %55
%59 = load i32*, i32** @stderr
%60 = tail call i64 @fwrite(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i64 36, i64 1, i32* %59)
br label %137
61: ; preds = %55
%62 = tail call signext i8 @getc(i32* %14)
%63 = load i8, i8* @EOF
%64 = icmp eq i8 %62, %63
br i1 %64, label %68, label %65
65: ; preds = %61
%66 = load i32*, i32** @stderr
%67 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i64 30, i64 1, i32* %66)
br label %137
68: ; preds = %61
%69 = tail call signext i8 @ungetc(i8 signext 97, i32* %14)
%70 = icmp eq i8 %69, 97
br i1 %70, label %74, label %71
71: ; preds = %68
%72 = load i32*, i32** @stderr
%73 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.12, i64 0, i64 0), i64 33, i64 1, i32* %72)
br label %137
74: ; preds = %68
%75 = tail call i64 @feof(i32* %14)
%76 = icmp eq i64 %75, 0
br i1 %76, label %80, label %77
77: ; preds = %74
%78 = load i32*, i32** @stderr
%79 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), i64 28, i64 1, i32* %78)
br label %137
80: ; preds = %74
%81 = tail call signext i8 @getc(i32* %14)
%82 = icmp eq i8 %81, 97
br i1 %82, label %86, label %83
83: ; preds = %80
%84 = load i32*, i32** @stderr
%85 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0), i64 28, i64 1, i32* %84)
br label %137
86: ; preds = %80
%87 = tail call signext i8 @getc(i32* %14)
%88 = load i8, i8* @EOF
%89 = icmp eq i8 %87, %88
br i1 %89, label %93, label %90
90: ; preds = %86
%91 = load i32*, i32** @stderr
%92 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i64 30, i64 1, i32* %91)
br label %137
93: ; preds = %86
%94 = tail call i32 @fclose(i32* %14)
%95 = tail call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%96 = icmp eq i32* %95, null
br i1 %96, label %97, label %100
97: ; preds = %93
%98 = load i32*, i32** @stderr
%99 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i64 24, i64 1, i32* %98)
br label %141
100: ; preds = %93
%101 = tail call signext i8 @getc(i32* %95)
%102 = icmp eq i8 %101, 98
br i1 %102, label %106, label %103
103: ; preds = %100
%104 = load i32*, i32** @stderr
%105 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i64 30, i64 1, i32* %104)
br label %137
106: ; preds = %100
%107 = tail call signext i8 @getc(i32* %95)
%108 = icmp eq i8 %107, 108
br i1 %108, label %112, label %109
109: ; preds = %106
%110 = load i32*, i32** @stderr
%111 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i64 30, i64 1, i32* %110)
br label %137
112: ; preds = %106
%113 = tail call signext i8 @ungetc(i8 signext 98, i32* %95)
%114 = icmp eq i8 %113, 98
br i1 %114, label %118, label %115
115: ; preds = %112
%116 = load i32*, i32** @stderr
%117 = tail call i64 @fwrite(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.15, i64 0, i64 0), i64 37, i64 1, i32* %116)
br label %137
118: ; preds = %112
%119 = call i32 @fread(i8* %4, i32 1, i32 64, i32* %95)
%120 = icmp eq i32 %119, 2
br i1 %120, label %124, label %121
121: ; preds = %118
%122 = load i32*, i32** @stderr
%123 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0), i64 44, i64 1, i32* %122)
br label %137
124: ; preds = %118
%125 = load i8, i8* %4
%126 = icmp eq i8 %125, 98
br i1 %126, label %130, label %127
127: ; preds = %124
%128 = load i32*, i32** @stderr
%129 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0), i64 30, i64 1, i32* %128)
br label %137
130: ; preds = %124
%131 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 1
%132 = load i8, i8* %131
%133 = icmp eq i8 %132, 97
br i1 %133, label %137, label %134
134: ; preds = %130
%135 = load i32*, i32** @stderr
%136 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0), i64 30, i64 1, i32* %135)
br label %137
137: ; preds = %130, %134, %127, %121, %115, %109, %103, %90, %83, %77, %71, %65, %58, %52, %46, %40, %34, %28, %22
%138 = phi i32 [ 1, %22 ], [ 1, %28 ], [ 1, %34 ], [ 1, %40 ], [ 1, %46 ], [ 1, %52 ], [ 1, %58 ], [ 1, %65 ], [ 1, %71 ], [ 1, %77 ], [ 1, %83 ], [ 1, %90 ], [ 1, %103 ], [ 1, %109 ], [ 1, %115 ], [ 1, %121 ], [ 1, %127 ], [ 1, %134 ], [ 0, %130 ]
%139 = phi i32* [ %14, %22 ], [ %14, %28 ], [ %14, %34 ], [ %14, %40 ], [ %14, %46 ], [ %14, %52 ], [ %14, %58 ], [ %14, %65 ], [ %14, %71 ], [ %14, %77 ], [ %14, %83 ], [ %14, %90 ], [ %95, %103 ], [ %95, %109 ], [ %95, %115 ], [ %95, %121 ], [ %95, %127 ], [ %95, %134 ], [ %95, %130 ]
%140 = tail call i32 @fclose(i32* %139)
br label %141
141: ; preds = %8, %16, %97, %137
%142 = phi i32 [ %138, %137 ], [ 1, %97 ], [ 1, %16 ], [ 1, %8 ]
%143 = tail call i32 @unlink(i8* %5)
ret i32 %142
}