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

/* Variables and functions */
char EOF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *);
void main() {
  int i = 0, issrc = 0;
  char node[5], src[5], des[5], c, last;
  FILE *fpin, *fpout;
  if ((fpin = fopen("input.txt", "r")) == NULL) {
    printf("Can not open input file.\n");
    exit(0);
  }
  if ((fpout = fopen("output.txt", "w")) == NULL) {
    printf("Can not open output file.\n");
    exit(0);
  }
  fprintf(fpout, "router\n");
  fprintf(fpout, "#node\tcomment\tyPos\txPos\n");
  while ((c = fgetc(fpin)) != '\n') {
    if (c >= '0' && c <= '9') {
      node[i] = c;
      i++;
    }
    if (c == ',' || c == ']') {
      node[i] = '\0';
      i = 0;
      fprintf(fpout, "%s\tNA\t0\t0\n", node);
    }
  }
  fprintf(fpout, "link\n");
  fprintf(fpout,
          "#    srcNode dstNode   bandwidth     metric    deLay   queue\n");
  i = 0;
  issrc = 1;
  while ((c = fgetc(fpin)) != EOF) {
    if (c == ',' && last >= '0' && last <= '9') {
      src[i] = '\0';
      i = 0;
      issrc = 0;
    }
    if (c == ')') {
      des[i] = '\0';
      i = 0;
      issrc = 1;
      fprintf(fpout, "\t%s\t%s\t100Mbps\t\t1\t10ms\t100\n", src, des);
    }
    if (c >= '0' && c <= '9')
      if (issrc == 1)
        src[i++] = c;
      else
        des[i++] = c;
    last = c;
  }
  fclose(fpout);
  fclose(fpin);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xe83(%rip),%rdi
lea    0xe86(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    11aa <main+0x4a>
lea    0xe6e(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1080 <exit@plt>
lea    0xe75(%rip),%rdi
lea    0xe79(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    11de <main+0x7e>
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1080 <exit@plt>
mov    -0x30(%rbp),%rdi
lea    0xe65(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xe5b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x18(%rbp)
movsbl %al,%eax
cmp    $0xa,%eax
je     128d <main+0x12d>
movsbl -0x18(%rbp),%eax
cmp    $0x30,%eax
jl     1248 <main+0xe8>
movsbl -0x18(%rbp),%eax
cmp    $0x39,%eax
jg     1248 <main+0xe8>
mov    -0x18(%rbp),%cl
movslq -0x4(%rbp),%rax
mov    %cl,-0xd(%rbp,%rax,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
movsbl -0x18(%rbp),%eax
cmp    $0x2c,%eax
je     1262 <main+0x102>
movsbl -0x18(%rbp),%eax
cmp    $0x5d,%eax
jne    1288 <main+0x128>
movslq -0x4(%rbp),%rax
movb   $0x0,-0xd(%rbp,%rax,1)
movl   $0x0,-0x4(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0xd(%rbp),%rdx
lea    0xdee(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    1202 <main+0xa2>
mov    -0x30(%rbp),%rdi
lea    0xde2(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xdd6(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x18(%rbp)
movsbl %al,%eax
mov    0x2d13(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     13bd <main+0x25d>
movsbl -0x18(%rbp),%eax
cmp    $0x2c,%eax
jne    131e <main+0x1be>
movsbl -0x19(%rbp),%eax
cmp    $0x30,%eax
jl     131e <main+0x1be>
movsbl -0x19(%rbp),%eax
cmp    $0x39,%eax
jg     131e <main+0x1be>
movslq -0x4(%rbp),%rax
movb   $0x0,-0x12(%rbp,%rax,1)
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x18(%rbp),%eax
cmp    $0x29,%eax
jne    135c <main+0x1fc>
movslq -0x4(%rbp),%rax
movb   $0x0,-0x17(%rbp,%rax,1)
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x12(%rbp),%rdx
lea    -0x17(%rbp),%rcx
lea    0xd69(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movsbl -0x18(%rbp),%eax
cmp    $0x30,%eax
jl     13b2 <main+0x252>
movsbl -0x18(%rbp),%eax
cmp    $0x39,%eax
jg     13b2 <main+0x252>
cmpl   $0x1,-0x8(%rbp)
jne    1399 <main+0x239>
mov    -0x18(%rbp),%cl
mov    -0x4(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
cltq
mov    %cl,-0x12(%rbp,%rax,1)
jmp    13ad <main+0x24d>
mov    -0x18(%rbp),%cl
mov    -0x4(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
cltq
mov    %cl,-0x17(%rbp,%rax,1)
jmp    13b2 <main+0x252>
mov    -0x18(%rbp),%al
mov    %al,-0x19(%rbp)
jmp    12bf <main+0x15f>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xe7b(%rip),%rdi
lea    0xe7e(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     135e <main+0x1ee>
mov    %rax,%rbx
lea    0xe68(%rip),%rdi
lea    0xe6c(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     1367 <main+0x1f7>
mov    %rax,%r14
lea    0xe56(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1090 <fwrite@plt>
lea    0xe45(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1090 <fwrite@plt>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
cmp    $0xa,%al
jne    125f <main+0xef>
lea    0xe44(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1090 <fwrite@plt>
lea    0xe31(%rip),%rdi
mov    $0x3d,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1090 <fwrite@plt>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    0x2dad(%rip),%rbp
cmp    0x0(%rbp),%al
jne    12b6 <main+0x146>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebp,%ebp
lea    0xdd2(%rip),%r15
lea    0x13(%rsp),%r12
jmp    129a <main+0x12a>
nop
movslq %ebp,%rax
movb   $0x0,0x13(%rsp,%rax,1)
xor    %ebp,%ebp
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
cmp    $0xa,%al
je     11fa <main+0x8a>
lea    -0x30(%rax),%ecx
cmp    $0x9,%cl
ja     12ac <main+0x13c>
movslq %ebp,%rbp
mov    %al,0x13(%rsp,%rbp,1)
add    $0x1,%ebp
cmp    $0x5d,%al
je     1270 <main+0x100>
cmp    $0x2c,%al
je     1270 <main+0x100>
jmp    128a <main+0x11a>
mov    $0x1,%r12d
xor    %ecx,%ecx
jmp    12e2 <main+0x172>
movslq %ecx,%rax
movb   $0x0,0xe(%rsp,%rax,1)
xor    %r12d,%r12d
xor    %r13d,%r13d
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    %r13d,%ecx
cmp    0x0(%rbp),%al
je     1240 <main+0xd0>
mov    %r15d,%edx
mov    %eax,%r15d
cmp    $0x2c,%al
jne    12f6 <main+0x186>
cmp    $0x30,%dl
jl     12f6 <main+0x186>
cmp    $0x39,%dl
jle    12c0 <main+0x150>
cmp    $0x29,%r15b
jne    1330 <main+0x1c0>
movslq %ecx,%rax
movb   $0x0,0x9(%rsp,%rax,1)
xor    %r13d,%r13d
mov    %r14,%rdi
lea    0xd78(%rip),%rsi
lea    0xe(%rsp),%rdx
lea    0x9(%rsp),%rcx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%r12d
jmp    12ce <main+0x15e>
nopw   0x0(%rax,%rax,1)
lea    -0x30(%r15),%eax
cmp    $0x9,%al
ja     134c <main+0x1dc>
lea    0x1(%rcx),%r13d
movslq %ecx,%rax
cmp    $0x1,%r12d
jne    1354 <main+0x1e4>
mov    %r15b,0xe(%rsp,%rax,1)
jmp    1322 <main+0x1b2>
mov    %ecx,%r13d
jmp    12ce <main+0x15e>
mov    %r15b,0x9(%rsp,%rax,1)
jmp    12ce <main+0x15e>
lea    0xd5a(%rip),%rdi
jmp    136e <main+0x1fe>
lea    0xd37(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [26 x i8] c"Can not open input file.\0A\00"
@.str.3 = [11 x i8] c"output.txt\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [27 x i8] c"Can not open output file.\0A\00"
@.str.6 = [8 x i8] c"router\0A\00"
@.str.7 = [25 x i8] c"#node\09comment\09yPos\09xPos\0A\00"
@.str.8 = [11 x i8] c"%s\09NA\090\090\0A\00"
@.str.9 = [6 x i8] c"link\0A\00"
@.str.10 = [62 x i8] c"# srcNode dstNode bandwidth metric deLay queue\0A\00"
@EOF = global i8 0
@.str.11 = [28 x i8] c"\09%s\09%s\09100Mbps\09\091\0910ms\09100\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [5 x i8]
%4 = alloca [5 x i8]
%5 = alloca [5 x i8]
%6 = alloca i8
%7 = alloca i8
%8 = alloca i32*
%9 = alloca i32*
store i32 0, i32* %1
store i32 0, i32* %2
%10 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %10, i32** %8
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @exit(i32 0)
unreachable
15: ; preds = %0
%16 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %16, i32** %9
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%20 = call i32 @exit(i32 0)
unreachable
21: ; preds = %15
%22 = load i32*, i32** %9
%23 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%24 = load i32*, i32** %9
%25 = call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
br label %26
26: ; preds = %61, %21
%27 = load i32*, i32** %8
%28 = call signext i8 @fgetc(i32* %27)
store i8 %28, i8* %6
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %29, 10
br i1 %30, label %31, label %62
31: ; preds = %26
%32 = load i8, i8* %6
%33 = sext i8 %32 to i32
%34 = icmp sge i32 %33, 48
br i1 %34, label %35, label %46
35: ; preds = %31
%36 = load i8, i8* %6
%37 = sext i8 %36 to i32
%38 = icmp sle i32 %37, 57
br i1 %38, label %39, label %46
39: ; preds = %35
%40 = load i8, i8* %6
%41 = load i32, i32* %1
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 %42
store i8 %40, i8* %43
%44 = load i32, i32* %1
%45 = add nsw i32 %44, 1
store i32 %45, i32* %1
br label %46
46: ; preds = %39, %35, %31
%47 = load i8, i8* %6
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 44
br i1 %49, label %54, label %50
50: ; preds = %46
%51 = load i8, i8* %6
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %52, 93
br i1 %53, label %54, label %61
54: ; preds = %50, %46
%55 = load i32, i32* %1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 %56
store i8 0, i8* %57
store i32 0, i32* %1
%58 = load i32*, i32** %9
%59 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%60 = call i32 (i32*, i8*, ...) @fprintf(i32* %58, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i8* %59)
br label %61
61: ; preds = %54, %50
br label %26
62: ; preds = %26
%63 = load i32*, i32** %9
%64 = call i32 (i32*, i8*, ...) @fprintf(i32* %63, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%65 = load i32*, i32** %9
%66 = call i32 (i32*, i8*, ...) @fprintf(i32* %65, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %1
store i32 1, i32* %2
br label %67
67: ; preds = %126, %62
%68 = load i32*, i32** %8
%69 = call signext i8 @fgetc(i32* %68)
store i8 %69, i8* %6
%70 = sext i8 %69 to i32
%71 = load i8, i8* @EOF
%72 = sext i8 %71 to i32
%73 = icmp ne i32 %70, %72
br i1 %73, label %74, label %128
74: ; preds = %67
%75 = load i8, i8* %6
%76 = sext i8 %75 to i32
%77 = icmp eq i32 %76, 44
br i1 %77, label %78, label %90
78: ; preds = %74
%79 = load i8, i8* %7
%80 = sext i8 %79 to i32
%81 = icmp sge i32 %80, 48
br i1 %81, label %82, label %90
82: ; preds = %78
%83 = load i8, i8* %7
%84 = sext i8 %83 to i32
%85 = icmp sle i32 %84, 57
br i1 %85, label %86, label %90
86: ; preds = %82
%87 = load i32, i32* %1
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 %88
store i8 0, i8* %89
store i32 0, i32* %1
store i32 0, i32* %2
br label %90
90: ; preds = %86, %82, %78, %74
%91 = load i8, i8* %6
%92 = sext i8 %91 to i32
%93 = icmp eq i32 %92, 41
br i1 %93, label %94, label %102
94: ; preds = %90
%95 = load i32, i32* %1
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 %96
store i8 0, i8* %97
store i32 0, i32* %1
store i32 1, i32* %2
%98 = load i32*, i32** %9
%99 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%100 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%101 = call i32 (i32*, i8*, ...) @fprintf(i32* %98, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i8* %99, i8* %100)
br label %102
102: ; preds = %94, %90
%103 = load i8, i8* %6
%104 = sext i8 %103 to i32
%105 = icmp sge i32 %104, 48
br i1 %105, label %106, label %126
106: ; preds = %102
%107 = load i8, i8* %6
%108 = sext i8 %107 to i32
%109 = icmp sle i32 %108, 57
br i1 %109, label %110, label %126
110: ; preds = %106
%111 = load i32, i32* %2
%112 = icmp eq i32 %111, 1
br i1 %112, label %113, label %119
113: ; preds = %110
%114 = load i8, i8* %6
%115 = load i32, i32* %1
%116 = add nsw i32 %115, 1
store i32 %116, i32* %1
%117 = sext i32 %115 to i64
%118 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 %117
store i8 %114, i8* %118
br label %125
119: ; preds = %110
%120 = load i8, i8* %6
%121 = load i32, i32* %1
%122 = add nsw i32 %121, 1
store i32 %122, i32* %1
%123 = sext i32 %121 to i64
%124 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 %123
store i8 %120, i8* %124
br label %125
125: ; preds = %119, %113
br label %126
126: ; preds = %125, %106, %102
%127 = load i8, i8* %6
store i8 %127, i8* %7
br label %67
128: ; preds = %67
%129 = load i32*, i32** %9
%130 = call i32 @fclose(i32* %129)
%131 = load i32*, i32** %8
%132 = call i32 @fclose(i32* %131)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.3 = [11 x i8] c"output.txt\00"
@.str.4 = [2 x i8] c"w\00"
@.str.6 = [8 x i8] c"router\0A\00"
@.str.7 = [25 x i8] c"#node\09comment\09yPos\09xPos\0A\00"
@.str.8 = [11 x i8] c"%s\09NA\090\090\0A\00"
@.str.9 = [6 x i8] c"link\0A\00"
@.str.10 = [62 x i8] c"# srcNode dstNode bandwidth metric deLay queue\0A\00"
@EOF = global i8 0
@.str.11 = [28 x i8] c"\09%s\09%s\09100Mbps\09\091\0910ms\09100\0A\00"
@str = [26 x i8] c"Can not open output file.\00"
@str.12 = [25 x i8] c"Can not open input file.\00"
define void @main() {
%1 = alloca [5 x i8]
%2 = alloca [5 x i8]
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%7 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.12, i64 0, i64 0))
%11 = tail call i32 @exit(i32 0)
unreachable
12: ; preds = %0
%13 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%17 = tail call i32 @exit(i32 0)
unreachable
18: ; preds = %12
%19 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i64 7, i64 1, i32* %13)
%20 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i64 24, i64 1, i32* %13)
%21 = call signext i8 @fgetc(i32* %7)
%22 = icmp eq i8 %21, 10
br i1 %22, label %42, label %23
23: ; preds = %18, %38
%24 = phi i8 [ %40, %38 ], [ %21, %18 ]
%25 = phi i32 [ %39, %38 ], [ 0, %18 ]
%26 = add i8 %24, -48
%27 = icmp ult i8 %26, 10
br i1 %27, label %28, label %32
28: ; preds = %23
%29 = sext i32 %25 to i64
%30 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 %29
store i8 %24, i8* %30
%31 = add nsw i32 %25, 1
br label %32
32: ; preds = %28, %23
%33 = phi i32 [ %31, %28 ], [ %25, %23 ]
switch i8 %24, label %38 [
i8 93, label %34
i8 44, label %34
]
34: ; preds = %32, %32
%35 = sext i32 %33 to i64
%36 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 %35
store i8 0, i8* %36
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i8* %4)
br label %38
38: ; preds = %32, %34
%39 = phi i32 [ 0, %34 ], [ %33, %32 ]
%40 = call signext i8 @fgetc(i32* %7)
%41 = icmp eq i8 %40, 10
br i1 %41, label %42, label %23
42: ; preds = %38, %18
%43 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i64 5, i64 1, i32* %13)
%44 = call i64 @fwrite(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.10, i64 0, i64 0), i64 61, i64 1, i32* %13)
%45 = call signext i8 @fgetc(i32* %7)
%46 = load i8, i8* @EOF
%47 = icmp eq i8 %45, %46
br i1 %47, label %84, label %48
48: ; preds = %42, %78
%49 = phi i8 [ %81, %78 ], [ %45, %42 ]
%50 = phi i32 [ %80, %78 ], [ 0, %42 ]
%51 = phi i32 [ %79, %78 ], [ 1, %42 ]
%52 = phi i8 [ %49, %78 ], [ undef, %42 ]
%53 = icmp eq i8 %49, 44
%54 = icmp sgt i8 %52, 47
%55 = select i1 %53, i1 %54, i1 false
%56 = icmp slt i8 %52, 58
%57 = select i1 %55, i1 %56, i1 false
br i1 %57, label %58, label %61
58: ; preds = %48
%59 = sext i32 %50 to i64
%60 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 %59
store i8 0, i8* %60
br label %78
61: ; preds = %48
%62 = icmp eq i8 %49, 41
br i1 %62, label %63, label %67
63: ; preds = %61
%64 = sext i32 %50 to i64
%65 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 %64
store i8 0, i8* %65
%66 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i8* %5, i8* %6)
br label %78
67: ; preds = %61
%68 = add i8 %49, -48
%69 = icmp ult i8 %68, 10
br i1 %69, label %70, label %78
70: ; preds = %67
%71 = icmp eq i32 %51, 1
%72 = add nsw i32 %50, 1
%73 = sext i32 %50 to i64
br i1 %71, label %74, label %76
74: ; preds = %70
%75 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 %73
store i8 %49, i8* %75
br label %78
76: ; preds = %70
%77 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 %73
store i8 %49, i8* %77
br label %78
78: ; preds = %63, %58, %74, %76, %67
%79 = phi i32 [ 1, %74 ], [ %51, %76 ], [ %51, %67 ], [ 0, %58 ], [ 1, %63 ]
%80 = phi i32 [ %72, %74 ], [ %72, %76 ], [ %50, %67 ], [ 0, %58 ], [ 0, %63 ]
%81 = call signext i8 @fgetc(i32* %7)
%82 = load i8, i8* @EOF
%83 = icmp eq i8 %81, %82
br i1 %83, label %84, label %48
84: ; preds = %78, %42
%85 = call i32 @fclose(i32* %13)
%86 = call i32 @fclose(i32* %7)
ret void
}