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

/* Variables and functions */
int /*<<< orphan*/ errx(int, char *, ...);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int getopt(int, char **, char *);
int /*<<< orphan*/ head(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ head_bytes(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ obsolete(char **);
int /*<<< orphan*/ optarg;
scalar_t__ optind;
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ *stdin;
int strtoimax(int /*<<< orphan*/, char **, int);
int strtol(int /*<<< orphan*/, char **, int);
int /*<<< orphan*/ usage();
int /*<<< orphan*/ warn(char *, char *);
int main(int argc, char *argv[]) {
  int ch;
  FILE *fp;
  int first, linecnt = -1, eval = 0;
  off_t bytecnt = -1;
  char *ep;
  obsolete(argv);
  while ((ch = getopt(argc, argv, "n:c:")) != -1)
    switch (ch) {
    case 'c':
      bytecnt = strtoimax(optarg, &ep, 10);
      if (*ep || bytecnt <= 0)
        errx(1, "illegal byte count -- %s", optarg);
      break;
    case 'n':
      linecnt = strtol(optarg, &ep, 10);
      if (*ep || linecnt <= 0)
        errx(1, "illegal line count -- %s", optarg);
      break;
    case '?':
    default:
      usage();
    }
  argc -= optind;
  argv += optind;
  if (linecnt != -1 && bytecnt != -1)
    errx(1, "can't combine line and byte counts");
  if (linecnt == -1)
    linecnt = 10;
  if (*argv) {
    for (first = 1; *argv; ++argv) {
      if ((fp = fopen(*argv, "r")) == NULL) {
        warn("%s", *argv);
        eval = 1;
        continue;
      }
      if (argc > 1) {
        (void)printf("%s==> %s <==\n", first ? "" : "\n", *argv);
        first = 0;
      }
      if (bytecnt == -1)
        head(fp, linecnt);
      else
        head_bytes(fp, bytecnt);
      (void)fclose(fp);
    }
  } else if (bytecnt == -1)
    head(stdin, linecnt);
  else
    head_bytes(stdin, bytecnt);
  exit(eval);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0xffffffff,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1090 <obsolete@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xdee(%rip),%rdx
call   10d0 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     1314 <main+0x144>
mov    -0x14(%rbp),%eax
mov    %eax,-0x3c(%rbp)
sub    $0x3f,%eax
je     1303 <main+0x133>
jmp    1237 <main+0x67>
mov    -0x3c(%rbp),%eax
sub    $0x63,%eax
je     1259 <main+0x89>
jmp    1248 <main+0x78>
mov    -0x3c(%rbp),%eax
sub    $0x6e,%eax
je     12ae <main+0xde>
jmp    1308 <main+0x138>
mov    0x2d98(%rip),%rax
mov    (%rax),%edi
lea    -0x38(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtoimax@plt>
mov    %eax,-0x30(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    128d <main+0xbd>
cmpl   $0x0,-0x30(%rbp)
jg     12a9 <main+0xd9>
mov    0x2d64(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
lea    0xd63(%rip),%rsi
mov    $0x0,%al
call   1060 <errx@plt>
jmp    130f <main+0x13f>
mov    0x2d43(%rip),%rax
mov    (%rax),%edi
lea    -0x38(%rbp),%rsi
mov    $0xa,%edx
call   1080 <strtol@plt>
mov    %eax,-0x28(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    12e2 <main+0x112>
cmpl   $0x0,-0x28(%rbp)
jg     12fe <main+0x12e>
mov    0x2d0f(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
lea    0xd27(%rip),%rsi
mov    $0x0,%al
call   1060 <errx@plt>
jmp    130f <main+0x13f>
jmp    1308 <main+0x138>
mov    $0x0,%al
call   10b0 <usage@plt>
jmp    1204 <main+0x34>
mov    0x2cbd(%rip),%rax
mov    (%rax),%rcx
movslq -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    0x2ca9(%rip),%rax
mov    (%rax),%rax
shl    $0x3,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0xffffffff,-0x28(%rbp)
je     1365 <main+0x195>
cmpl   $0xffffffff,-0x30(%rbp)
je     1365 <main+0x195>
mov    $0x1,%edi
lea    0xcd9(%rip),%rsi
mov    $0x0,%al
call   1060 <errx@plt>
cmpl   $0xffffffff,-0x28(%rbp)
jne    1376 <main+0x1a6>
movl   $0xa,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     145b <main+0x28b>
movl   $0x1,-0x24(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1456 <main+0x286>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xcb3(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    13d9 <main+0x209>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xc6c(%rip),%rdi
call   1040 <warn@plt>
movl   $0x1,-0x2c(%rbp)
jmp    1445 <main+0x275>
cmpl   $0x1,-0x8(%rbp)
jle    1415 <main+0x245>
mov    -0x24(%rbp),%ecx
lea    0xc7b(%rip),%rsi
lea    0xc75(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xc53(%rip),%rdi
call   1070 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xffffffff,-0x30(%rbp)
jne    1430 <main+0x260>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%esi
call   10a0 <head@plt>
jmp    143c <main+0x26c>
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%esi
call   10e0 <head_bytes@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    138b <main+0x1bb>
jmp    1493 <main+0x2c3>
cmpl   $0xffffffff,-0x30(%rbp)
jne    147c <main+0x2ac>
mov    0x2b74(%rip),%rax
mov    (%rax),%rdi
mov    -0x28(%rbp),%esi
call   10a0 <head@plt>
jmp    148e <main+0x2be>
mov    0x2b5d(%rip),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%esi
call   10e0 <head_bytes@plt>
jmp    1493 <main+0x2c3>
mov    -0x2c(%rbp),%edi
call   10f0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
mov    %rsi,%rdi
call   1090 <obsolete@plt>
mov    $0xffffffff,%r14d
lea    0xe08(%rip),%r12
mov    0x2df9(%rip),%r13
mov    $0xffffffff,%r15d
jmp    1220 <main+0x50>
mov    0x0(%r13),%edx
mov    $0x1,%edi
lea    0xdee(%rip),%rsi
xor    %eax,%eax
call   1060 <errx@plt>
xchg   %ax,%ax
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r12,%rdx
call   10d0 <getopt@plt>
cmp    $0x63,%eax
je     1245 <main+0x75>
cmp    $0x6e,%eax
je     126c <main+0x9c>
cmp    $0xffffffff,%eax
je     12a6 <main+0xd6>
xor    %eax,%eax
call   10b0 <usage@plt>
jmp    1220 <main+0x50>
mov    0x0(%r13),%edi
lea    0x10(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strtoimax@plt>
mov    %eax,%r15d
mov    0x10(%rsp),%rax
cmpb   $0x0,(%rax)
jne    1207 <main+0x37>
test   %r15d,%r15d
jg     1220 <main+0x50>
jmp    1207 <main+0x37>
mov    0x0(%r13),%edi
lea    0x10(%rsp),%rsi
mov    $0xa,%edx
call   1080 <strtol@plt>
mov    %eax,%r14d
mov    0x10(%rsp),%rax
cmpb   $0x0,(%rax)
jne    1291 <main+0xc1>
test   %r14d,%r14d
jg     1220 <main+0x50>
mov    0x0(%r13),%edx
mov    $0x1,%edi
lea    0xd7d(%rip),%rsi
jmp    1217 <main+0x47>
mov    0x2d2b(%rip),%rax
mov    (%rax),%r13
lea    0x0(,%r13,8),%r12
add    %rbp,%r12
cmp    $0xffffffff,%r14d
je     12da <main+0x10a>
cmp    $0xffffffff,%r15d
je     12da <main+0x10a>
lea    0xd69(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1060 <errx@plt>
cmp    $0xffffffff,%r14d
mov    $0xa,%eax
cmovne %r14d,%eax
mov    %eax,0xc(%rsp)
mov    (%r12),%rdi
test   %rdi,%rdi
jne    1316 <main+0x146>
mov    0x2ce5(%rip),%rax
mov    (%rax),%rdi
cmp    $0xffffffff,%r15d
jne    13c3 <main+0x1f3>
mov    0xc(%rsp),%esi
call   10a0 <head@plt>
jmp    13cb <main+0x1fb>
sub    %r13d,%ebx
mov    $0x1,%r14d
movl   $0x0,0x8(%rsp)
lea    0xd2c(%rip),%rbp
jmp    1356 <main+0x186>
mov    (%r12),%rsi
lea    0xcf9(%rip),%rdi
call   1040 <warn@plt>
movl   $0x1,0x8(%rsp)
mov    0x8(%r12),%rdi
add    $0x8,%r12
test   %rdi,%rdi
je     13d3 <main+0x203>
mov    %rbp,%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1330 <main+0x160>
mov    %rax,%r13
cmp    $0x2,%ebx
jl     1393 <main+0x1c3>
test   %r14d,%r14d
lea    0xcf4(%rip),%rsi
lea    0xcec(%rip),%rax
cmove  %rax,%rsi
mov    (%r12),%rdx
lea    0xcd1(%rip),%rdi
call   1070 <printf@plt>
xor    %r14d,%r14d
mov    %r13,%rdi
cmp    $0xffffffff,%r15d
je     13b0 <main+0x1e0>
mov    %r15d,%esi
call   10e0 <head_bytes@plt>
jmp    13b9 <main+0x1e9>
cs nopw 0x0(%rax,%rax,1)
mov    0xc(%rsp),%esi
call   10a0 <head@plt>
mov    %r13,%rdi
call   1050 <fclose@plt>
jmp    1348 <main+0x178>
mov    %r15d,%esi
call   10e0 <head_bytes@plt>
movl   $0x0,0x8(%rsp)
mov    0x8(%rsp),%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"n:c:\00"
@optarg = global i32 0
@.str.1 = [25 x i8] c"illegal byte count -- %s\00"
@.str.2 = [25 x i8] c"illegal line count -- %s\00"
@optind = global i64 0
@.str.3 = [35 x i8] c"can't combine line and byte counts\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [14 x i8] c"%s==> %s <==\0A\00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [2 x i8] c"\0A\00"
@stdin = global i32* null
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 i32
%11 = alloca i32
%12 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %9
store i32 0, i32* %10
store i32 -1, i32* %11
%13 = load i8**, i8*** %5
%14 = call i32 @obsolete(i8** %13)
br label %15
15: ; preds = %53, %2
%16 = load i32, i32* %4
%17 = load i8**, i8*** %5
%18 = call i32 @getopt(i32 %16, i8** %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %18, i32* %6
%19 = icmp ne i32 %18, -1
br i1 %19, label %20, label %54
20: ; preds = %15
%21 = load i32, i32* %6
switch i32 %21, label %51 [
i32 99, label %22
i32 110, label %36
i32 63, label %50
]
22: ; preds = %20
%23 = load i32, i32* @optarg
%24 = call i32 @strtoimax(i32 %23, i8** %12, i32 10)
store i32 %24, i32* %11
%25 = load i8*, i8** %12
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp ne i32 %27, 0
br i1 %28, label %32, label %29
29: ; preds = %22
%30 = load i32, i32* %11
%31 = icmp sle i32 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %29, %22
%33 = load i32, i32* @optarg
%34 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %32, %29
br label %53
36: ; preds = %20
%37 = load i32, i32* @optarg
%38 = call i32 @strtol(i32 %37, i8** %12, i32 10)
store i32 %38, i32* %9
%39 = load i8*, i8** %12
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp ne i32 %41, 0
br i1 %42, label %46, label %43
43: ; preds = %36
%44 = load i32, i32* %9
%45 = icmp sle i32 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %43, %36
%47 = load i32, i32* @optarg
%48 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %47)
br label %49
49: ; preds = %46, %43
br label %53
50: ; preds = %20
br label %51
51: ; preds = %20, %50
%52 = call i32 (...) @usage()
br label %53
53: ; preds = %51, %49, %35
br label %15
54: ; preds = %15
%55 = load i64, i64* @optind
%56 = load i32, i32* %4
%57 = sext i32 %56 to i64
%58 = sub nsw i64 %57, %55
%59 = trunc i64 %58 to i32
store i32 %59, i32* %4
%60 = load i64, i64* @optind
%61 = load i8**, i8*** %5
%62 = getelementptr inbounds i8*, i8** %61, i64 %60
store i8** %62, i8*** %5
%63 = load i32, i32* %9
%64 = icmp ne i32 %63, -1
br i1 %64, label %65, label %70
65: ; preds = %54
%66 = load i32, i32* %11
%67 = icmp ne i32 %66, -1
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
br label %70
70: ; preds = %68, %65, %54
%71 = load i32, i32* %9
%72 = icmp eq i32 %71, -1
br i1 %72, label %73, label %74
73: ; preds = %70
store i32 10, i32* %9
br label %74
74: ; preds = %73, %70
%75 = load i8**, i8*** %5
%76 = load i8*, i8** %75
%77 = icmp ne i8* %76, null
br i1 %77, label %78, label %121
78: ; preds = %74
store i32 1, i32* %8
br label %79
79: ; preds = %117, %78
%80 = load i8**, i8*** %5
%81 = load i8*, i8** %80
%82 = icmp ne i8* %81, null
br i1 %82, label %83, label %120
83: ; preds = %79
%84 = load i8**, i8*** %5
%85 = load i8*, i8** %84
%86 = call i32* @fopen(i8* %85, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %86, i32** %7
%87 = icmp eq i32* %86, null
br i1 %87, label %88, label %92
88: ; preds = %83
%89 = load i8**, i8*** %5
%90 = load i8*, i8** %89
%91 = call i32 @warn(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %90)
store i32 1, i32* %10
br label %117
92: ; preds = %83
%93 = load i32, i32* %4
%94 = icmp sgt i32 %93, 1
br i1 %94, label %95, label %103
95: ; preds = %92
%96 = load i32, i32* %8
%97 = icmp ne i32 %96, 0
%98 = zext i1 %97 to i64
%99 = select i1 %97, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0)
%100 = load i8**, i8*** %5
%101 = load i8*, i8** %100
%102 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %99, i8* %101)
store i32 0, i32* %8
br label %103
103: ; preds = %95, %92
%104 = load i32, i32* %11
%105 = icmp eq i32 %104, -1
br i1 %105, label %106, label %110
106: ; preds = %103
%107 = load i32*, i32** %7
%108 = load i32, i32* %9
%109 = call i32 @head(i32* %107, i32 %108)
br label %114
110: ; preds = %103
%111 = load i32*, i32** %7
%112 = load i32, i32* %11
%113 = call i32 @head_bytes(i32* %111, i32 %112)
br label %114
114: ; preds = %110, %106
%115 = load i32*, i32** %7
%116 = call i32 @fclose(i32* %115)
br label %117
117: ; preds = %114, %88
%118 = load i8**, i8*** %5
%119 = getelementptr inbounds i8*, i8** %118, i32 1
store i8** %119, i8*** %5
br label %79
120: ; preds = %79
br label %133
121: ; preds = %74
%122 = load i32, i32* %11
%123 = icmp eq i32 %122, -1
br i1 %123, label %124, label %128
124: ; preds = %121
%125 = load i32*, i32** @stdin
%126 = load i32, i32* %9
%127 = call i32 @head(i32* %125, i32 %126)
br label %132
128: ; preds = %121
%129 = load i32*, i32** @stdin
%130 = load i32, i32* %11
%131 = call i32 @head_bytes(i32* %129, i32 %130)
br label %132
132: ; preds = %128, %124
br label %133
133: ; preds = %132, %120
%134 = load i32, i32* %10
%135 = call i32 @exit(i32 %134)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"n:c:\00"
@optarg = global i32 0
@.str.1 = [25 x i8] c"illegal byte count -- %s\00"
@.str.2 = [25 x i8] c"illegal line count -- %s\00"
@optind = global i64 0
@.str.3 = [35 x i8] c"can't combine line and byte counts\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [14 x i8] c"%s==> %s <==\0A\00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [2 x i8] c"\0A\00"
@stdin = global i32* null
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = tail call i32 @obsolete(i8** %1)
br label %6
6: ; preds = %36, %2
%7 = phi i32 [ -1, %2 ], [ %27, %36 ]
%8 = phi i32 [ -1, %2 ], [ %10, %36 ]
br label %9
9: ; preds = %24, %6
%10 = phi i32 [ %8, %6 ], [ %15, %24 ]
br label %11
11: ; preds = %9, %37
%12 = call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
switch i32 %12, label %37 [
i32 -1, label %39
i32 99, label %13
i32 110, label %25
]
13: ; preds = %11
%14 = load i32, i32* @optarg
%15 = call i32 @strtoimax(i32 %14, i8** %3, i32 10)
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = icmp ne i8 %17, 0
%19 = icmp slt i32 %15, 1
%20 = select i1 %18, i1 true, i1 %19
br i1 %20, label %21, label %24
21: ; preds = %13
%22 = load i32, i32* @optarg
%23 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %21, %13
br label %9
25: ; preds = %11
%26 = load i32, i32* @optarg
%27 = call i32 @strtol(i32 %26, i8** %3, i32 10)
%28 = load i8*, i8** %3
%29 = load i8, i8* %28
%30 = icmp ne i8 %29, 0
%31 = icmp slt i32 %27, 1
%32 = select i1 %30, i1 true, i1 %31
br i1 %32, label %33, label %36
33: ; preds = %25
%34 = load i32, i32* @optarg
%35 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %34)
br label %36
36: ; preds = %33, %25
br label %6
37: ; preds = %11
%38 = call i32 (...) @usage()
br label %11
39: ; preds = %11
%40 = load i64, i64* @optind
%41 = trunc i64 %40 to i32
%42 = sub i32 %0, %41
%43 = getelementptr inbounds i8*, i8** %1, i64 %40
%44 = icmp ne i32 %7, -1
%45 = icmp ne i32 %10, -1
%46 = select i1 %44, i1 %45, i1 false
br i1 %46, label %47, label %49
47: ; preds = %39
%48 = call i32 (i32, i8*, ...) @errx(i32 1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
br label %49
49: ; preds = %47, %39
%50 = icmp eq i32 %7, -1
%51 = select i1 %50, i32 10, i32 %7
%52 = load i8*, i8** %43
%53 = icmp eq i8* %52, null
br i1 %53, label %87, label %54
54: ; preds = %49
%55 = icmp sgt i32 %42, 1
%56 = icmp eq i32 %10, -1
br label %57
57: ; preds = %54, %81
%58 = phi i32 [ 0, %54 ], [ %83, %81 ]
%59 = phi i32 [ 1, %54 ], [ %82, %81 ]
%60 = phi i8** [ %43, %54 ], [ %84, %81 ]
%61 = phi i8* [ %52, %54 ], [ %85, %81 ]
%62 = call i32* @fopen(i8* %61, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%63 = icmp eq i32* %62, null
br i1 %63, label %64, label %67
64: ; preds = %57
%65 = load i8*, i8** %60
%66 = call i32 @warn(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %65)
br label %81
67: ; preds = %57
br i1 %55, label %68, label %73
68: ; preds = %67
%69 = icmp eq i32 %59, 0
%70 = select i1 %69, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0)
%71 = load i8*, i8** %60
%72 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %70, i8* %71)
br label %73
73: ; preds = %68, %67
%74 = phi i32 [ 0, %68 ], [ %59, %67 ]
br i1 %56, label %75, label %77
75: ; preds = %73
%76 = call i32 @head(i32* %62, i32 %51)
br label %79
77: ; preds = %73
%78 = call i32 @head_bytes(i32* %62, i32 %10)
br label %79
79: ; preds = %77, %75
%80 = call i32 @fclose(i32* %62)
br label %81
81: ; preds = %79, %64
%82 = phi i32 [ %59, %64 ], [ %74, %79 ]
%83 = phi i32 [ 1, %64 ], [ %58, %79 ]
%84 = getelementptr inbounds i8*, i8** %60, i64 1
%85 = load i8*, i8** %84
%86 = icmp eq i8* %85, null
br i1 %86, label %94, label %57
87: ; preds = %49
%88 = icmp eq i32 %10, -1
%89 = load i32*, i32** @stdin
br i1 %88, label %90, label %92
90: ; preds = %87
%91 = call i32 @head(i32* %89, i32 %51)
br label %94
92: ; preds = %87
%93 = call i32 @head_bytes(i32* %89, i32 %10)
br label %94
94: ; preds = %81, %90, %92
%95 = phi i32 [ 0, %90 ], [ 0, %92 ], [ %83, %81 ]
%96 = call i32 @exit(i32 %95)
unreachable
}