#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 bail(char *, int, ...);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ shout_save(char *, char *, char *, char *);
int /*<<< orphan*/ stdout;
char *strchr(char *, char);
int /*<<< orphan*/ strncpy(char *, char *, int);
int qparse(char *l, int ln) {
  if (!l)
    return 1;
  if (*l != '[')
    return bail("\nqparse: parse error at line %d: "
                "expected \'[\' got \'%c\'\n",
                ln, *l);
  char *cl = strchr(l, ']');
  if (!cl)
    return bail("\nqparse: parse error at line %d: "
                "no closing \']\' found\n",
                ln);
  char epochstr[256] = {0};
  strncpy(epochstr, (l + 1),
          ((255) < ((cl - (l + 1)))) ? (255) : ((cl - (l + 1))));
  l = cl + 2;
  if (*l != '<')
    return bail("\nqparse: parse error at line %d: "
                "expected \'<\' got \'%c\'\n",
                ln, *l);
  cl = strchr(l, '>');
  if (!cl)
    return bail("\nqparse: parse error at line %d: "
                "no closing \'>\' found\n",
                ln);
  char namestr[256] = {0};
  strncpy(namestr, (l + 1),
          ((255) < ((cl - (l + 1)))) ? (255) : ((cl - (l + 1))));
  l = cl + 2;
  char linestr[512] = {0};
  char *el = strchr(l, '\r');
  if (el)
    *el = '\0';
  if ((el - l) > 511)
    bail("\nqparse: warning at line %d: "
         "quote is longer than 511 characters\n",
         ln);
  strncpy(linestr, l, 511);
  shout_save(epochstr, namestr, "UNKNOWN", linestr);
  printf("\rParsed %d lines.", ln);
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<qparse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1199 <qparse+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1462 <qparse+0x2f2>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
je     11c9 <qparse+0x59>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
mov    %eax,-0x4(%rbp)
jmp    1462 <qparse+0x2f2>
mov    -0x10(%rbp),%rdi
mov    $0x5d,%esi
call   1040 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11ff <qparse+0x8f>
mov    -0x14(%rbp),%esi
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
mov    %eax,-0x4(%rbp)
jmp    1462 <qparse+0x2f2>
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
lea    -0x120(%rbp),%rax
mov    %rax,-0x438(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x430(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    $0x1,%rax
sub    %rax,%rcx
mov    $0xff,%eax
cmp    %rcx,%rax
jge    125d <qparse+0xed>
mov    $0xff,%eax
mov    %rax,-0x440(%rbp)
jmp    1273 <qparse+0x103>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
sub    %rcx,%rax
mov    %rax,-0x440(%rbp)
mov    -0x430(%rbp),%rsi
mov    -0x438(%rbp),%rdi
mov    -0x440(%rbp),%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3c,%eax
je     12cb <qparse+0x15b>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
lea    0xdb3(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
mov    %eax,-0x4(%rbp)
jmp    1462 <qparse+0x2f2>
mov    -0x10(%rbp),%rdi
mov    $0x3e,%esi
call   1040 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1301 <qparse+0x191>
mov    -0x14(%rbp),%esi
lea    0xdb5(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
mov    %eax,-0x4(%rbp)
jmp    1462 <qparse+0x2f2>
lea    -0x220(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
lea    -0x220(%rbp),%rax
mov    %rax,-0x450(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x448(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    $0x1,%rax
sub    %rax,%rcx
mov    $0xff,%eax
cmp    %rcx,%rax
jge    135f <qparse+0x1ef>
mov    $0xff,%eax
mov    %rax,-0x458(%rbp)
jmp    1375 <qparse+0x205>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
sub    %rcx,%rax
mov    %rax,-0x458(%rbp)
mov    -0x448(%rbp),%rsi
mov    -0x450(%rbp),%rdi
mov    -0x458(%rbp),%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1060 <memset@plt>
mov    -0x10(%rbp),%rdi
mov    $0xd,%esi
call   1040 <strchr@plt>
mov    %rax,-0x428(%rbp)
cmpq   $0x0,-0x428(%rbp)
je     13dd <qparse+0x26d>
mov    -0x428(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x428(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x1ff,%rax
jle    1408 <qparse+0x298>
mov    -0x14(%rbp),%esi
lea    0xcdd(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1ff,%edx
call   1030 <strncpy@plt>
lea    -0x120(%rbp),%rdi
lea    -0x220(%rbp),%rsi
lea    -0x420(%rbp),%rcx
lea    0xce7(%rip),%rdx
call   1070 <shout_save@plt>
mov    -0x14(%rbp),%esi
lea    0xce0(%rip),%rdi
call   1050 <printf@plt>
mov    0x2b8c(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x460,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qparse>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x408,%rsp
test   %rdi,%rdi
je     13a6 <qparse+0x236>
mov    %esi,%r15d
mov    %rdi,%rbp
movsbl (%rdi),%edx
cmp    $0x5b,%edx
jne    13ad <qparse+0x23d>
mov    %rbp,%rdi
mov    $0x5d,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     13cb <qparse+0x25b>
mov    %rax,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x1f0(%rsp)
movaps %xmm0,0x1e0(%rsp)
movaps %xmm0,0x1d0(%rsp)
movaps %xmm0,0x1c0(%rsp)
movaps %xmm0,0x1b0(%rsp)
movaps %xmm0,0x1a0(%rsp)
movaps %xmm0,0x190(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
add    $0x1,%rbp
sub    %rbp,%rax
cmp    $0xff,%rax
mov    $0xff,%edx
cmovl  %eax,%edx
lea    0x100(%rsp),%rdi
mov    %rbp,%rsi
call   1030 <strncpy@plt>
movsbl 0x2(%rbx),%edx
cmp    $0x3c,%edx
jne    13e9 <qparse+0x279>
lea    0x2(%rbx),%rdi
mov    $0x3e,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     13fc <qparse+0x28c>
mov    %rax,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
add    $0x3,%rbx
sub    %rbx,%rax
cmp    $0xff,%rax
mov    $0xff,%edx
cmovl  %eax,%edx
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1030 <strncpy@plt>
add    $0x2,%r14
lea    0x200(%rsp),%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   1060 <memset@plt>
mov    %r14,%rdi
mov    $0xd,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1337 <qparse+0x1c7>
movb   $0x0,(%rax)
sub    %r14,%rax
cmp    $0x200,%rax
jl     1353 <qparse+0x1e3>
lea    0xd95(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1090 <bail@plt>
lea    0x200(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1ff,%edx
call   1030 <strncpy@plt>
lea    0xdae(%rip),%rdx
lea    0x100(%rsp),%rdi
mov    %rsp,%rsi
mov    %rbx,%rcx
call   1070 <shout_save@plt>
lea    0xd9c(%rip),%rdi
mov    %r15d,%esi
call   1050 <printf@plt>
mov    0x2c45(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
xor    %eax,%eax
jmp    140d <qparse+0x29d>
mov    $0x1,%eax
jmp    140d <qparse+0x29d>
lea    0xc4c(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <bail@plt>
lea    0xc66(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <bail@plt>
lea    0xc7f(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1090 <bail@plt>
jmp    140d <qparse+0x29d>
lea    0xca4(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1090 <bail@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [56 x i8] c"\0Aqparse: parse error at line %d: expected '[' got '%c'\0A\00"
@.str.1 = [55 x i8] c"\0Aqparse: parse error at line %d: no closing ']' found\0A\00"
@.str.2 = [56 x i8] c"\0Aqparse: parse error at line %d: expected '<' got '%c'\0A\00"
@.str.3 = [55 x i8] c"\0Aqparse: parse error at line %d: no closing '>' found\0A\00"
@.str.4 = [66 x i8] c"\0Aqparse: warning at line %d: quote is longer than 511 characters\0A\00"
@.str.5 = [8 x i8] c"UNKNOWN\00"
@.str.6 = [18 x i8] c"\0DParsed %d lines.\00"
@stdout = global i32 0
define i32 @qparse(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [256 x i8]
%8 = alloca [256 x i8]
%9 = alloca [512 x i8]
%10 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %14, label %13
13: ; preds = %2
store i32 1, i32* %3
br label %132
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 91
br i1 %18, label %19, label %25
19: ; preds = %14
%20 = load i32, i32* %5
%21 = load i8*, i8** %4
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %23)
store i32 %24, i32* %3
br label %132
25: ; preds = %14
%26 = load i8*, i8** %4
%27 = call i8* @strchr(i8* %26, i8 signext 93)
store i8* %27, i8** %6
%28 = load i8*, i8** %6
%29 = icmp ne i8* %28, null
br i1 %29, label %33, label %30
30: ; preds = %25
%31 = load i32, i32* %5
%32 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %31)
store i32 %32, i32* %3
br label %132
33: ; preds = %25
%34 = bitcast [256 x i8]* %7 to i8*
%35 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%36 = load i8*, i8** %4
%37 = getelementptr inbounds i8, i8* %36, i64 1
%38 = load i8*, i8** %6
%39 = load i8*, i8** %4
%40 = getelementptr inbounds i8, i8* %39, i64 1
%41 = ptrtoint i8* %38 to i64
%42 = ptrtoint i8* %40 to i64
%43 = sub i64 %41, %42
%44 = icmp slt i64 255, %43
br i1 %44, label %45, label %46
45: ; preds = %33
br label %53
46: ; preds = %33
%47 = load i8*, i8** %6
%48 = load i8*, i8** %4
%49 = getelementptr inbounds i8, i8* %48, i64 1
%50 = ptrtoint i8* %47 to i64
%51 = ptrtoint i8* %49 to i64
%52 = sub i64 %50, %51
br label %53
53: ; preds = %46, %45
%54 = phi i64 [ 255, %45 ], [ %52, %46 ]
%55 = trunc i64 %54 to i32
%56 = call i32 @strncpy(i8* %35, i8* %37, i32 %55)
%57 = load i8*, i8** %6
%58 = getelementptr inbounds i8, i8* %57, i64 2
store i8* %58, i8** %4
%59 = load i8*, i8** %4
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp ne i32 %61, 60
br i1 %62, label %63, label %69
63: ; preds = %53
%64 = load i32, i32* %5
%65 = load i8*, i8** %4
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0), i32 %64, i32 %67)
store i32 %68, i32* %3
br label %132
69: ; preds = %53
%70 = load i8*, i8** %4
%71 = call i8* @strchr(i8* %70, i8 signext 62)
store i8* %71, i8** %6
%72 = load i8*, i8** %6
%73 = icmp ne i8* %72, null
br i1 %73, label %77, label %74
74: ; preds = %69
%75 = load i32, i32* %5
%76 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 %75)
store i32 %76, i32* %3
br label %132
77: ; preds = %69
%78 = bitcast [256 x i8]* %8 to i8*
%79 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%80 = load i8*, i8** %4
%81 = getelementptr inbounds i8, i8* %80, i64 1
%82 = load i8*, i8** %6
%83 = load i8*, i8** %4
%84 = getelementptr inbounds i8, i8* %83, i64 1
%85 = ptrtoint i8* %82 to i64
%86 = ptrtoint i8* %84 to i64
%87 = sub i64 %85, %86
%88 = icmp slt i64 255, %87
br i1 %88, label %89, label %90
89: ; preds = %77
br label %97
90: ; preds = %77
%91 = load i8*, i8** %6
%92 = load i8*, i8** %4
%93 = getelementptr inbounds i8, i8* %92, i64 1
%94 = ptrtoint i8* %91 to i64
%95 = ptrtoint i8* %93 to i64
%96 = sub i64 %94, %95
br label %97
97: ; preds = %90, %89
%98 = phi i64 [ 255, %89 ], [ %96, %90 ]
%99 = trunc i64 %98 to i32
%100 = call i32 @strncpy(i8* %79, i8* %81, i32 %99)
%101 = load i8*, i8** %6
%102 = getelementptr inbounds i8, i8* %101, i64 2
store i8* %102, i8** %4
%103 = bitcast [512 x i8]* %9 to i8*
%104 = load i8*, i8** %4
%105 = call i8* @strchr(i8* %104, i8 signext 13)
store i8* %105, i8** %10
%106 = load i8*, i8** %10
%107 = icmp ne i8* %106, null
br i1 %107, label %108, label %110
108: ; preds = %97
%109 = load i8*, i8** %10
store i8 0, i8* %109
br label %110
110: ; preds = %108, %97
%111 = load i8*, i8** %10
%112 = load i8*, i8** %4
%113 = ptrtoint i8* %111 to i64
%114 = ptrtoint i8* %112 to i64
%115 = sub i64 %113, %114
%116 = icmp sgt i64 %115, 511
br i1 %116, label %117, label %120
117: ; preds = %110
%118 = load i32, i32* %5
%119 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i32 %118)
br label %120
120: ; preds = %117, %110
%121 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%122 = load i8*, i8** %4
%123 = call i32 @strncpy(i8* %121, i8* %122, i32 511)
%124 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%125 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%126 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%127 = call i32 @shout_save(i8* %124, i8* %125, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* %126)
%128 = load i32, i32* %5
%129 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i32 %128)
%130 = load i32, i32* @stdout
%131 = call i32 @fflush(i32 %130)
store i32 0, i32* %3
br label %132
132: ; preds = %120, %74, %63, %30, %19, %13
%133 = load i32, i32* %3
ret i32 %133
}

LLVM IR (-O2):
@.str = [56 x i8] c"\0Aqparse: parse error at line %d: expected '[' got '%c'\0A\00"
@.str.1 = [55 x i8] c"\0Aqparse: parse error at line %d: no closing ']' found\0A\00"
@.str.2 = [56 x i8] c"\0Aqparse: parse error at line %d: expected '<' got '%c'\0A\00"
@.str.3 = [55 x i8] c"\0Aqparse: parse error at line %d: no closing '>' found\0A\00"
@.str.4 = [66 x i8] c"\0Aqparse: warning at line %d: quote is longer than 511 characters\0A\00"
@.str.5 = [8 x i8] c"UNKNOWN\00"
@.str.6 = [18 x i8] c"\0DParsed %d lines.\00"
@stdout = global i32 0
define i32 @qparse(i8* %0, i32 %1) {
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = alloca [512 x i8]
%6 = icmp eq i8* %0, null
br i1 %6, label %69, label %7
7: ; preds = %2
%8 = load i8, i8* %0
%9 = icmp eq i8 %8, 91
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = sext i8 %8 to i32
%12 = tail call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %11)
br label %69
13: ; preds = %7
%14 = tail call i8* @strchr(i8* %0, i8 signext 93)
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %69
18: ; preds = %13
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%20 = getelementptr inbounds i8, i8* %0, i64 1
%21 = ptrtoint i8* %14 to i64
%22 = ptrtoint i8* %20 to i64
%23 = sub i64 %21, %22
%24 = icmp slt i64 %23, 255
%25 = select i1 %24, i64 %23, i64 255
%26 = trunc i64 %25 to i32
%27 = call i32 @strncpy(i8* %19, i8* %20, i32 %26)
%28 = getelementptr inbounds i8, i8* %14, i64 2
%29 = load i8, i8* %28
%30 = icmp eq i8 %29, 60
br i1 %30, label %34, label %31
31: ; preds = %18
%32 = sext i8 %29 to i32
%33 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0), i32 %1, i32 %32)
br label %67
34: ; preds = %18
%35 = call i8* @strchr(i8* %28, i8 signext 62)
%36 = icmp eq i8* %35, null
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 %1)
br label %67
39: ; preds = %34
%40 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%41 = getelementptr inbounds i8, i8* %14, i64 3
%42 = ptrtoint i8* %35 to i64
%43 = ptrtoint i8* %41 to i64
%44 = sub i64 %42, %43
%45 = icmp slt i64 %44, 255
%46 = select i1 %45, i64 %44, i64 255
%47 = trunc i64 %46 to i32
%48 = call i32 @strncpy(i8* %40, i8* %41, i32 %47)
%49 = getelementptr inbounds i8, i8* %35, i64 2
%50 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%51 = call i8* @strchr(i8* %49, i8 signext 13)
%52 = icmp eq i8* %51, null
br i1 %52, label %54, label %53
53: ; preds = %39
store i8 0, i8* %51
br label %54
54: ; preds = %53, %39
%55 = ptrtoint i8* %51 to i64
%56 = ptrtoint i8* %49 to i64
%57 = sub i64 %55, %56
%58 = icmp sgt i64 %57, 511
br i1 %58, label %59, label %61
59: ; preds = %54
%60 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i32 %1)
br label %61
61: ; preds = %59, %54
%62 = call i32 @strncpy(i8* %50, i8* %49, i32 511)
%63 = call i32 @shout_save(i8* %19, i8* %40, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* %50)
%64 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i32 %1)
%65 = load i32, i32* @stdout
%66 = call i32 @fflush(i32 %65)
br label %67
67: ; preds = %61, %37, %31
%68 = phi i32 [ %33, %31 ], [ 0, %61 ], [ %38, %37 ]
br label %69
69: ; preds = %16, %67, %2, %10
%70 = phi i32 [ %12, %10 ], [ 1, %2 ], [ %68, %67 ], [ %17, %16 ]
ret i32 %70
}