#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 */

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int EXIT_SUCCESS;
size_t SSIZE_MAX;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ feof(int /*<<< orphan*/);
int /*<<< orphan*/ *fgets(char *, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
char *malloc(size_t);
scalar_t__ parse_threshold(char *, unsigned long *);
int /*<<< orphan*/ process_line(char *, int, unsigned long);
char *realloc(char *, size_t);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
size_t strlen(char *);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  int removewide;
  unsigned long threshold;
  int opt_minus_w = 0;
  int opt_plus_w = 0;
  char *line, *input_ptr;
  size_t line_len, rest_len;
  --argc;
  ++argv;
  if (argc == 0)
    usage();
  if (strcmp(*argv, "-w") == 0 || strcmp(*argv, "+w") == 0) {
    if (**argv == '-')
      opt_minus_w = 1;
    else
      opt_plus_w = 1;
    --argc;
    ++argv;
  }
  if (argc != 1 || (opt_plus_w && opt_minus_w))
    usage();
  if (parse_threshold(*argv, &threshold)) {
    fprintf(stderr, "Illegal threshold %s\n", *argv);
    usage();
  }
  if (opt_minus_w)
    removewide = 1;
  else if (opt_plus_w)
    removewide = 0;
  else
    removewide = (threshold <= 0x3200);
  line_len = 1024;
  if ((line = malloc(line_len)) == NULL) {
    fprintf(stderr, "malloc failed");
    exit(EXIT_FAILURE);
  }
  for (;;) {
    if (fgets(line, line_len, stdin) == NULL)
      break;
    while (strlen(line) == line_len - 1 && !feof(stdin)) {
      if (line_len > SSIZE_MAX) {
        fprintf(stderr, "input line too large");
        exit(EXIT_FAILURE);
      }
      line = realloc(line, line_len * 2);
      if (line == NULL) {
        fprintf(stderr, "realloc failed");
        exit(EXIT_FAILURE);
      }
      input_ptr = line + line_len - 1;
      rest_len = line_len + 1;
      line_len *= 2;
      if (fgets(input_ptr, rest_len, stdin) == NULL) {
        break;
      }
    }
    process_line(line, removewide, threshold);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    11fa <main+0x4a>
mov    $0x0,%al
call   10b0 <usage@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xdf8(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1234 <main+0x84>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xdde(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    126f <main+0xbf>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1253 <main+0xa3>
movl   $0x1,-0x24(%rbp)
jmp    125a <main+0xaa>
movl   $0x1,-0x28(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    128d <main+0xdd>
cmpl   $0x0,-0x28(%rbp)
je     1294 <main+0xe4>
cmpl   $0x0,-0x24(%rbp)
je     1294 <main+0xe4>
mov    $0x0,%al
call   10b0 <usage@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <parse_threshold@plt>
cmp    $0x0,%rax
je     12d3 <main+0x123>
mov    0x2d1b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd41(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   10b0 <usage@plt>
cmpl   $0x0,-0x24(%rbp)
je     12e9 <main+0x139>
movl   $0x1,-0x14(%rbp)
jmp    1317 <main+0x167>
cmpl   $0x0,-0x28(%rbp)
je     12ff <main+0x14f>
movl   $0x0,-0x14(%rbp)
jmp    1312 <main+0x162>
cmpq   $0x3200,-0x20(%rbp)
setbe  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
jmp    1317 <main+0x167>
movq   $0x400,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
call   1090 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    135b <main+0x1ab>
mov    0x2c93(%rip),%rax
mov    (%rax),%edi
lea    0xcd6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2c74(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    1360 <main+0x1b0>
mov    -0x30(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    0x2c71(%rip),%rax
mov    (%rax),%edx
call   1050 <fgets@plt>
cmp    $0x0,%rax
jne    1385 <main+0x1d5>
jmp    14ba <main+0x30a>
jmp    138a <main+0x1da>
mov    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x40(%rbp),%rdx
sub    $0x1,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0x49(%rbp)
jne    13c5 <main+0x215>
mov    0x2c2d(%rip),%rax
mov    (%rax),%edi
call   1080 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
test   $0x1,%al
jne    13d5 <main+0x225>
jmp    14a5 <main+0x2f5>
mov    -0x40(%rbp),%rax
mov    0x2c08(%rip),%rcx
cmp    (%rcx),%rax
jbe    140e <main+0x25e>
mov    0x2be0(%rip),%rax
mov    (%rax),%edi
lea    0xc31(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2bc1(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x30(%rbp),%rdi
mov    -0x40(%rbp),%rsi
shl    $0x1,%rsi
call   10a0 <realloc@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1453 <main+0x2a3>
mov    0x2b9b(%rip),%rax
mov    (%rax),%edi
lea    0xc01(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2b7c(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x30(%rbp),%rax
add    -0x40(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    0x2b56(%rip),%rax
mov    (%rax),%edx
call   1050 <fgets@plt>
cmp    $0x0,%rax
jne    14a0 <main+0x2f0>
jmp    14a5 <main+0x2f5>
jmp    138a <main+0x1da>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   10d0 <process_line@plt>
jmp    1360 <main+0x1b0>
mov    0x2aff(%rip),%rax
mov    (%rax),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbp
mov    %edi,%r14d
lea    0x8(%rsi),%r13
mov    %edi,%ebx
add    $0xffffffff,%ebx
jne    11d3 <main+0x23>
xor    %eax,%eax
call   10b0 <usage@plt>
mov    0x0(%r13),%rdi
lea    0xe22(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     120d <main+0x5d>
mov    0x0(%r13),%rdi
lea    0xe10(%rip),%rsi
call   1060 <strcmp@plt>
xor    %r12d,%r12d
mov    $0x0,%r15d
test   %rax,%rax
je     120d <main+0x5d>
cmp    $0x1,%ebx
je     1235 <main+0x85>
jmp    123f <main+0x8f>
mov    0x8(%rbp),%rax
xor    %r15d,%r15d
xor    %r12d,%r12d
cmpb   $0x2d,(%rax)
setne  %r15b
sete   %r12b
add    $0xfffffffe,%r14d
add    $0x10,%rbp
mov    %rbp,%r13
mov    %r14d,%ebx
cmp    $0x1,%ebx
jne    123f <main+0x8f>
test   %r12d,%r12d
je     1246 <main+0x96>
test   %r15d,%r15d
je     1246 <main+0x96>
xor    %eax,%eax
call   10b0 <usage@plt>
mov    0x0(%r13),%rdi
mov    %rsp,%rsi
call   1030 <parse_threshold@plt>
test   %rax,%rax
je     1279 <main+0xc9>
mov    0x2d72(%rip),%rax
mov    (%rax),%edi
mov    0x0(%r13),%rdx
lea    0xd9b(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %eax,%eax
call   10b0 <usage@plt>
mov    $0x1,%r14d
test   %r12d,%r12d
jne    129b <main+0xeb>
xor    %r14d,%r14d
test   %r15d,%r15d
jne    129b <main+0xeb>
xor    %r14d,%r14d
cmpq   $0x3201,(%rsp)
setb   %r14b
mov    $0x400,%edi
call   1090 <malloc@plt>
test   %rax,%rax
je     13aa <main+0x1fa>
mov    %rax,%r15
mov    0x2d28(%rip),%r12
mov    (%r12),%edx
mov    $0x400,%ebp
mov    $0x400,%esi
mov    %rax,%rdi
call   1050 <fgets@plt>
test   %rax,%rax
je     136e <main+0x1be>
mov    0x2d0a(%rip),%r13
xchg   %ax,%ax
mov    %r15,%rdi
call   1040 <strlen@plt>
lea    -0x1(%rbp),%rcx
cmp    %rcx,%rax
jne    12fe <main+0x14e>
mov    (%r12),%edi
call   1080 <feof@plt>
test   %eax,%eax
je     1329 <main+0x179>
mov    %rbp,%rbx
mov    (%rsp),%rdx
mov    %r15,%rdi
mov    %r14d,%esi
call   10d0 <process_line@plt>
mov    (%r12),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <fgets@plt>
mov    %rbx,%rbp
test   %rax,%rax
jne    12e0 <main+0x130>
jmp    136e <main+0x1be>
cmp    0x0(%r13),%rbp
ja     1386 <main+0x1d6>
mov    %rbp,%rbx
add    %rbp,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   10a0 <realloc@plt>
test   %rax,%rax
je     1398 <main+0x1e8>
mov    %rax,%r15
lea    (%rax,%rbp,1),%rdi
add    $0xffffffffffffffff,%rdi
add    $0x1,%rbp
mov    (%r12),%edx
mov    %rbp,%rsi
call   1050 <fgets@plt>
mov    %rbx,%rbp
test   %rax,%rax
jne    12e0 <main+0x130>
jmp    1301 <main+0x151>
mov    0x2c4b(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c43(%rip),%rax
mov    (%rax),%edi
lea    0xc94(%rip),%rsi
jmp    13ba <main+0x20a>
mov    0x2c31(%rip),%rax
mov    (%rax),%edi
lea    0xc97(%rip),%rsi
jmp    13ba <main+0x20a>
mov    0x2c1f(%rip),%rax
mov    (%rax),%edi
lea    0xc62(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2c00(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"-w\00"
@.str.1 = [3 x i8] c"+w\00"
@stderr = global i32 0
@.str.2 = [22 x i8] c"Illegal threshold %s\0A\00"
@.str.3 = [14 x i8] c"malloc failed\00"
@EXIT_FAILURE = global i32 0
@stdin = global i32 0
@SSIZE_MAX = global i64 0
@.str.4 = [21 x i8] c"input line too large\00"
@.str.5 = [15 x i8] c"realloc failed\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
store i32 0, i32* %9
%14 = load i32, i32* %4
%15 = add nsw i32 %14, -1
store i32 %15, i32* %4
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i32 1
store i8** %17, i8*** %5
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @usage()
br label %22
22: ; preds = %20, %2
%23 = load i8**, i8*** %5
%24 = load i8*, i8** %23
%25 = call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %32, label %27
27: ; preds = %22
%28 = load i8**, i8*** %5
%29 = load i8*, i8** %28
%30 = call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %45
32: ; preds = %27, %22
%33 = load i8**, i8*** %5
%34 = load i8*, i8** %33
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 45
br i1 %37, label %38, label %39
38: ; preds = %32
store i32 1, i32* %8
br label %40
39: ; preds = %32
store i32 1, i32* %9
br label %40
40: ; preds = %39, %38
%41 = load i32, i32* %4
%42 = add nsw i32 %41, -1
store i32 %42, i32* %4
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i32 1
store i8** %44, i8*** %5
br label %45
45: ; preds = %40, %27
%46 = load i32, i32* %4
%47 = icmp ne i32 %46, 1
br i1 %47, label %54, label %48
48: ; preds = %45
%49 = load i32, i32* %9
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %56
51: ; preds = %48
%52 = load i32, i32* %8
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51, %45
%55 = call i32 (...) @usage()
br label %56
56: ; preds = %54, %51, %48
%57 = load i8**, i8*** %5
%58 = load i8*, i8** %57
%59 = call i64 @parse_threshold(i8* %58, i64* %7)
%60 = icmp ne i64 %59, 0
br i1 %60, label %61, label %67
61: ; preds = %56
%62 = load i32, i32* @stderr
%63 = load i8**, i8*** %5
%64 = load i8*, i8** %63
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %64)
%66 = call i32 (...) @usage()
br label %67
67: ; preds = %61, %56
%68 = load i32, i32* %8
%69 = icmp ne i32 %68, 0
br i1 %69, label %70, label %71
70: ; preds = %67
store i32 1, i32* %6
br label %80
71: ; preds = %67
%72 = load i32, i32* %9
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %75
74: ; preds = %71
store i32 0, i32* %6
br label %79
75: ; preds = %71
%76 = load i64, i64* %7
%77 = icmp ule i64 %76, 12800
%78 = zext i1 %77 to i32
store i32 %78, i32* %6
br label %79
79: ; preds = %75, %74
br label %80
80: ; preds = %79, %70
store i64 1024, i64* %12
%81 = load i64, i64* %12
%82 = call i8* @malloc(i64 %81)
store i8* %82, i8** %10
%83 = icmp eq i8* %82, null
br i1 %83, label %84, label %89
84: ; preds = %80
%85 = load i32, i32* @stderr
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%87 = load i32, i32* @EXIT_FAILURE
%88 = call i32 @exit(i32 %87)
unreachable
89: ; preds = %80
br label %90
90: ; preds = %148, %89
%91 = load i8*, i8** %10
%92 = load i64, i64* %12
%93 = load i32, i32* @stdin
%94 = call i32* @fgets(i8* %91, i64 %92, i32 %93)
%95 = icmp eq i32* %94, null
br i1 %95, label %96, label %97
96: ; preds = %90
br label %153
97: ; preds = %90
br label %98
98: ; preds = %147, %97
%99 = load i8*, i8** %10
%100 = call i64 @strlen(i8* %99)
%101 = load i64, i64* %12
%102 = sub i64 %101, 1
%103 = icmp eq i64 %100, %102
br i1 %103, label %104, label %109
104: ; preds = %98
%105 = load i32, i32* @stdin
%106 = call i32 @feof(i32 %105)
%107 = icmp ne i32 %106, 0
%108 = xor i1 %107, true
br label %109
109: ; preds = %104, %98
%110 = phi i1 [ false, %98 ], [ %108, %104 ]
br i1 %110, label %111, label %148
111: ; preds = %109
%112 = load i64, i64* %12
%113 = load i64, i64* @SSIZE_MAX
%114 = icmp ugt i64 %112, %113
br i1 %114, label %115, label %120
115: ; preds = %111
%116 = load i32, i32* @stderr
%117 = call i32 (i32, i8*, ...) @fprintf(i32 %116, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%118 = load i32, i32* @EXIT_FAILURE
%119 = call i32 @exit(i32 %118)
unreachable
120: ; preds = %111
%121 = load i8*, i8** %10
%122 = load i64, i64* %12
%123 = mul i64 %122, 2
%124 = call i8* @realloc(i8* %121, i64 %123)
store i8* %124, i8** %10
%125 = load i8*, i8** %10
%126 = icmp eq i8* %125, null
br i1 %126, label %127, label %132
127: ; preds = %120
%128 = load i32, i32* @stderr
%129 = call i32 (i32, i8*, ...) @fprintf(i32 %128, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%130 = load i32, i32* @EXIT_FAILURE
%131 = call i32 @exit(i32 %130)
unreachable
132: ; preds = %120
%133 = load i8*, i8** %10
%134 = load i64, i64* %12
%135 = getelementptr inbounds i8, i8* %133, i64 %134
%136 = getelementptr inbounds i8, i8* %135, i64 -1
store i8* %136, i8** %11
%137 = load i64, i64* %12
%138 = add i64 %137, 1
store i64 %138, i64* %13
%139 = load i64, i64* %12
%140 = mul i64 %139, 2
store i64 %140, i64* %12
%141 = load i8*, i8** %11
%142 = load i64, i64* %13
%143 = load i32, i32* @stdin
%144 = call i32* @fgets(i8* %141, i64 %142, i32 %143)
%145 = icmp eq i32* %144, null
br i1 %145, label %146, label %147
146: ; preds = %132
br label %148
147: ; preds = %132
br label %98
148: ; preds = %146, %109
%149 = load i8*, i8** %10
%150 = load i32, i32* %6
%151 = load i64, i64* %7
%152 = call i32 @process_line(i8* %149, i32 %150, i64 %151)
br label %90
153: ; preds = %96
%154 = load i32, i32* @EXIT_SUCCESS
ret i32 %154
}

LLVM IR (-O2):
@.str = [3 x i8] c"-w\00"
@.str.1 = [3 x i8] c"+w\00"
@stderr = global i32 0
@.str.2 = [22 x i8] c"Illegal threshold %s\0A\00"
@.str.3 = [14 x i8] c"malloc failed\00"
@EXIT_FAILURE = global i32 0
@stdin = global i32 0
@SSIZE_MAX = global i64 0
@.str.4 = [21 x i8] c"input line too large\00"
@.str.5 = [15 x i8] c"realloc failed\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = add nsw i32 %0, -1
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (...) @usage()
br label %10
10: ; preds = %8, %2
%11 = load i8*, i8** %6
%12 = tail call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8*, i8** %6
%16 = tail call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %27
18: ; preds = %14, %10
%19 = load i8*, i8** %6
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 45
%22 = zext i1 %21 to i32
%23 = xor i1 %21, true
%24 = zext i1 %23 to i32
%25 = add nsw i32 %0, -2
%26 = getelementptr inbounds i8*, i8** %1, i64 2
br label %27
27: ; preds = %18, %14
%28 = phi i32 [ %22, %18 ], [ 0, %14 ]
%29 = phi i32 [ %24, %18 ], [ 0, %14 ]
%30 = phi i8** [ %26, %18 ], [ %6, %14 ]
%31 = phi i32 [ %25, %18 ], [ %5, %14 ]
%32 = icmp eq i32 %31, 1
br i1 %32, label %33, label %37
33: ; preds = %27
%34 = icmp ne i32 %29, 0
%35 = icmp ne i32 %28, 0
%36 = and i1 %35, %34
br i1 %36, label %37, label %39
37: ; preds = %33, %27
%38 = tail call i32 (...) @usage()
br label %39
39: ; preds = %37, %33
%40 = load i8*, i8** %30
%41 = call i64 @parse_threshold(i8* %40, i64* %3)
%42 = icmp eq i64 %41, 0
br i1 %42, label %48, label %43
43: ; preds = %39
%44 = load i32, i32* @stderr
%45 = load i8*, i8** %30
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %45)
%47 = call i32 (...) @usage()
br label %48
48: ; preds = %43, %39
%49 = icmp eq i32 %28, 0
br i1 %49, label %50, label %56
50: ; preds = %48
%51 = icmp eq i32 %29, 0
br i1 %51, label %52, label %56
52: ; preds = %50
%53 = load i64, i64* %3
%54 = icmp ult i64 %53, 12801
%55 = zext i1 %54 to i32
br label %56
56: ; preds = %50, %48, %52
%57 = phi i32 [ %55, %52 ], [ 1, %48 ], [ 0, %50 ]
%58 = call dereferenceable_or_null(1024) i8* @malloc(i64 1024)
%59 = icmp eq i8* %58, null
br i1 %59, label %64, label %60
60: ; preds = %56
%61 = load i32, i32* @stdin
%62 = call i32* @fgets(i8* %58, i64 1024, i32 %61)
%63 = icmp eq i32* %62, null
br i1 %63, label %114, label %69
64: ; preds = %56
%65 = load i32, i32* @stderr
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%67 = load i32, i32* @EXIT_FAILURE
%68 = call i32 @exit(i32 %67)
unreachable
69: ; preds = %60, %103
%70 = phi i8* [ %104, %103 ], [ %58, %60 ]
%71 = phi i64 [ %105, %103 ], [ 1024, %60 ]
%72 = call i64 @strlen(i8* dereferenceable(1) %70)
%73 = add i64 %71, -1
%74 = icmp eq i64 %72, %73
br i1 %74, label %75, label %106
75: ; preds = %69
%76 = load i32, i32* @stdin
%77 = call i32 @feof(i32 %76)
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %106
79: ; preds = %75
%80 = load i64, i64* @SSIZE_MAX
%81 = icmp ugt i64 %71, %80
br i1 %81, label %82, label %87
82: ; preds = %79
%83 = load i32, i32* @stderr
%84 = call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%85 = load i32, i32* @EXIT_FAILURE
%86 = call i32 @exit(i32 %85)
unreachable
87: ; preds = %79
%88 = shl i64 %71, 1
%89 = call i8* @realloc(i8* %70, i64 %88)
%90 = icmp eq i8* %89, null
br i1 %90, label %91, label %96
91: ; preds = %87
%92 = load i32, i32* @stderr
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%94 = load i32, i32* @EXIT_FAILURE
%95 = call i32 @exit(i32 %94)
unreachable
96: ; preds = %87
%97 = getelementptr inbounds i8, i8* %89, i64 -1
%98 = getelementptr inbounds i8, i8* %97, i64 %71
%99 = add i64 %71, 1
%100 = load i32, i32* @stdin
%101 = call i32* @fgets(i8* %98, i64 %99, i32 %100)
%102 = icmp eq i32* %101, null
br i1 %102, label %106, label %103
103: ; preds = %96, %106
%104 = phi i8* [ %89, %96 ], [ %107, %106 ]
%105 = phi i64 [ %88, %96 ], [ %108, %106 ]
br label %69
106: ; preds = %69, %96, %75
%107 = phi i8* [ %89, %96 ], [ %70, %75 ], [ %70, %69 ]
%108 = phi i64 [ %88, %96 ], [ %71, %75 ], [ %71, %69 ]
%109 = load i64, i64* %3
%110 = call i32 @process_line(i8* %107, i32 %57, i64 %109)
%111 = load i32, i32* @stdin
%112 = call i32* @fgets(i8* %107, i64 %108, i32 %111)
%113 = icmp eq i32* %112, null
br i1 %113, label %114, label %103
114: ; preds = %106, %60
%115 = load i32, i32* @EXIT_SUCCESS
ret i32 %115
}