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

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ LC_ALL;
scalar_t__ WEOF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fdopen(int, char *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/ *);
long ftell(int /*<<< orphan*/ *);
scalar_t__ getwc(int /*<<< orphan*/ *);
int mkstemp(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ *setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
scalar_t__ ungetwc(scalar_t__, int /*<<< orphan*/ *);
int /*<<< orphan*/ unlink(char *);
int main(void) {
  FILE *fp;
  const char *str = "abcdef";
  wint_t ret, wc;
  char fname[] = "/tmp/tst-ungetwc2.out.XXXXXX";
  int fd;
  long int pos;
  int result = 0;
  puts("This program runs on de_DE.UTF-8 locale.");
  if (setlocale(LC_ALL, "de_DE.UTF-8") == NULL) {
    fprintf(stderr, "Err: Cannot run on the de_DE.UTF-8 locale\n");
    exit(EXIT_FAILURE);
  }
  fd = mkstemp(fname);
  if (fd == -1) {
    printf("cannot open temp file: %m\n");
    exit(EXIT_FAILURE);
  }
  if ((fp = fdopen(fd, "w")) == NULL) {
    fprintf(stderr, "Cannot open 'testfile'.\n");
    exit(EXIT_FAILURE);
  }
  fputs(str, fp);
  fclose(fp);
  if ((fp = fopen(fname, "r")) == NULL) {
    fprintf(stderr, "Cannot open 'testfile'.");
    exit(EXIT_FAILURE);
  }
  wc = getwc(fp);
  pos = ftell(fp);
  printf("After get a character: %ld\n", pos);
  if (pos != 1)
    result = 1;
  ret = ungetwc(wc, fp);
  if (ret == WEOF) {
    fprintf(stderr, "ungetwc() returns NULL.");
    exit(EXIT_FAILURE);
  }
  pos = ftell(fp);
  printf("After unget a character: %ld\n", pos);
  if (pos != 0)
    result = 1;
  wc = getwc(fp);
  pos = ftell(fp);
  printf("After reget a character: %ld\n", pos);
  if (pos != 1)
    result = 1;
  fclose(fp);
  unlink(fname);
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe0a(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xf2f(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xf2c(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xf29(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xf27(%rip),%eax
mov    %eax,-0x38(%rbp)
mov    0xf22(%rip),%al
mov    %al,-0x34(%rbp)
movl   $0x0,-0x64(%rbp)
lea    0xdcc(%rip),%rdi
call   1050 <puts@plt>
mov    0x2d81(%rip),%rax
mov    (%rax),%edi
lea    0xde0(%rip),%rsi
call   10e0 <setlocale@plt>
cmp    $0x0,%rax
jne    1282 <main+0xa2>
mov    0x2d7a(%rip),%rax
mov    (%rax),%edi
lea    0xdcd(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2d5d(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
lea    -0x50(%rbp),%rdi
call   10b0 <mkstemp@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0xffffffff,-0x54(%rbp)
jne    12b4 <main+0xd4>
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2d2b(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x54(%rbp),%edi
lea    0xdc4(%rip),%rsi
call   10d0 <fdopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    12f4 <main+0x114>
mov    0x2d08(%rip),%rax
mov    (%rax),%edi
lea    0xda3(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2ceb(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1080 <fputs@plt>
mov    -0x10(%rbp),%rdi
call   1060 <fclose@plt>
lea    -0x50(%rbp),%rdi
lea    0xd88(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    134b <main+0x16b>
mov    0x2cb1(%rip),%rax
mov    (%rax),%edi
lea    0xd67(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2c94(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x10(%rbp),%rdi
call   10c0 <getwc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   10a0 <ftell@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rsi
lea    0xd47(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
cmpq   $0x1,-0x60(%rbp)
je     1389 <main+0x1a9>
movl   $0x1,-0x64(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ungetwc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2c2b(%rip),%rcx
cmp    (%rcx),%rax
jne    13d1 <main+0x1f1>
mov    0x2c2b(%rip),%rax
mov    (%rax),%edi
lea    0xd15(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2c0e(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x10(%rbp),%rdi
call   10a0 <ftell@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rsi
lea    0xd02(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
cmpq   $0x0,-0x60(%rbp)
je     1402 <main+0x222>
movl   $0x1,-0x64(%rbp)
mov    -0x10(%rbp),%rdi
call   10c0 <getwc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   10a0 <ftell@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rsi
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
cmpq   $0x1,-0x60(%rbp)
je     1440 <main+0x260>
movl   $0x1,-0x64(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <fclose@plt>
lea    -0x50(%rbp),%rdi
call   1040 <unlink@plt>
mov    -0x64(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
movups 0xf4a(%rip),%xmm0
movups %xmm0,0xd(%rsp)
movaps 0xf31(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xdfd(%rip),%rdi
call   1050 <puts@plt>
mov    0x2db2(%rip),%rax
mov    (%rax),%edi
lea    0xe11(%rip),%rsi
call   10d0 <setlocale@plt>
test   %rax,%rax
je     1349 <main+0x169>
mov    %rsp,%rdi
call   10a0 <mkstemp@plt>
cmp    $0xffffffff,%eax
je     135b <main+0x17b>
lea    0xe3d(%rip),%rsi
mov    %eax,%edi
call   10c0 <fdopen@plt>
test   %rax,%rax
je     136b <main+0x18b>
mov    %rax,%rbx
lea    0xda1(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1100 <fwrite@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
lea    0xe1d(%rip),%rsi
mov    %rsp,%rdi
call   10e0 <fopen@plt>
test   %rax,%rax
je     137d <main+0x19d>
mov    %rax,%r12
mov    %rax,%rdi
call   10b0 <getwc@plt>
mov    %rax,%r15
mov    %r12,%rdi
call   1090 <ftell@plt>
mov    %rax,%r14
lea    0xe06(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1030 <ungetwc@plt>
mov    0x2d03(%rip),%rcx
cmp    (%rcx),%rax
je     138f <main+0x1af>
xor    $0x1,%r14
mov    %r12,%rdi
call   1090 <ftell@plt>
mov    %rax,%r15
lea    0xdff(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
or     %r15,%r14
mov    %r12,%rdi
call   10b0 <getwc@plt>
mov    %r12,%rdi
call   1090 <ftell@plt>
mov    %rax,%rbx
lea    0xdf6(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    $0x1,%rbx
xor    %ebp,%ebp
or     %r14,%rbx
setne  %bpl
mov    %r12,%rdi
call   1060 <fclose@plt>
mov    %rsp,%rdi
call   1040 <unlink@plt>
mov    %ebp,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c90(%rip),%rax
mov    (%rax),%edi
lea    0xce3(%rip),%rsi
jmp    139f <main+0x1bf>
lea    0xd05(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    13a4 <main+0x1c4>
mov    0x2c6e(%rip),%rax
mov    (%rax),%edi
lea    0xd09(%rip),%rsi
jmp    139f <main+0x1bf>
mov    0x2c5c(%rip),%rax
mov    (%rax),%edi
lea    0xd12(%rip),%rsi
jmp    139f <main+0x1bf>
mov    0x2c4a(%rip),%rax
mov    (%rax),%edi
lea    0xd34(%rip),%rsi
call   1080 <fprintf@plt>
mov    0x2c2d(%rip),%rax
mov    (%rax),%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"abcdef\00"
@__const.main.fname = [29 x i8] c"/tmp/tst-ungetwc2.out.XXXXXX\00"
@.str.1 = [41 x i8] c"This program runs on de_DE.UTF-8 locale.\00"
@LC_ALL = global i32 0
@.str.2 = [12 x i8] c"de_DE.UTF-8\00"
@stderr = global i32 0
@.str.3 = [43 x i8] c"Err: Cannot run on the de_DE.UTF-8 locale\0A\00"
@EXIT_FAILURE = global i32 0
@.str.4 = [27 x i8] c"cannot open temp file: %m\0A\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [25 x i8] c"Cannot open 'testfile'.\0A\00"
@.str.7 = [2 x i8] c"r\00"
@.str.8 = [24 x i8] c"Cannot open 'testfile'.\00"
@.str.9 = [28 x i8] c"After get a character: %ld\0A\00"
@WEOF = global i64 0
@.str.10 = [24 x i8] c"ungetwc() returns NULL.\00"
@.str.11 = [30 x i8] c"After unget a character: %ld\0A\00"
@.str.12 = [30 x i8] c"After reget a character: %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca [29 x i8]
%7 = alloca i32
%8 = alloca i64
%9 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %3
%10 = bitcast [29 x i8]* %6 to i8*
store i32 0, i32* %9
%11 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @LC_ALL
%13 = call i32* @setlocale(i32 %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %20
15: ; preds = %0
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* @EXIT_FAILURE
%19 = call i32 @exit(i32 %18)
unreachable
20: ; preds = %0
%21 = getelementptr inbounds [29 x i8], [29 x i8]* %6, i64 0, i64 0
%22 = call i32 @mkstemp(i8* %21)
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %29
25: ; preds = %20
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%27 = load i32, i32* @EXIT_FAILURE
%28 = call i32 @exit(i32 %27)
unreachable
29: ; preds = %20
%30 = load i32, i32* %7
%31 = call i32* @fdopen(i32 %30, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %31, i32** %2
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %38
33: ; preds = %29
%34 = load i32, i32* @stderr
%35 = call i32 @fprintf(i32 %34, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%36 = load i32, i32* @EXIT_FAILURE
%37 = call i32 @exit(i32 %36)
unreachable
38: ; preds = %29
%39 = load i8*, i8** %3
%40 = load i32*, i32** %2
%41 = call i32 @fputs(i8* %39, i32* %40)
%42 = load i32*, i32** %2
%43 = call i32 @fclose(i32* %42)
%44 = getelementptr inbounds [29 x i8], [29 x i8]* %6, i64 0, i64 0
%45 = call i32* @fopen(i8* %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32* %45, i32** %2
%46 = icmp eq i32* %45, null
br i1 %46, label %47, label %52
47: ; preds = %38
%48 = load i32, i32* @stderr
%49 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%50 = load i32, i32* @EXIT_FAILURE
%51 = call i32 @exit(i32 %50)
unreachable
52: ; preds = %38
%53 = load i32*, i32** %2
%54 = call i64 @getwc(i32* %53)
store i64 %54, i64* %5
%55 = load i32*, i32** %2
%56 = call i64 @ftell(i32* %55)
store i64 %56, i64* %8
%57 = load i64, i64* %8
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i64 %57)
%59 = load i64, i64* %8
%60 = icmp ne i64 %59, 1
br i1 %60, label %61, label %62
61: ; preds = %52
store i32 1, i32* %9
br label %62
62: ; preds = %61, %52
%63 = load i64, i64* %5
%64 = load i32*, i32** %2
%65 = call i64 @ungetwc(i64 %63, i32* %64)
store i64 %65, i64* %4
%66 = load i64, i64* %4
%67 = load i64, i64* @WEOF
%68 = icmp eq i64 %66, %67
br i1 %68, label %69, label %74
69: ; preds = %62
%70 = load i32, i32* @stderr
%71 = call i32 @fprintf(i32 %70, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%72 = load i32, i32* @EXIT_FAILURE
%73 = call i32 @exit(i32 %72)
unreachable
74: ; preds = %62
%75 = load i32*, i32** %2
%76 = call i64 @ftell(i32* %75)
store i64 %76, i64* %8
%77 = load i64, i64* %8
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i64 %77)
%79 = load i64, i64* %8
%80 = icmp ne i64 %79, 0
br i1 %80, label %81, label %82
81: ; preds = %74
store i32 1, i32* %9
br label %82
82: ; preds = %81, %74
%83 = load i32*, i32** %2
%84 = call i64 @getwc(i32* %83)
store i64 %84, i64* %5
%85 = load i32*, i32** %2
%86 = call i64 @ftell(i32* %85)
store i64 %86, i64* %8
%87 = load i64, i64* %8
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i64 %87)
%89 = load i64, i64* %8
%90 = icmp ne i64 %89, 1
br i1 %90, label %91, label %92
91: ; preds = %82
store i32 1, i32* %9
br label %92
92: ; preds = %91, %82
%93 = load i32*, i32** %2
%94 = call i32 @fclose(i32* %93)
%95 = getelementptr inbounds [29 x i8], [29 x i8]* %6, i64 0, i64 0
%96 = call i32 @unlink(i8* %95)
%97 = load i32, i32* %9
ret i32 %97
}

LLVM IR (-O2):
@.str = [7 x i8] c"abcdef\00"
@__const.main.fname = [29 x i8] c"/tmp/tst-ungetwc2.out.XXXXXX\00"
@.str.1 = [41 x i8] c"This program runs on de_DE.UTF-8 locale.\00"
@LC_ALL = global i32 0
@.str.2 = [12 x i8] c"de_DE.UTF-8\00"
@stderr = global i32 0
@.str.3 = [43 x i8] c"Err: Cannot run on the de_DE.UTF-8 locale\0A\00"
@EXIT_FAILURE = global i32 0
@.str.4 = [27 x i8] c"cannot open temp file: %m\0A\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [25 x i8] c"Cannot open 'testfile'.\0A\00"
@.str.7 = [2 x i8] c"r\00"
@.str.8 = [24 x i8] c"Cannot open 'testfile'.\00"
@.str.9 = [28 x i8] c"After get a character: %ld\0A\00"
@WEOF = global i64 0
@.str.10 = [24 x i8] c"ungetwc() returns NULL.\00"
@.str.11 = [30 x i8] c"After unget a character: %ld\0A\00"
@.str.12 = [30 x i8] c"After reget a character: %ld\0A\00"
define i32 @main() {
%1 = alloca [29 x i8]
%2 = getelementptr inbounds [29 x i8], [29 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @LC_ALL
%5 = tail call i32* @setlocale(i32 %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @exit(i32 %10)
unreachable
12: ; preds = %0
%13 = call i32 @mkstemp(i8* %2)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%17 = load i32, i32* @EXIT_FAILURE
%18 = call i32 @exit(i32 %17)
unreachable
19: ; preds = %12
%20 = call i32* @fdopen(i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%21 = icmp eq i32* %20, null
br i1 %21, label %22, label %27
22: ; preds = %19
%23 = load i32, i32* @stderr
%24 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%25 = load i32, i32* @EXIT_FAILURE
%26 = call i32 @exit(i32 %25)
unreachable
27: ; preds = %19
%28 = call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 6, i64 1, i32* %20)
%29 = call i32 @fclose(i32* %20)
%30 = call i32* @fopen(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %37
32: ; preds = %27
%33 = load i32, i32* @stderr
%34 = call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%35 = load i32, i32* @EXIT_FAILURE
%36 = call i32 @exit(i32 %35)
unreachable
37: ; preds = %27
%38 = call i64 @getwc(i32* %30)
%39 = call i64 @ftell(i32* %30)
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i64 %39)
%41 = call i64 @ungetwc(i64 %38, i32* %30)
%42 = load i64, i64* @WEOF
%43 = icmp eq i64 %41, %42
br i1 %43, label %44, label %49
44: ; preds = %37
%45 = load i32, i32* @stderr
%46 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%47 = load i32, i32* @EXIT_FAILURE
%48 = call i32 @exit(i32 %47)
unreachable
49: ; preds = %37
%50 = icmp ne i64 %39, 1
%51 = call i64 @ftell(i32* %30)
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i64 %51)
%53 = icmp ne i64 %51, 0
%54 = or i1 %50, %53
%55 = call i64 @getwc(i32* %30)
%56 = call i64 @ftell(i32* %30)
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i64 %56)
%58 = icmp ne i64 %56, 1
%59 = or i1 %54, %58
%60 = zext i1 %59 to i32
%61 = call i32 @fclose(i32* %30)
%62 = call i32 @unlink(i8* %2)
ret i32 %60
}