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


x86 assembly (clang, -O0):
<rparse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x570,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1199 <rparse+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1564 <rparse+0x3f4>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
je     11c9 <rparse+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    1564 <rparse+0x3f4>
mov    -0x10(%rbp),%rdi
mov    $0x5d,%esi
call   1040 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11ff <rparse+0x8f>
mov    -0x14(%rbp),%esi
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
mov    %eax,-0x4(%rbp)
jmp    1564 <rparse+0x3f4>
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
lea    -0x120(%rbp),%rax
mov    %rax,-0x538(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x530(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    $0x1,%rax
sub    %rax,%rcx
mov    $0xff,%eax
cmp    %rcx,%rax
jge    125d <rparse+0xed>
mov    $0xff,%eax
mov    %rax,-0x540(%rbp)
jmp    1273 <rparse+0x103>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
sub    %rcx,%rax
mov    %rax,-0x540(%rbp)
mov    -0x530(%rbp),%rsi
mov    -0x538(%rbp),%rdi
mov    -0x540(%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    $0x5b,%eax
je     12cb <rparse+0x15b>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
lea    0xd44(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
mov    %eax,-0x4(%rbp)
jmp    1564 <rparse+0x3f4>
mov    -0x10(%rbp),%rdi
mov    $0x5d,%esi
call   1040 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1301 <rparse+0x191>
mov    -0x14(%rbp),%esi
lea    0xd46(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
mov    %eax,-0x4(%rbp)
jmp    1564 <rparse+0x3f4>
lea    -0x220(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
lea    -0x220(%rbp),%rax
mov    %rax,-0x550(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x548(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    $0x1,%rax
sub    %rax,%rcx
mov    $0xff,%eax
cmp    %rcx,%rax
jge    135f <rparse+0x1ef>
mov    $0xff,%eax
mov    %rax,-0x558(%rbp)
jmp    1375 <rparse+0x205>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
sub    %rcx,%rax
mov    %rax,-0x558(%rbp)
mov    -0x548(%rbp),%rsi
mov    -0x550(%rbp),%rdi
mov    -0x558(%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     13cd <rparse+0x25d>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
lea    0xcb1(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
mov    %eax,-0x4(%rbp)
jmp    1564 <rparse+0x3f4>
mov    -0x10(%rbp),%rdi
mov    $0x3e,%esi
call   1040 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1403 <rparse+0x293>
mov    -0x14(%rbp),%esi
lea    0xcb3(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
mov    %eax,-0x4(%rbp)
jmp    1564 <rparse+0x3f4>
lea    -0x320(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
lea    -0x320(%rbp),%rax
mov    %rax,-0x568(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x560(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    $0x1,%rax
sub    %rax,%rcx
mov    $0xff,%eax
cmp    %rcx,%rax
jge    1461 <rparse+0x2f1>
mov    $0xff,%eax
mov    %rax,-0x570(%rbp)
jmp    1477 <rparse+0x307>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
sub    %rcx,%rax
mov    %rax,-0x570(%rbp)
mov    -0x560(%rbp),%rsi
mov    -0x568(%rbp),%rdi
mov    -0x570(%rbp),%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
lea    -0x520(%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,-0x528(%rbp)
cmpq   $0x0,-0x528(%rbp)
je     14df <rparse+0x36f>
mov    -0x528(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x528(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x1ff,%rax
jle    150a <rparse+0x39a>
mov    -0x14(%rbp),%esi
lea    0xbdb(%rip),%rdi
mov    $0x0,%al
call   1090 <bail@plt>
lea    -0x520(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1ff,%edx
call   1030 <strncpy@plt>
lea    -0x120(%rbp),%rdi
lea    -0x320(%rbp),%rsi
lea    -0x220(%rbp),%rdx
lea    -0x520(%rbp),%rcx
call   1070 <seen_save@plt>
mov    -0x14(%rbp),%esi
lea    0xbd8(%rip),%rdi
call   1050 <printf@plt>
mov    0x2a8a(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x570,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rparse>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x508,%rsp
test   %rdi,%rdi
je     1477 <rparse+0x307>
mov    %esi,%r15d
mov    %rdi,%rbp
movsbl (%rdi),%edx
cmp    $0x5b,%edx
jne    147e <rparse+0x30e>
mov    %rbp,%rdi
mov    $0x5d,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     149c <rparse+0x32c>
mov    %rax,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x2f0(%rsp)
movaps %xmm0,0x2e0(%rsp)
movaps %xmm0,0x2d0(%rsp)
movaps %xmm0,0x2c0(%rsp)
movaps %xmm0,0x2b0(%rsp)
movaps %xmm0,0x2a0(%rsp)
movaps %xmm0,0x290(%rsp)
movaps %xmm0,0x280(%rsp)
movaps %xmm0,0x270(%rsp)
movaps %xmm0,0x260(%rsp)
movaps %xmm0,0x250(%rsp)
movaps %xmm0,0x240(%rsp)
movaps %xmm0,0x230(%rsp)
movaps %xmm0,0x220(%rsp)
movaps %xmm0,0x210(%rsp)
movaps %xmm0,0x200(%rsp)
add    $0x1,%rbp
sub    %rbp,%rax
cmp    $0xff,%rax
mov    $0xff,%edx
cmovl  %eax,%edx
lea    0x200(%rsp),%rdi
mov    %rbp,%rsi
call   1030 <strncpy@plt>
movsbl 0x2(%rbx),%edx
cmp    $0x5b,%edx
jne    14ba <rparse+0x34a>
lea    0x2(%rbx),%rdi
mov    $0x5d,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     14c3 <rparse+0x353>
mov    %rax,%r14
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    $0x3,%rbx
sub    %rbx,%rax
cmp    $0xff,%rax
mov    $0xff,%edx
cmovl  %eax,%edx
lea    0x100(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <strncpy@plt>
movsbl 0x2(%r14),%edx
cmp    $0x3c,%edx
jne    14cc <rparse+0x35c>
lea    0x2(%r14),%rdi
mov    $0x3e,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     14df <rparse+0x36f>
mov    %rax,%rbx
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,%r14
sub    %r14,%rax
cmp    $0xff,%rax
mov    $0xff,%edx
cmovl  %eax,%edx
mov    %rsp,%rdi
mov    %r14,%rsi
call   1030 <strncpy@plt>
add    $0x2,%rbx
lea    0x300(%rsp),%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   1060 <memset@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1407 <rparse+0x297>
movb   $0x0,(%rax)
sub    %rbx,%rax
cmp    $0x200,%rax
jl     1423 <rparse+0x2b3>
lea    0xcc5(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1090 <bail@plt>
lea    0x300(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x1ff,%edx
call   1030 <strncpy@plt>
lea    0x200(%rsp),%rdi
mov    %rsp,%rsi
lea    0x100(%rsp),%rdx
mov    %rbp,%rcx
call   1070 <seen_save@plt>
lea    0xcc5(%rip),%rdi
mov    %r15d,%esi
call   1050 <printf@plt>
mov    0x2b74(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
xor    %eax,%eax
jmp    14f0 <rparse+0x380>
mov    $0x1,%eax
jmp    14f0 <rparse+0x380>
lea    0xb7b(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
add    $0x508,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <bail@plt>
lea    0xb95(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
add    $0x508,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <bail@plt>
lea    0xb3f(%rip),%rdi
jmp    14d3 <rparse+0x363>
lea    0xb6e(%rip),%rdi
jmp    14e6 <rparse+0x376>
lea    0xb9c(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1090 <bail@plt>
jmp    14f0 <rparse+0x380>
lea    0xbc1(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1090 <bail@plt>
add    $0x508,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [56 x i8] c"\0Arparse: parse error at line %d: expected '[' got '%c'\0A\00"
@.str.1 = [55 x i8] c"\0Arparse: parse error at line %d: no closing ']' found\0A\00"
@.str.2 = [56 x i8] c"\0Arparse: parse error at line %d: expected '<' got '%c'\0A\00"
@.str.3 = [55 x i8] c"\0Arparse: parse error at line %d: no closing '>' found\0A\00"
@.str.4 = [68 x i8] c"\0Arparse: warning at line %d: message is longer than 511 characters\0A\00"
@.str.5 = [18 x i8] c"\0DParsed %d lines.\00"
@stdout = global i32 0
define i32 @rparse(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 [256 x i8]
%10 = alloca [512 x i8]
%11 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
%12 = load i8*, i8** %4
%13 = icmp ne i8* %12, null
br i1 %13, label %15, label %14
14: ; preds = %2
store i32 1, i32* %3
br label %178
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 91
br i1 %19, label %20, label %26
20: ; preds = %15
%21 = load i32, i32* %5
%22 = load i8*, i8** %4
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %21, i32 %24)
store i32 %25, i32* %3
br label %178
26: ; preds = %15
%27 = load i8*, i8** %4
%28 = call i8* @strchr(i8* %27, i8 signext 93)
store i8* %28, i8** %6
%29 = load i8*, i8** %6
%30 = icmp ne i8* %29, null
br i1 %30, label %34, label %31
31: ; preds = %26
%32 = load i32, i32* %5
%33 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %32)
store i32 %33, i32* %3
br label %178
34: ; preds = %26
%35 = bitcast [256 x i8]* %7 to i8*
%36 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%37 = load i8*, i8** %4
%38 = getelementptr inbounds i8, i8* %37, i64 1
%39 = load i8*, i8** %6
%40 = load i8*, i8** %4
%41 = getelementptr inbounds i8, i8* %40, i64 1
%42 = ptrtoint i8* %39 to i64
%43 = ptrtoint i8* %41 to i64
%44 = sub i64 %42, %43
%45 = icmp slt i64 255, %44
br i1 %45, label %46, label %47
46: ; preds = %34
br label %54
47: ; preds = %34
%48 = load i8*, i8** %6
%49 = load i8*, i8** %4
%50 = getelementptr inbounds i8, i8* %49, i64 1
%51 = ptrtoint i8* %48 to i64
%52 = ptrtoint i8* %50 to i64
%53 = sub i64 %51, %52
br label %54
54: ; preds = %47, %46
%55 = phi i64 [ 255, %46 ], [ %53, %47 ]
%56 = trunc i64 %55 to i32
%57 = call i32 @strncpy(i8* %36, i8* %38, i32 %56)
%58 = load i8*, i8** %6
%59 = getelementptr inbounds i8, i8* %58, i64 2
store i8* %59, i8** %4
%60 = load i8*, i8** %4
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = icmp ne i32 %62, 91
br i1 %63, label %64, label %70
64: ; preds = %54
%65 = load i32, i32* %5
%66 = load i8*, i8** %4
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %65, i32 %68)
store i32 %69, i32* %3
br label %178
70: ; preds = %54
%71 = load i8*, i8** %4
%72 = call i8* @strchr(i8* %71, i8 signext 93)
store i8* %72, i8** %6
%73 = load i8*, i8** %6
%74 = icmp ne i8* %73, null
br i1 %74, label %78, label %75
75: ; preds = %70
%76 = load i32, i32* %5
%77 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %76)
store i32 %77, i32* %3
br label %178
78: ; preds = %70
%79 = bitcast [256 x i8]* %8 to i8*
%80 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%81 = load i8*, i8** %4
%82 = getelementptr inbounds i8, i8* %81, i64 1
%83 = load i8*, i8** %6
%84 = load i8*, i8** %4
%85 = getelementptr inbounds i8, i8* %84, i64 1
%86 = ptrtoint i8* %83 to i64
%87 = ptrtoint i8* %85 to i64
%88 = sub i64 %86, %87
%89 = icmp slt i64 255, %88
br i1 %89, label %90, label %91
90: ; preds = %78
br label %98
91: ; preds = %78
%92 = load i8*, i8** %6
%93 = load i8*, i8** %4
%94 = getelementptr inbounds i8, i8* %93, i64 1
%95 = ptrtoint i8* %92 to i64
%96 = ptrtoint i8* %94 to i64
%97 = sub i64 %95, %96
br label %98
98: ; preds = %91, %90
%99 = phi i64 [ 255, %90 ], [ %97, %91 ]
%100 = trunc i64 %99 to i32
%101 = call i32 @strncpy(i8* %80, i8* %82, i32 %100)
%102 = load i8*, i8** %6
%103 = getelementptr inbounds i8, i8* %102, i64 2
store i8* %103, i8** %4
%104 = load i8*, i8** %4
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = icmp ne i32 %106, 60
br i1 %107, label %108, label %114
108: ; preds = %98
%109 = load i32, i32* %5
%110 = load i8*, i8** %4
%111 = load i8, i8* %110
%112 = sext i8 %111 to i32
%113 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0), i32 %109, i32 %112)
store i32 %113, i32* %3
br label %178
114: ; preds = %98
%115 = load i8*, i8** %4
%116 = call i8* @strchr(i8* %115, i8 signext 62)
store i8* %116, i8** %6
%117 = load i8*, i8** %6
%118 = icmp ne i8* %117, null
br i1 %118, label %122, label %119
119: ; preds = %114
%120 = load i32, i32* %5
%121 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 %120)
store i32 %121, i32* %3
br label %178
122: ; preds = %114
%123 = bitcast [256 x i8]* %9 to i8*
%124 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%125 = load i8*, i8** %4
%126 = getelementptr inbounds i8, i8* %125, i64 1
%127 = load i8*, i8** %6
%128 = load i8*, i8** %4
%129 = getelementptr inbounds i8, i8* %128, i64 1
%130 = ptrtoint i8* %127 to i64
%131 = ptrtoint i8* %129 to i64
%132 = sub i64 %130, %131
%133 = icmp slt i64 255, %132
br i1 %133, label %134, label %135
134: ; preds = %122
br label %142
135: ; preds = %122
%136 = load i8*, i8** %6
%137 = load i8*, i8** %4
%138 = getelementptr inbounds i8, i8* %137, i64 1
%139 = ptrtoint i8* %136 to i64
%140 = ptrtoint i8* %138 to i64
%141 = sub i64 %139, %140
br label %142
142: ; preds = %135, %134
%143 = phi i64 [ 255, %134 ], [ %141, %135 ]
%144 = trunc i64 %143 to i32
%145 = call i32 @strncpy(i8* %124, i8* %126, i32 %144)
%146 = load i8*, i8** %6
%147 = getelementptr inbounds i8, i8* %146, i64 2
store i8* %147, i8** %4
%148 = bitcast [512 x i8]* %10 to i8*
%149 = load i8*, i8** %4
%150 = call i8* @strchr(i8* %149, i8 signext 13)
store i8* %150, i8** %11
%151 = load i8*, i8** %11
%152 = icmp ne i8* %151, null
br i1 %152, label %153, label %155
153: ; preds = %142
%154 = load i8*, i8** %11
store i8 0, i8* %154
br label %155
155: ; preds = %153, %142
%156 = load i8*, i8** %11
%157 = load i8*, i8** %4
%158 = ptrtoint i8* %156 to i64
%159 = ptrtoint i8* %157 to i64
%160 = sub i64 %158, %159
%161 = icmp sgt i64 %160, 511
br i1 %161, label %162, label %165
162: ; preds = %155
%163 = load i32, i32* %5
%164 = call i32 (i8*, i32, ...) @bail(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0), i32 %163)
br label %165
165: ; preds = %162, %155
%166 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%167 = load i8*, i8** %4
%168 = call i32 @strncpy(i8* %166, i8* %167, i32 511)
%169 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%170 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%171 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%172 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%173 = call i32 @seen_save(i8* %169, i8* %170, i8* %171, i8* %172)
%174 = load i32, i32* %5
%175 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %174)
%176 = load i32, i32* @stdout
%177 = call i32 @fflush(i32 %176)
store i32 0, i32* %3
br label %178
178: ; preds = %165, %119, %108, %75, %64, %31, %20, %14
%179 = load i32, i32* %3
ret i32 %179
}

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