#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 */
struct option {
  char *member_0;
  int *member_2;
  char member_3;
  int /*<<< orphan*/ member_1;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ abort();
int errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *);
int getopt_long(int, char **, char *, struct option *, int /*<<< orphan*/ *);
int is_utf8_byte_stream(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ no_argument;
int optind;
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
char *strerror(int);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  int i, ok;
  FILE *file;
  int quiet;
  struct option options[] = {{"help", no_argument, NULL, 'h'},
                             {"quiet", no_argument, &quiet, 1},
                             {0, 0, 0, 0}};
  int opt;
  quiet = 0;
  while ((opt = getopt_long(argc, argv, "hq", options, NULL)) != -1) {
    switch (opt) {
    case 0:
      break;
    case 'h':
      usage(argv[0]);
      exit(0);
      break;
    case 'q':
      quiet = 1;
      break;
    case '?':
      exit(EXIT_FAILURE);
    default:
      abort();
    }
  }
  if (optind == argc)
    ok = is_utf8_byte_stream(stdin, "stdin", quiet);
  else {
    ok = 1;
    for (i = optind; i < argc; ++i) {
      file = fopen(argv[i], "r");
      if (file == NULL) {
        fprintf(stderr, "isutf8: %s: error %d: %s\n", argv[i], errno,
                strerror(errno));
        ok = 0;
      } else {
        if (!is_utf8_byte_stream(file, argv[i], quiet))
          ok = 0;
        (void)fclose(file);
      }
    }
  }
  if (ok)
    exit(0);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xe3c(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0x2df1(%rip),%rax
movslq (%rax),%rax
mov    %rax,-0x68(%rbp)
movb   $0x0,-0x60(%rbp)
movl   $0x68,-0x5c(%rbp)
add    $0x18,%rdi
lea    0xe19(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0x2dc9(%rip),%rax
movslq (%rax),%rax
mov    %rax,-0x50(%rbp)
lea    -0x24(%rbp),%rax
mov    %al,-0x48(%rbp)
movl   $0x1,-0x44(%rbp)
add    $0x18,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1060 <memset@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x70(%rbp),%rcx
lea    0xdd6(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1050 <getopt_long@plt>
mov    %eax,-0x74(%rbp)
cmp    $0xffffffff,%eax
je     12cf <main+0x12f>
mov    -0x74(%rbp),%eax
mov    %eax,-0x78(%rbp)
test   %eax,%eax
je     1291 <main+0xf1>
jmp    125e <main+0xbe>
mov    -0x78(%rbp),%eax
sub    $0x3f,%eax
je     12b5 <main+0x115>
jmp    126f <main+0xcf>
mov    -0x78(%rbp),%eax
sub    $0x68,%eax
je     1296 <main+0xf6>
jmp    1280 <main+0xe0>
mov    -0x78(%rbp),%eax
sub    $0x71,%eax
je     12a9 <main+0x109>
jmp    12c3 <main+0x123>
jmp    12ca <main+0x12a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <usage@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
movl   $0x1,-0x24(%rbp)
jmp    12ca <main+0x12a>
mov    0x2cfc(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1223 <main+0x83>
mov    0x2d0a(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jne    1302 <main+0x162>
mov    0x2d00(%rip),%rax
mov    (%rax),%rdi
mov    -0x24(%rbp),%edx
lea    0xd19(%rip),%rsi
call   10c0 <is_utf8_byte_stream@plt>
mov    %eax,-0x18(%rbp)
jmp    13f8 <main+0x258>
movl   $0x1,-0x18(%rbp)
mov    0x2cd0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13f3 <main+0x253>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xce0(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    13af <main+0x20f>
mov    0x2c81(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x88(%rbp)
mov    0x2c57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x7c(%rbp)
mov    0x2c4b(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x8c(%rbp),%edi
mov    -0x88(%rbp),%rdx
mov    -0x7c(%rbp),%ecx
mov    %rax,%r8
lea    0xc78(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x0,-0x18(%rbp)
jmp    13e0 <main+0x240>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x24(%rbp),%edx
call   10c0 <is_utf8_byte_stream@plt>
cmp    $0x0,%eax
jne    13d7 <main+0x237>
movl   $0x0,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
jmp    13e5 <main+0x245>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1315 <main+0x175>
jmp    13f8 <main+0x258>
cmpl   $0x0,-0x18(%rbp)
je     1409 <main+0x269>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    0x2ba8(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%rbx
mov    %edi,%r14d
lea    0xe55(%rip),%rax
mov    %rax,0x10(%rsp)
mov    0x2e09(%rip),%rax
movslq (%rax),%rax
mov    %rax,0x18(%rsp)
movb   $0x0,0x20(%rsp)
movl   $0x68,0x24(%rsp)
lea    0xe32(%rip),%rcx
mov    %rcx,0x28(%rsp)
mov    %rax,0x30(%rsp)
lea    0xc(%rsp),%rax
mov    %al,0x38(%rsp)
movl   $0x1,0x3c(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movq   $0x0,0x50(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xdfd(%rip),%r15
lea    0x10(%rsp),%rbp
jmp    1224 <main+0x94>
cs nopw 0x0(%rax,%rax,1)
nop
test   %eax,%eax
jne    1265 <main+0xd5>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %rbp,%rcx
xor    %r8d,%r8d
call   1050 <getopt_long@plt>
cmp    $0x3e,%eax
jle    1220 <main+0x90>
cmp    $0x71,%eax
jne    124c <main+0xbc>
movl   $0x1,0xc(%rsp)
jmp    1224 <main+0x94>
cmp    $0x3f,%eax
je     129d <main+0x10d>
cmp    $0x68,%eax
jne    12ab <main+0x11b>
mov    (%rbx),%rdi
call   1070 <usage@plt>
xor    %edi,%edi
call   1090 <exit@plt>
cmp    $0xffffffff,%eax
jne    12ab <main+0x11b>
mov    0x2d6f(%rip),%rax
movslq (%rax),%rax
cmp    %r14d,%eax
jne    12b2 <main+0x122>
mov    0x2d68(%rip),%rax
mov    (%rax),%rdi
mov    0xc(%rsp),%edx
lea    0xd80(%rip),%rsi
call   10b0 <is_utf8_byte_stream@plt>
mov    %eax,%ebp
test   %ebp,%ebp
jne    1358 <main+0x1c8>
mov    0x2d14(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>
cmp    %r14d,%eax
jge    1358 <main+0x1c8>
lea    (%rbx,%rax,8),%r15
sub    %eax,%r14d
mov    $0x1,%ebp
xor    %r12d,%r12d
lea    0xd43(%rip),%r13
jmp    1309 <main+0x179>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rax,%rbx
mov    (%r15,%r12,8),%rsi
mov    0xc(%rsp),%edx
mov    %rax,%rdi
call   10b0 <is_utf8_byte_stream@plt>
test   %eax,%eax
cmove  %eax,%ebp
mov    %rbx,%rdi
call   1040 <fclose@plt>
add    $0x1,%r12
cmp    %r12d,%r14d
je     1295 <main+0x105>
mov    (%r15,%r12,8),%rdi
mov    %r13,%rsi
call   1080 <fopen@plt>
test   %rax,%rax
jne    12e0 <main+0x150>
mov    0x2caf(%rip),%rax
mov    (%rax),%ebx
mov    (%r15,%r12,8),%r13
mov    0x2c9a(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   10a0 <strerror@plt>
mov    %ebx,%edi
lea    0xcd6(%rip),%rsi
mov    %r13,%rdx
lea    0xcca(%rip),%r13
mov    %ebp,%ecx
mov    %rax,%r8
call   1060 <fprintf@plt>
xor    %ebp,%ebp
jmp    1300 <main+0x170>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
%struct.option = type { i8*, i32*, i8, i32 }
@.str = [5 x i8] c"help\00"
@no_argument = global i32 0
@.str.1 = [6 x i8] c"quiet\00"
@.str.2 = [3 x i8] c"hq\00"
@EXIT_FAILURE = global i32 0
@optind = global i32 0
@stdin = global i32* null
@.str.3 = [6 x i8] c"stdin\00"
@.str.4 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.5 = [26 x i8] c"isutf8: %s: error %d: %s\0A\00"
@errno = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca [3 x %struct.option]
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %10, i64 0, i64 0
%13 = getelementptr inbounds %struct.option, %struct.option* %12, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %13
%14 = getelementptr inbounds %struct.option, %struct.option* %12, i32 0, i32 1
%15 = load i32, i32* @no_argument
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
store i32* %17, i32** %14
%18 = getelementptr inbounds %struct.option, %struct.option* %12, i32 0, i32 2
store i8 0, i8* %18
%19 = getelementptr inbounds %struct.option, %struct.option* %12, i32 0, i32 3
store i32 104, i32* %19
%20 = getelementptr inbounds %struct.option, %struct.option* %12, i64 1
%21 = getelementptr inbounds %struct.option, %struct.option* %20, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %21
%22 = getelementptr inbounds %struct.option, %struct.option* %20, i32 0, i32 1
%23 = load i32, i32* @no_argument
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i32*
store i32* %25, i32** %22
%26 = getelementptr inbounds %struct.option, %struct.option* %20, i32 0, i32 2
%27 = ptrtoint i32* %9 to i8
store i8 %27, i8* %26
%28 = getelementptr inbounds %struct.option, %struct.option* %20, i32 0, i32 3
store i32 1, i32* %28
%29 = getelementptr inbounds %struct.option, %struct.option* %20, i64 1
%30 = bitcast %struct.option* %29 to i8*
store i32 0, i32* %9
br label %31
31: ; preds = %52, %2
%32 = load i32, i32* %4
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %10, i64 0, i64 0
%35 = call i32 @getopt_long(i32 %32, i8** %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %struct.option* %34, i32* null)
store i32 %35, i32* %11
%36 = icmp ne i32 %35, -1
br i1 %36, label %37, label %53
37: ; preds = %31
%38 = load i32, i32* %11
switch i32 %38, label %50 [
i32 0, label %39
i32 104, label %40
i32 113, label %46
i32 63, label %47
]
39: ; preds = %37
br label %52
40: ; preds = %37
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 0
%43 = load i8*, i8** %42
%44 = call i32 @usage(i8* %43)
%45 = call i32 @exit(i32 0)
unreachable
46: ; preds = %37
store i32 1, i32* %9
br label %52
47: ; preds = %37
%48 = load i32, i32* @EXIT_FAILURE
%49 = call i32 @exit(i32 %48)
unreachable
50: ; preds = %37
%51 = call i32 (...) @abort()
unreachable
52: ; preds = %46, %39
br label %31
53: ; preds = %31
%54 = load i32, i32* @optind
%55 = load i32, i32* %4
%56 = icmp eq i32 %54, %55
br i1 %56, label %57, label %61
57: ; preds = %53
%58 = load i32*, i32** @stdin
%59 = load i32, i32* %9
%60 = call i32 @is_utf8_byte_stream(i32* %58, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %59)
store i32 %60, i32* %7
br label %106
61: ; preds = %53
store i32 1, i32* %7
%62 = load i32, i32* @optind
store i32 %62, i32* %6
br label %63
63: ; preds = %102, %61
%64 = load i32, i32* %6
%65 = load i32, i32* %4
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %105
67: ; preds = %63
%68 = load i8**, i8*** %5
%69 = load i32, i32* %6
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8*, i8** %68, i64 %70
%72 = load i8*, i8** %71
%73 = call i32* @fopen(i8* %72, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %73, i32** %8
%74 = load i32*, i32** %8
%75 = icmp eq i32* %74, null
br i1 %75, label %76, label %87
76: ; preds = %67
%77 = load i32, i32* @stderr
%78 = load i8**, i8*** %5
%79 = load i32, i32* %6
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8*, i8** %78, i64 %80
%82 = load i8*, i8** %81
%83 = load i32, i32* @errno
%84 = load i32, i32* @errno
%85 = call i8* @strerror(i32 %84)
%86 = call i32 @fprintf(i32 %77, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i8* %82, i32 %83, i8* %85)
store i32 0, i32* %7
br label %101
87: ; preds = %67
%88 = load i32*, i32** %8
%89 = load i8**, i8*** %5
%90 = load i32, i32* %6
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i8*, i8** %89, i64 %91
%93 = load i8*, i8** %92
%94 = load i32, i32* %9
%95 = call i32 @is_utf8_byte_stream(i32* %88, i8* %93, i32 %94)
%96 = icmp ne i32 %95, 0
br i1 %96, label %98, label %97
97: ; preds = %87
store i32 0, i32* %7
br label %98
98: ; preds = %97, %87
%99 = load i32*, i32** %8
%100 = call i32 @fclose(i32* %99)
br label %101
101: ; preds = %98, %76
br label %102
102: ; preds = %101
%103 = load i32, i32* %6
%104 = add nsw i32 %103, 1
store i32 %104, i32* %6
br label %63
105: ; preds = %63
br label %106
106: ; preds = %105, %57
%107 = load i32, i32* %7
%108 = icmp ne i32 %107, 0
br i1 %108, label %109, label %111
109: ; preds = %106
%110 = call i32 @exit(i32 0)
unreachable
111: ; preds = %106
%112 = load i32, i32* @EXIT_FAILURE
%113 = call i32 @exit(i32 %112)
unreachable
}

LLVM IR (-O2):
%struct.option = type { i8*, i32*, i8, i32 }
@.str = [5 x i8] c"help\00"
@no_argument = global i32 0
@.str.1 = [6 x i8] c"quiet\00"
@.str.2 = [3 x i8] c"hq\00"
@EXIT_FAILURE = global i32 0
@optind = global i32 0
@stdin = global i32* null
@.str.3 = [6 x i8] c"stdin\00"
@.str.4 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.5 = [26 x i8] c"isutf8: %s: error %d: %s\0A\00"
@errno = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca [3 x %struct.option]
%5 = bitcast i32* %3 to i8*
%6 = bitcast [3 x %struct.option]* %4 to i8*
%7 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %4, i64 0, i64 0
%8 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %4, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %4, i64 0, i64 0, i32 1
%10 = load i32, i32* @no_argument
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %9
%13 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %4, i64 0, i64 0, i32 2
store i8 0, i8* %13
%14 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %4, i64 0, i64 0, i32 3
store i32 104, i32* %14
%15 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %4, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %15
%16 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %4, i64 0, i64 1, i32 1
store i32* %12, i32** %16
%17 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %4, i64 0, i64 1, i32 2
%18 = ptrtoint i32* %3 to i64
%19 = trunc i64 %18 to i8
store i8 %19, i8* %17
%20 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %4, i64 0, i64 1, i32 3
store i32 1, i32* %20
%21 = getelementptr inbounds [3 x %struct.option], [3 x %struct.option]* %4, i64 0, i64 2
%22 = bitcast %struct.option* %21 to i8*
store i32 0, i32* %3
br label %23
23: ; preds = %25, %2
%24 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %struct.option* %7, i32* null)
switch i32 %24, label %34 [
i32 -1, label %36
i32 0, label %25
i32 104, label %26
i32 113, label %30
i32 63, label %31
]
25: ; preds = %23, %30
br label %23
26: ; preds = %23
%27 = load i8*, i8** %1
%28 = call i32 @usage(i8* %27)
%29 = call i32 @exit(i32 0)
unreachable
30: ; preds = %23
store i32 1, i32* %3
br label %25
31: ; preds = %23
%32 = load i32, i32* @EXIT_FAILURE
%33 = call i32 @exit(i32 %32)
unreachable
34: ; preds = %23
%35 = call i32 (...) @abort()
unreachable
36: ; preds = %23
%37 = load i32, i32* @optind
%38 = icmp eq i32 %37, %0
br i1 %38, label %43, label %39
39: ; preds = %36
%40 = icmp slt i32 %37, %0
br i1 %40, label %41, label %75
41: ; preds = %39
%42 = sext i32 %37 to i64
br label %47
43: ; preds = %36
%44 = load i32*, i32** @stdin
%45 = load i32, i32* %3
%46 = call i32 @is_utf8_byte_stream(i32* %44, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %45)
br label %72
47: ; preds = %41, %67
%48 = phi i64 [ %42, %41 ], [ %69, %67 ]
%49 = phi i32 [ 1, %41 ], [ %68, %67 ]
%50 = getelementptr inbounds i8*, i8** %1, i64 %48
%51 = load i8*, i8** %50
%52 = call i32* @fopen(i8* %51, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%53 = icmp eq i32* %52, null
br i1 %53, label %54, label %60
54: ; preds = %47
%55 = load i32, i32* @stderr
%56 = load i8*, i8** %50
%57 = load i32, i32* @errno
%58 = call i8* @strerror(i32 %57)
%59 = call i32 @fprintf(i32 %55, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i8* %56, i32 %57, i8* %58)
br label %67
60: ; preds = %47
%61 = load i8*, i8** %50
%62 = load i32, i32* %3
%63 = call i32 @is_utf8_byte_stream(i32* %52, i8* %61, i32 %62)
%64 = icmp eq i32 %63, 0
%65 = select i1 %64, i32 0, i32 %49
%66 = call i32 @fclose(i32* %52)
br label %67
67: ; preds = %54, %60
%68 = phi i32 [ 0, %54 ], [ %65, %60 ]
%69 = add nsw i64 %48, 1
%70 = trunc i64 %69 to i32
%71 = icmp eq i32 %70, %0
br i1 %71, label %72, label %47
72: ; preds = %67, %43
%73 = phi i32 [ %46, %43 ], [ %68, %67 ]
%74 = icmp eq i32 %73, 0
br i1 %74, label %77, label %75
75: ; preds = %39, %72
%76 = call i32 @exit(i32 0)
unreachable
77: ; preds = %72
%78 = load i32, i32* @EXIT_FAILURE
%79 = call i32 @exit(i32 %78)
unreachable
}