#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int rm_so;
  int /*<<< orphan*/ rm_eo;
};
typedef TYPE_1__ regmatch_t;
typedef int /*<<< orphan*/ regex_t;
typedef int /*<<< orphan*/ lbuf;
typedef int /*<<< orphan*/ ebuf;

/* Variables and functions */
int REG_NOMATCH;
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int regcomp(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ regerror(int, int /*<<< orphan*/ *, char *, int);
int regexec(int /*<<< orphan*/ *, char *, size_t const, TYPE_1__ *,
            int /*<<< orphan*/);
int /*<<< orphan*/ regfree(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int strlen(char *);
char *substr(char *, int, int /*<<< orphan*/);
int main(int argc, char **argv) {
  char *str;
  int x, z, lno = 0;
  char ebuf[128], lbuf[256];
  regex_t reg;
  regmatch_t pm[10];
  const size_t nmatch = 10;
  str = argv[1];
  z = regcomp(&reg, str, 0);
  if (z != 0) {
    regerror(z, &reg, ebuf, sizeof(ebuf));
    fprintf(stderr, "%s: string '%s' \n", ebuf, str);
    return 1;
  }
  printf("****** the regex is \"%s\" ******\n", str);
  while (fgets(lbuf, sizeof(lbuf), stdin)) {
    ++lno;
    if ((z = strlen(lbuf)) > 0 && lbuf[z - 1] == '\n') {
      lbuf[z - 1] = 0;
    }
    z = regexec(&reg, lbuf, nmatch, pm, 0);
    if (z == REG_NOMATCH)
      continue;
    else if (z != 0) {
      regerror(z, &reg, ebuf, sizeof(ebuf));
      fprintf(stderr, "%s: regcom('%s')\n", ebuf, lbuf);
      return 2;
    }
    for (x = 0; x < nmatch && pm[x].rm_so != -1; ++x) {
      if (!x)
        printf("%04d: %s\n", lno, lbuf);
      printf("  $%d='%s'\n", x, substr(lbuf, pm[x].rm_so, pm[x].rm_eo));
    }
  }
  regfree(&reg);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
movq   $0xa,-0x218(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    -0x1b4(%rbp),%rdi
xor    %edx,%edx
call   1070 <regcomp@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     122d <main+0x9d>
mov    -0x20(%rbp),%edi
lea    -0xb0(%rbp),%rdx
lea    -0x1b4(%rbp),%rsi
mov    $0x80,%ecx
call   10a0 <regerror@plt>
mov    0x2dc8(%rip),%rax
mov    (%rax),%edi
lea    -0xb0(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xde4(%rip),%rsi
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1411 <main+0x281>
mov    -0x18(%rbp),%rsi
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x1b0(%rbp),%rdi
mov    0x2d9b(%rip),%rax
mov    (%rax),%edx
mov    $0x100,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     13fe <main+0x26e>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
lea    -0x1b0(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
jle    12ad <main+0x11d>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x1b0(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    12ad <main+0x11d>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x1b0(%rbp,%rax,1)
lea    -0x1b0(%rbp),%rsi
lea    -0x210(%rbp),%rcx
lea    -0x1b4(%rbp),%rdi
mov    $0xa,%edx
xor    %r8d,%r8d
call   10b0 <regexec@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    0x2d04(%rip),%rcx
cmp    (%rcx),%eax
jne    12e9 <main+0x159>
jmp    123f <main+0xaf>
cmpl   $0x0,-0x20(%rbp)
je     133d <main+0x1ad>
mov    -0x20(%rbp),%edi
lea    -0xb0(%rbp),%rdx
lea    -0x1b4(%rbp),%rsi
mov    $0x80,%ecx
call   10a0 <regerror@plt>
mov    0x2cbb(%rip),%rax
mov    (%rax),%edi
lea    -0xb0(%rbp),%rdx
lea    -0x1b0(%rbp),%rcx
lea    0xd07(%rip),%rsi
call   1090 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1411 <main+0x281>
jmp    1342 <main+0x1b2>
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rcx
xor    %eax,%eax
cmp    $0xa,%rcx
mov    %al,-0x219(%rbp)
jae    1374 <main+0x1e4>
movslq -0x1c(%rbp),%rax
cmpl   $0xffffffff,-0x210(%rbp,%rax,8)
ff
setne  %al
mov    %al,-0x219(%rbp)
mov    -0x219(%rbp),%al
test   $0x1,%al
jne    1387 <main+0x1f7>
jmp    13f9 <main+0x269>
cmpl   $0x0,-0x1c(%rbp)
jne    13a9 <main+0x219>
mov    -0x24(%rbp),%esi
lea    -0x1b0(%rbp),%rdx
lea    0xca3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x220(%rbp)
lea    -0x1b0(%rbp),%rdi
movslq -0x1c(%rbp),%rax
mov    -0x210(%rbp,%rax,8),%esi
movslq -0x1c(%rbp),%rax
mov    -0x20c(%rbp,%rax,8),%edx
call   1050 <substr@plt>
mov    -0x220(%rbp),%esi
mov    %rax,%rdx
lea    0xc6b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1349 <main+0x1b9>
jmp    123f <main+0xaf>
lea    -0x1b4(%rbp),%rdi
call   1030 <regfree@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1e8,%rsp
mov    0x8(%rsi),%rbx
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   1070 <regcomp@plt>
test   %eax,%eax
je     11f9 <main+0x69>
lea    0xc(%rsp),%rsi
lea    0x160(%rsp),%rbp
mov    %eax,%edi
mov    %rbp,%rdx
mov    $0x80,%ecx
call   10a0 <regerror@plt>
mov    0x2df5(%rip),%rax
mov    (%rax),%edi
lea    0xe1c(%rip),%rsi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   1090 <fprintf@plt>
mov    $0x1,%eax
jmp    1360 <main+0x1d0>
lea    0xe12(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2dd7(%rip),%rax
mov    (%rax),%edx
lea    0x60(%rsp),%rdi
mov    $0x100,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     1314 <main+0x184>
lea    0x60(%rsp),%rbx
lea    0x10(%rsp),%r15
lea    0xe09(%rip),%r12
lea    0xe0c(%rip),%r13
xor    %ebp,%ebp
jmp    126f <main+0xdf>
nopw   0x0(%rax,%rax,1)
mov    0x2d91(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     1314 <main+0x184>
mov    %rbx,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    128a <main+0xfa>
add    $0xffffffff,%eax
cmpb   $0xa,0x60(%rsp,%rax,1)
jne    128a <main+0xfa>
movb   $0x0,0x60(%rsp,%rax,1)
add    $0x1,%ebp
mov    $0xa,%edx
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
mov    %r15,%rcx
xor    %r8d,%r8d
call   10b0 <regexec@plt>
mov    0x2d34(%rip),%rcx
cmp    (%rcx),%eax
je     1250 <main+0xc0>
test   %eax,%eax
jne    1322 <main+0x192>
xor    %r14d,%r14d
jmp    12eb <main+0x15b>
nopl   0x0(%rax)
mov    0x14(%rsp,%r14,8),%edx
mov    %rbx,%rdi
call   1050 <substr@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r14
cmp    $0xa,%r14
je     1250 <main+0xc0>
mov    0x10(%rsp,%r14,8),%esi
cmp    $0xffffffff,%esi
je     1250 <main+0xc0>
test   %r14,%r14
jne    12c0 <main+0x130>
mov    %r12,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x10(%rsp,%r14,8),%esi
jmp    12c0 <main+0x130>
lea    0xc(%rsp),%rdi
call   1030 <regfree@plt>
xor    %eax,%eax
jmp    1360 <main+0x1d0>
lea    0xc(%rsp),%rsi
lea    0x160(%rsp),%rbx
mov    %eax,%edi
mov    %rbx,%rdx
mov    $0x80,%ecx
call   10a0 <regerror@plt>
mov    0x2c8b(%rip),%rax
mov    (%rax),%edi
lea    0xce5(%rip),%rsi
lea    0x60(%rsp),%rcx
mov    %rbx,%rdx
call   1090 <fprintf@plt>
mov    $0x2,%eax
add    $0x1e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
@stderr = global i32 0
@.str = [18 x i8] c"%s: string '%s' \0A\00"
@.str.1 = [33 x i8] c"****** the regex is \22%s\22 ******\0A\00"
@stdin = global i32 0
@REG_NOMATCH = global i32 0
@.str.2 = [18 x i8] c"%s: regcom('%s')\0A\00"
@.str.3 = [10 x i8] c"%04d: %s\0A\00"
@.str.4 = [12 x i8] c" $%d='%s'\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [128 x i8]
%11 = alloca [256 x i8]
%12 = alloca i32
%13 = alloca [10 x %struct.TYPE_3__]
%14 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
store i64 10, i64* %14
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
store i8* %17, i8** %6
%18 = load i8*, i8** %6
%19 = call i32 @regcomp(i32* %12, i8* %18, i32 0)
store i32 %19, i32* %8
%20 = load i32, i32* %8
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %30
22: ; preds = %2
%23 = load i32, i32* %8
%24 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%25 = call i32 @regerror(i32 %23, i32* %12, i8* %24, i32 128)
%26 = load i32, i32* @stderr
%27 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%28 = load i8*, i8** %6
%29 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %27, i8* %28)
store i32 1, i32* %3
br label %119
30: ; preds = %2
%31 = load i8*, i8** %6
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %31)
br label %33
33: ; preds = %116, %64, %30
%34 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%35 = load i32, i32* @stdin
%36 = call i64 @fgets(i8* %34, i32 256, i32 %35)
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %117
38: ; preds = %33
%39 = load i32, i32* %9
%40 = add nsw i32 %39, 1
store i32 %40, i32* %9
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%42 = call i32 @strlen(i8* %41)
store i32 %42, i32* %8
%43 = icmp sgt i32 %42, 0
br i1 %43, label %44, label %57
44: ; preds = %38
%45 = load i32, i32* %8
%46 = sub nsw i32 %45, 1
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 %47
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 10
br i1 %51, label %52, label %57
52: ; preds = %44
%53 = load i32, i32* %8
%54 = sub nsw i32 %53, 1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 %55
store i8 0, i8* %56
br label %57
57: ; preds = %52, %44, %38
%58 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%59 = getelementptr inbounds [10 x %struct.TYPE_3__], [10 x %struct.TYPE_3__]* %13, i64 0, i64 0
%60 = call i32 @regexec(i32* %12, i8* %58, i64 10, %struct.TYPE_3__* %59, i32 0)
store i32 %60, i32* %8
%61 = load i32, i32* %8
%62 = load i32, i32* @REG_NOMATCH
%63 = icmp eq i32 %61, %62
br i1 %63, label %64, label %65
64: ; preds = %57
br label %33
65: ; preds = %57
%66 = load i32, i32* %8
%67 = icmp ne i32 %66, 0
br i1 %67, label %68, label %76
68: ; preds = %65
%69 = load i32, i32* %8
%70 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%71 = call i32 @regerror(i32 %69, i32* %12, i8* %70, i32 128)
%72 = load i32, i32* @stderr
%73 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%74 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%75 = call i32 @fprintf(i32 %72, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %73, i8* %74)
store i32 2, i32* %3
br label %119
76: ; preds = %65
br label %77
77: ; preds = %76
store i32 0, i32* %7
br label %78
78: ; preds = %113, %77
%79 = load i32, i32* %7
%80 = sext i32 %79 to i64
%81 = icmp ult i64 %80, 10
br i1 %81, label %82, label %89
82: ; preds = %78
%83 = load i32, i32* %7
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [10 x %struct.TYPE_3__], [10 x %struct.TYPE_3__]* %13, i64 0, i64 %84
%86 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %85, i32 0, i32 0
%87 = load i32, i32* %86
%88 = icmp ne i32 %87, -1
br label %89
89: ; preds = %82, %78
%90 = phi i1 [ false, %78 ], [ %88, %82 ]
br i1 %90, label %91, label %116
91: ; preds = %89
%92 = load i32, i32* %7
%93 = icmp ne i32 %92, 0
br i1 %93, label %98, label %94
94: ; preds = %91
%95 = load i32, i32* %9
%96 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %95, i8* %96)
br label %98
98: ; preds = %94, %91
%99 = load i32, i32* %7
%100 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%101 = load i32, i32* %7
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [10 x %struct.TYPE_3__], [10 x %struct.TYPE_3__]* %13, i64 0, i64 %102
%104 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %103, i32 0, i32 0
%105 = load i32, i32* %104
%106 = load i32, i32* %7
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [10 x %struct.TYPE_3__], [10 x %struct.TYPE_3__]* %13, i64 0, i64 %107
%109 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %108, i32 0, i32 1
%110 = load i32, i32* %109
%111 = call i8* @substr(i8* %100, i32 %105, i32 %110)
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %99, i8* %111)
br label %113
113: ; preds = %98
%114 = load i32, i32* %7
%115 = add nsw i32 %114, 1
store i32 %115, i32* %7
br label %78
116: ; preds = %89
br label %33
117: ; preds = %33
%118 = call i32 @regfree(i32* %12)
store i32 0, i32* %3
br label %119
119: ; preds = %117, %68, %22
%120 = load i32, i32* %3
ret i32 %120
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32 }
@stderr = global i32 0
@.str = [18 x i8] c"%s: string '%s' \0A\00"
@.str.1 = [33 x i8] c"****** the regex is \22%s\22 ******\0A\00"
@stdin = global i32 0
@REG_NOMATCH = global i32 0
@.str.2 = [18 x i8] c"%s: regcom('%s')\0A\00"
@.str.3 = [10 x i8] c"%04d: %s\0A\00"
@.str.4 = [12 x i8] c" $%d='%s'\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [128 x i8]
%4 = alloca [256 x i8]
%5 = alloca i32
%6 = alloca [10 x %struct.TYPE_3__]
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%9 = bitcast i32* %5 to i8*
%10 = bitcast [10 x %struct.TYPE_3__]* %6 to i8*
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @regcomp(i32* %5, i8* %12, i32 0)
%14 = icmp eq i32 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %2
%16 = call i32 @regerror(i32 %13, i32* %5, i8* %7, i32 128)
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %12)
br label %73
19: ; preds = %2
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%21 = load i32, i32* @stdin
%22 = call i64 @fgets(i8* %8, i32 256, i32 %21)
%23 = icmp eq i64 %22, 0
br i1 %23, label %71, label %24
24: ; preds = %19
%25 = getelementptr inbounds [10 x %struct.TYPE_3__], [10 x %struct.TYPE_3__]* %6, i64 0, i64 0
br label %26
26: ; preds = %24, %67
%27 = phi i32 [ 0, %24 ], [ %28, %67 ]
%28 = add nuw nsw i32 %27, 1
%29 = call i32 @strlen(i8* %8)
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %38
31: ; preds = %26
%32 = add nsw i32 %29, -1
%33 = zext i32 %32 to i64
%34 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = icmp eq i8 %35, 10
br i1 %36, label %37, label %38
37: ; preds = %31
store i8 0, i8* %34
br label %38
38: ; preds = %37, %31, %26
%39 = call i32 @regexec(i32* %5, i8* %8, i64 10, %struct.TYPE_3__* %25, i32 0)
%40 = load i32, i32* @REG_NOMATCH
%41 = icmp eq i32 %39, %40
br i1 %41, label %67, label %42
42: ; preds = %38
%43 = icmp eq i32 %39, 0
br i1 %43, label %48, label %44
44: ; preds = %42
%45 = call i32 @regerror(i32 %39, i32* %5, i8* %7, i32 128)
%46 = load i32, i32* @stderr
%47 = call i32 @fprintf(i32 %46, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %7, i8* %8)
br label %73
48: ; preds = %42, %58
%49 = phi i64 [ %65, %58 ], [ 0, %42 ]
%50 = getelementptr inbounds [10 x %struct.TYPE_3__], [10 x %struct.TYPE_3__]* %6, i64 0, i64 %49, i32 0
%51 = load i32, i32* %50
%52 = icmp eq i32 %51, -1
br i1 %52, label %67, label %53
53: ; preds = %48
%54 = icmp eq i64 %49, 0
br i1 %54, label %55, label %58
55: ; preds = %53
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %28, i8* %8)
%57 = load i32, i32* %50
br label %58
58: ; preds = %55, %53
%59 = phi i32 [ %57, %55 ], [ %51, %53 ]
%60 = getelementptr inbounds [10 x %struct.TYPE_3__], [10 x %struct.TYPE_3__]* %6, i64 0, i64 %49, i32 1
%61 = load i32, i32* %60
%62 = call i8* @substr(i8* %8, i32 %59, i32 %61)
%63 = trunc i64 %49 to i32
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %63, i8* %62)
%65 = add nuw nsw i64 %49, 1
%66 = icmp eq i64 %65, 10
br i1 %66, label %67, label %48
67: ; preds = %48, %58, %38
%68 = load i32, i32* @stdin
%69 = call i64 @fgets(i8* %8, i32 256, i32 %68)
%70 = icmp eq i64 %69, 0
br i1 %70, label %71, label %26
71: ; preds = %67, %19
%72 = call i32 @regfree(i32* %5)
br label %73
73: ; preds = %71, %44, %15
%74 = phi i32 [ 1, %15 ], [ 2, %44 ], [ 0, %71 ]
ret i32 %74
}