#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*/ fprintf(int /*<<< orphan*/, char *, char const *, ...);
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
int /*<<< orphan*/ stderr;
char *strrchr(char const *, char);
unsigned int strtol(char const *, char **, int);
int parse_file_line_column(const char *input, char **filename, unsigned *line,
                           unsigned *column, unsigned *second_line,
                           unsigned *second_column) {
  const char *last_colon = strrchr(input, ':');
  unsigned values[4], i;
  unsigned num_values = (second_line && second_column) ? 4 : 2;
  char *endptr = 0;
  if (!last_colon || last_colon == input) {
    if (num_values == 4)
      fprintf(stderr,
              "could not parse filename:line:column:line:column in "
              "'%s'\n",
              input);
    else
      fprintf(stderr, "could not parse filename:line:column in '%s'\n", input);
    return 1;
  }
  for (i = 0; i != num_values; ++i) {
    const char *prev_colon;
    values[num_values - i - 1] = strtol(last_colon + 1, &endptr, 10);
    if (*endptr != 0 && *endptr != ':') {
      fprintf(stderr, "could not parse %s in '%s'\n",
              (i % 2 ? "column" : "line"), input);
      return 1;
    }
    if (i + 1 == num_values)
      break;
    prev_colon = last_colon - 1;
    while (prev_colon != input && *prev_colon != ':')
      --prev_colon;
    if (prev_colon == input) {
      fprintf(stderr, "could not parse %s in '%s'\n",
              (i % 2 == 0 ? "column" : "line"), input);
      return 1;
    }
    last_colon = prev_colon;
  }
  *line = values[0];
  *column = values[1];
  if (second_line && second_column) {
    *second_line = values[2];
    *second_column = values[3];
  }
  *filename = (char *)malloc(last_colon - input + 1);
  memcpy(*filename, input, last_colon - input);
  (*filename)[last_colon - input] = 0;
  return 0;
}


x86 assembly (clang, -O0):
<parse_file_line_column>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x40(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x30(%rbp)
mov    %al,-0x69(%rbp)
je     119d <parse_file_line_column+0x4d>
cmpq   $0x0,-0x38(%rbp)
setne  %al
mov    %al,-0x69(%rbp)
mov    -0x69(%rbp),%dl
mov    $0x2,%eax
mov    $0x4,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     11d4 <parse_file_line_column+0x84>
mov    -0x40(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1225 <parse_file_line_column+0xd5>
cmpl   $0x4,-0x58(%rbp)
jne    11fe <parse_file_line_column+0xae>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe0e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1219 <parse_file_line_column+0xc9>
mov    0x2ddb(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe28(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    141f <parse_file_line_column+0x2cf>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x58(%rbp),%eax
je     138b <parse_file_line_column+0x23b>
mov    -0x40(%rbp),%rdi
add    $0x1,%rdi
lea    -0x60(%rbp),%rsi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    %eax,%ecx
mov    -0x58(%rbp),%eax
sub    -0x54(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
mov    %ecx,-0x50(%rbp,%rax,4)
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     12c1 <parse_file_line_column+0x171>
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
je     12c1 <parse_file_line_column+0x171>
mov    0x2d5a(%rip),%rax
mov    (%rax),%edi
mov    -0x54(%rbp),%ecx
and    $0x1,%ecx
lea    0xdf6(%rip),%rdx
lea    0xde8(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x10(%rbp),%rcx
lea    0xdba(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    141f <parse_file_line_column+0x2cf>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
cmp    -0x58(%rbp),%eax
jne    12d5 <parse_file_line_column+0x185>
jmp    138b <parse_file_line_column+0x23b>
mov    -0x40(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x6a(%rbp)
je     1304 <parse_file_line_column+0x1b4>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
setne  %al
mov    %al,-0x6a(%rbp)
mov    -0x6a(%rbp),%al
test   $0x1,%al
jne    1314 <parse_file_line_column+0x1c4>
jmp    1325 <parse_file_line_column+0x1d5>
mov    -0x68(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x68(%rbp)
jmp    12e1 <parse_file_line_column+0x191>
mov    -0x68(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1375 <parse_file_line_column+0x225>
mov    0x2ca6(%rip),%rax
mov    (%rax),%edi
mov    -0x54(%rbp),%ecx
and    $0x1,%ecx
lea    0xd42(%rip),%rdx
lea    0xd34(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rdx
mov    -0x10(%rbp),%rcx
lea    0xd06(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    141f <parse_file_line_column+0x2cf>
mov    -0x68(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    122c <parse_file_line_column+0xdc>
mov    -0x50(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4c(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x30(%rbp)
je     13c5 <parse_file_line_column+0x275>
cmpq   $0x0,-0x38(%rbp)
je     13c5 <parse_file_line_column+0x275>
mov    -0x48(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x44(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x40(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x40(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   1060 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x40(%rbp),%rcx
mov    -0x10(%rbp),%rdx
sub    %rdx,%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_file_line_column>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9,%r13
mov    %r8,%rbp
mov    %rcx,0x48(%rsp)
mov    %rdx,0x40(%rsp)
mov    %rsi,%r12
mov    %rdi,%r15
mov    $0x3a,%esi
call   1030 <strrchr@plt>
mov    %rax,%rbx
test   %rbp,%rbp
setne  %al
test   %r13,%r13
setne  %r14b
and    %al,%r14b
movq   $0x0,0x8(%rsp)
test   %rbx,%rbx
je     1241 <parse_file_line_column+0xf1>
cmp    %r15,%rbx
je     1241 <parse_file_line_column+0xf1>
mov    %rbp,0x28(%rsp)
mov    %r13,0x30(%rsp)
mov    %r12,0x38(%rsp)
movzbl %r14b,%eax
lea    (%rax,%rax,1),%r12d
add    $0x2,%r12d
lea    -0x1(%r12),%eax
mov    %rax,0x50(%rsp)
xor    %ebp,%ebp
lea    0x8(%rsp),%rsi
lea    0x1(%rbx),%rdi
mov    %rsi,%r13
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    %ebp,%ecx
not    %ecx
add    %r12d,%ecx
mov    %eax,0x10(%rsp,%rcx,4)
mov    0x8(%rsp),%rax
mov    (%rax),%al
test   %al,%al
je     1207 <parse_file_line_column+0xb7>
cmp    $0x3a,%al
jne    130d <parse_file_line_column+0x1bd>
cmp    0x50(%rsp),%rbp
je     12af <parse_file_line_column+0x15f>
add    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
cmp    %r15,%rbx
je     1258 <parse_file_line_column+0x108>
lea    -0x1(%rbx),%rax
cmpb   $0x3a,(%rbx)
mov    %rax,%rbx
jne    1220 <parse_file_line_column+0xd0>
add    $0x1,%rbp
add    $0x1,%rax
mov    %rax,%rbx
mov    %r13,%rsi
jmp    11d8 <parse_file_line_column+0x88>
mov    0x2d98(%rip),%rax
mov    (%rax),%edi
test   %r14b,%r14b
je     128a <parse_file_line_column+0x13a>
lea    0xdaa(%rip),%rsi
jmp    1291 <parse_file_line_column+0x141>
mov    0x2d81(%rip),%rax
mov    (%rax),%edi
test   $0x1,%bpl
lea    0xe18(%rip),%rax
lea    0xe18(%rip),%rdx
cmove  %rax,%rdx
lea    0xdea(%rip),%rsi
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    129b <parse_file_line_column+0x14b>
lea    0xda9(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0x1,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x10(%rsp),%eax
mov    0x40(%rsp),%rcx
mov    %eax,(%rcx)
mov    0x14(%rsp),%eax
mov    0x48(%rsp),%rcx
mov    %eax,(%rcx)
test   %r14b,%r14b
je     12e0 <parse_file_line_column+0x190>
mov    0x18(%rsp),%eax
mov    0x28(%rsp),%rcx
mov    %eax,(%rcx)
mov    0x1c(%rsp),%eax
mov    0x30(%rsp),%rcx
mov    %eax,(%rcx)
sub    %r15,%rbx
lea    0x1(%rbx),%edi
call   1070 <malloc@plt>
mov    0x38(%rsp),%rbp
mov    %rax,0x0(%rbp)
mov    %rax,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1060 <memcpy@plt>
mov    0x0(%rbp),%rax
movb   $0x0,(%rax,%rbx,1)
xor    %eax,%eax
jmp    12a0 <parse_file_line_column+0x150>
mov    0x2ccc(%rip),%rax
mov    (%rax),%edi
test   $0x1,%bpl
lea    0xd6a(%rip),%rax
lea    0xd5c(%rip),%rdx
jmp    1273 <parse_file_line_column+0x123>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"could not parse filename:line:column:line:column in '%s'\0A\00"
@.str.1 = [46 x i8] c"could not parse filename:line:column in '%s'\0A\00"
@.str.2 = [28 x i8] c"could not parse %s in '%s'\0A\00"
@.str.3 = [7 x i8] c"column\00"
@.str.4 = [5 x i8] c"line\00"
define i32 @parse_file_line_column(i8* %0, i8** %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8**
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i8*
%15 = alloca [4 x i32]
%16 = alloca i32
%17 = alloca i32
%18 = alloca i8*
%19 = alloca i8*
store i8* %0, i8** %8
store i8** %1, i8*** %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%20 = load i8*, i8** %8
%21 = call i8* @strrchr(i8* %20, i8 signext 58)
store i8* %21, i8** %14
%22 = load i32*, i32** %12
%23 = icmp ne i32* %22, null
br i1 %23, label %24, label %27
24: ; preds = %6
%25 = load i32*, i32** %13
%26 = icmp ne i32* %25, null
br label %27
27: ; preds = %24, %6
%28 = phi i1 [ false, %6 ], [ %26, %24 ]
%29 = zext i1 %28 to i64
%30 = select i1 %28, i32 4, i32 2
store i32 %30, i32* %17
store i8* null, i8** %18
%31 = load i8*, i8** %14
%32 = icmp ne i8* %31, null
br i1 %32, label %33, label %37
33: ; preds = %27
%34 = load i8*, i8** %14
%35 = load i8*, i8** %8
%36 = icmp eq i8* %34, %35
br i1 %36, label %37, label %49
37: ; preds = %33, %27
%38 = load i32, i32* %17
%39 = icmp eq i32 %38, 4
br i1 %39, label %40, label %44
40: ; preds = %37
%41 = load i32, i32* @stderr
%42 = load i8*, i8** %8
%43 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %42)
br label %48
44: ; preds = %37
%45 = load i32, i32* @stderr
%46 = load i8*, i8** %8
%47 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* %46)
br label %48
48: ; preds = %44, %40
store i32 1, i32* %7
br label %171
49: ; preds = %33
store i32 0, i32* %16
br label %50
50: ; preds = %120, %49
%51 = load i32, i32* %16
%52 = load i32, i32* %17
%53 = icmp ne i32 %51, %52
br i1 %53, label %54, label %123
54: ; preds = %50
%55 = load i8*, i8** %14
%56 = getelementptr inbounds i8, i8* %55, i64 1
%57 = call i32 @strtol(i8* %56, i8** %18, i32 10)
%58 = load i32, i32* %17
%59 = load i32, i32* %16
%60 = sub i32 %58, %59
%61 = sub i32 %60, 1
%62 = zext i32 %61 to i64
%63 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 %62
store i32 %57, i32* %63
%64 = load i8*, i8** %18
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = icmp ne i32 %66, 0
br i1 %67, label %68, label %82
68: ; preds = %54
%69 = load i8*, i8** %18
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = icmp ne i32 %71, 58
br i1 %72, label %73, label %82
73: ; preds = %68
%74 = load i32, i32* @stderr
%75 = load i32, i32* %16
%76 = urem i32 %75, 2
%77 = icmp ne i32 %76, 0
%78 = zext i1 %77 to i64
%79 = select i1 %77, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0)
%80 = load i8*, i8** %8
%81 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* %79, i8* %80)
store i32 1, i32* %7
br label %171
82: ; preds = %68, %54
%83 = load i32, i32* %16
%84 = add i32 %83, 1
%85 = load i32, i32* %17
%86 = icmp eq i32 %84, %85
br i1 %86, label %87, label %88
87: ; preds = %82
br label %123
88: ; preds = %82
%89 = load i8*, i8** %14
%90 = getelementptr inbounds i8, i8* %89, i64 -1
store i8* %90, i8** %19
br label %91
91: ; preds = %102, %88
%92 = load i8*, i8** %19
%93 = load i8*, i8** %8
%94 = icmp ne i8* %92, %93
br i1 %94, label %95, label %100
95: ; preds = %91
%96 = load i8*, i8** %19
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp ne i32 %98, 58
br label %100
100: ; preds = %95, %91
%101 = phi i1 [ false, %91 ], [ %99, %95 ]
br i1 %101, label %102, label %105
102: ; preds = %100
%103 = load i8*, i8** %19
%104 = getelementptr inbounds i8, i8* %103, i32 -1
store i8* %104, i8** %19
br label %91
105: ; preds = %100
%106 = load i8*, i8** %19
%107 = load i8*, i8** %8
%108 = icmp eq i8* %106, %107
br i1 %108, label %109, label %118
109: ; preds = %105
%110 = load i32, i32* @stderr
%111 = load i32, i32* %16
%112 = urem i32 %111, 2
%113 = icmp eq i32 %112, 0
%114 = zext i1 %113 to i64
%115 = select i1 %113, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0)
%116 = load i8*, i8** %8
%117 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* %115, i8* %116)
store i32 1, i32* %7
br label %171
118: ; preds = %105
%119 = load i8*, i8** %19
store i8* %119, i8** %14
br label %120
120: ; preds = %118
%121 = load i32, i32* %16
%122 = add i32 %121, 1
store i32 %122, i32* %16
br label %50
123: ; preds = %87, %50
%124 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 0
%125 = load i32, i32* %124
%126 = load i32*, i32** %10
store i32 %125, i32* %126
%127 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 1
%128 = load i32, i32* %127
%129 = load i32*, i32** %11
store i32 %128, i32* %129
%130 = load i32*, i32** %12
%131 = icmp ne i32* %130, null
br i1 %131, label %132, label %142
132: ; preds = %123
%133 = load i32*, i32** %13
%134 = icmp ne i32* %133, null
br i1 %134, label %135, label %142
135: ; preds = %132
%136 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 2
%137 = load i32, i32* %136
%138 = load i32*, i32** %12
store i32 %137, i32* %138
%139 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 3
%140 = load i32, i32* %139
%141 = load i32*, i32** %13
store i32 %140, i32* %141
br label %142
142: ; preds = %135, %132, %123
%143 = load i8*, i8** %14
%144 = load i8*, i8** %8
%145 = ptrtoint i8* %143 to i64
%146 = ptrtoint i8* %144 to i64
%147 = sub i64 %145, %146
%148 = add nsw i64 %147, 1
%149 = trunc i64 %148 to i32
%150 = call i64 @malloc(i32 %149)
%151 = inttoptr i64 %150 to i8*
%152 = load i8**, i8*** %9
store i8* %151, i8** %152
%153 = load i8**, i8*** %9
%154 = load i8*, i8** %153
%155 = load i8*, i8** %8
%156 = load i8*, i8** %14
%157 = load i8*, i8** %8
%158 = ptrtoint i8* %156 to i64
%159 = ptrtoint i8* %157 to i64
%160 = sub i64 %158, %159
%161 = trunc i64 %160 to i32
%162 = call i32 @memcpy(i8* %154, i8* %155, i32 %161)
%163 = load i8**, i8*** %9
%164 = load i8*, i8** %163
%165 = load i8*, i8** %14
%166 = load i8*, i8** %8
%167 = ptrtoint i8* %165 to i64
%168 = ptrtoint i8* %166 to i64
%169 = sub i64 %167, %168
%170 = getelementptr inbounds i8, i8* %164, i64 %169
store i8 0, i8* %170
store i32 0, i32* %7
br label %171
171: ; preds = %142, %109, %73, %48
%172 = load i32, i32* %7
ret i32 %172
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"could not parse filename:line:column:line:column in '%s'\0A\00"
@.str.1 = [46 x i8] c"could not parse filename:line:column in '%s'\0A\00"
@.str.2 = [28 x i8] c"could not parse %s in '%s'\0A\00"
@.str.3 = [7 x i8] c"column\00"
@.str.4 = [5 x i8] c"line\00"
define i32 @parse_file_line_column(i8* %0, i8** nocapture %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* writeonly %4, i32* writeonly %5) {
%7 = alloca [4 x i32]
%8 = alloca i8*
%9 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 58)
%10 = bitcast [4 x i32]* %7 to i8*
%11 = icmp ne i32* %4, null
%12 = icmp ne i32* %5, null
%13 = and i1 %11, %12
%14 = select i1 %13, i32 4, i32 2
%15 = bitcast i8** %8 to i8*
store i8* null, i8** %8
%16 = icmp eq i8* %9, null
%17 = icmp eq i8* %9, %0
%18 = or i1 %16, %17
br i1 %18, label %22, label %19
19: ; preds = %6
%20 = add nsw i32 %14, -1
%21 = zext i32 %20 to i64
br label %28
22: ; preds = %6
%23 = load i32, i32* @stderr
br i1 %13, label %24, label %26
24: ; preds = %22
%25 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %84
26: ; preds = %22
%27 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %84
28: ; preds = %61, %19
%29 = phi i64 [ 0, %19 ], [ %62, %61 ]
%30 = phi i8* [ %9, %19 ], [ %50, %61 ]
%31 = trunc i64 %29 to i32
%32 = getelementptr inbounds i8, i8* %30, i64 1
%33 = call i32 @strtol(i8* %32, i8** %8, i32 10)
%34 = xor i32 %31, -1
%35 = add i32 %14, %34
%36 = zext i32 %35 to i64
%37 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 %36
store i32 %33, i32* %37
%38 = load i8*, i8** %8
%39 = load i8, i8* %38
switch i8 %39, label %40 [
i8 0, label %46
i8 58, label %46
]
40: ; preds = %28
%41 = load i32, i32* @stderr
%42 = and i64 %29, 1
%43 = icmp eq i64 %42, 0
%44 = select i1 %43, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0)
%45 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* %44, i8* %0)
br label %84
46: ; preds = %28, %28
%47 = icmp eq i64 %29, %21
br i1 %47, label %63, label %48
48: ; preds = %46, %52
%49 = phi i8* [ %50, %52 ], [ %30, %46 ]
%50 = getelementptr inbounds i8, i8* %49, i64 -1
%51 = icmp eq i8* %50, %0
br i1 %51, label %55, label %52
52: ; preds = %48
%53 = load i8, i8* %50
%54 = icmp eq i8 %53, 58
br i1 %54, label %61, label %48
55: ; preds = %48
%56 = load i32, i32* @stderr
%57 = and i64 %29, 1
%58 = icmp eq i64 %57, 0
%59 = select i1 %58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0)
%60 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* %59, i8* %0)
br label %84
61: ; preds = %52
%62 = add nuw nsw i64 %29, 1
br label %28
63: ; preds = %46
%64 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
%65 = load i32, i32* %64
store i32 %65, i32* %2
%66 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 1
%67 = load i32, i32* %66
store i32 %67, i32* %3
br i1 %13, label %68, label %73
68: ; preds = %63
%69 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 2
%70 = load i32, i32* %69
store i32 %70, i32* %4
%71 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 3
%72 = load i32, i32* %71
store i32 %72, i32* %5
br label %73
73: ; preds = %68, %63
%74 = ptrtoint i8* %30 to i64
%75 = ptrtoint i8* %0 to i64
%76 = sub i64 %74, %75
%77 = trunc i64 %76 to i32
%78 = add i32 %77, 1
%79 = tail call i64 @malloc(i32 %78)
%80 = inttoptr i64 %79 to i8*
store i8* %80, i8** %1
%81 = tail call i32 @memcpy(i8* %80, i8* %0, i32 %77)
%82 = load i8*, i8** %1
%83 = getelementptr inbounds i8, i8* %82, i64 %76
store i8 0, i8* %83
br label %84
84: ; preds = %55, %40, %24, %26, %73
%85 = phi i32 [ 0, %73 ], [ 1, %26 ], [ 1, %24 ], [ 1, %40 ], [ 1, %55 ]
ret i32 %85
}