#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_9__ TYPE_2__;
typedef struct TYPE_8__ TYPE_1__;

/* Type definitions */
struct TYPE_8__ {
  int rm_so;
  size_t rm_eo;
};
typedef TYPE_1__ regmatch_t;
struct TYPE_9__ {
  int re_nsub;
};
typedef TYPE_2__ regex_t;
typedef int /*<<< orphan*/ err;

/* Variables and functions */
int REG_NOMATCH;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ regcomp(TYPE_2__ *, char *, int);
int /*<<< orphan*/ regerror(int, TYPE_2__ *, char *, int);
int regexec(TYPE_2__ *, char *, int, TYPE_1__ *, int /*<<< orphan*/);
int /*<<< orphan*/ regfree(TYPE_2__ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
void exec_regex(char *str, char *pat, int args) {
  regex_t reg;
  printf("String '%s', Pattern '%s'\n", str, pat);
  if (regcomp(&reg, pat, args)) {
    fprintf(stderr, "Could not compiled regex\n");
    return;
  }
  int ret, nsub = reg.re_nsub;
  if (nsub != 1)
    nsub++;
  regmatch_t matchptr[nsub];
  if ((ret = regexec(&reg, str, nsub, matchptr, 0))) {
    if (ret == REG_NOMATCH) {
      fprintf(stderr, "\tREG_NOMATCH\n");
    } else {
      char err[100];
      regerror(ret, &reg, err, sizeof(err));
      fprintf(stderr, "\tRegex failed: %s\n", err);
    }
    return;
  } else {
    int i;
    for (i = 0; i < nsub; i++) {
      if (matchptr[i].rm_so == -1)
        break;
      char string[strlen(str) + 1];
      char *start = str + matchptr[i].rm_so;
      size_t end = matchptr[i].rm_eo - matchptr[i].rm_so;
      strncpy(string, start, end);
      string[end] = '\0';
      printf("\tGroup %d: [%u-%u]: %s\n", i, matchptr[i].rm_so,
             matchptr[i].rm_eo, string);
    }
  }
  regfree(&reg);
  return;
}


x86 assembly (clang, -O0):
<exec_regex>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    -0x18(%rbp),%rdi
call   1070 <regcomp@plt>
cmp    $0x0,%rax
je     11e2 <exec_regex+0x62>
mov    0x2e0b(%rip),%rax
mov    (%rax),%edi
lea    0xe45(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1422 <exec_regex+0x2a2>
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x1,-0x20(%rbp)
je     11fb <exec_regex+0x7b>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rdx
shl    $0x4,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xd0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%edx
lea    -0x18(%rbp),%rdi
xor    %r8d,%r8d
call   10a0 <regexec@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     12b2 <exec_regex+0x132>
mov    -0x1c(%rbp),%eax
mov    0x2d9f(%rip),%rcx
cmp    (%rcx),%eax
jne    126d <exec_regex+0xed>
mov    0x2d80(%rip),%rax
mov    (%rax),%edi
lea    0xdd4(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    12a3 <exec_regex+0x123>
mov    -0x1c(%rbp),%edi
lea    -0xa0(%rbp),%rdx
lea    -0x18(%rbp),%rsi
mov    $0x64,%ecx
call   1090 <regerror@plt>
mov    0x2d4c(%rip),%rax
mov    (%rax),%edi
lea    -0xa0(%rbp),%rdx
lea    0xda7(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0xa4(%rbp)
jmp    141b <exec_regex+0x29b>
movl   $0x0,-0xa8(%rbp)
mov    -0xa8(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1403 <exec_regex+0x283>
mov    -0xd0(%rbp),%rax
movslq -0xa8(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
cmpl   $0xffffffff,(%rax)
jne    12ee <exec_regex+0x16e>
jmp    1403 <exec_regex+0x283>
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0xd0(%rbp),%rcx
add    $0x1,%eax
mov    %rsp,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rdi
sub    %rdx,%rdi
mov    %rdi,-0xd8(%rbp)
mov    %rdi,%rsp
mov    %rax,-0xb8(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xa8(%rbp),%rsi
shl    $0x4,%rsi
mov    %rcx,%rdx
add    %rsi,%rdx
movslq (%rdx),%rdx
add    %rdx,%rax
mov    %rax,-0xc0(%rbp)
movslq -0xa8(%rbp),%rdx
shl    $0x4,%rdx
mov    %rcx,%rax
add    %rdx,%rax
mov    0x8(%rax),%rax
movslq -0xa8(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rcx
movslq (%rcx),%rcx
sub    %rcx,%rax
mov    %rax,-0xc8(%rbp)
mov    -0xc0(%rbp),%rsi
mov    -0xc8(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0xd8(%rbp),%r8
mov    -0xd0(%rbp),%rax
mov    -0xc8(%rbp),%rcx
movb   $0x0,(%r8,%rcx,1)
mov    -0xa8(%rbp),%esi
movslq -0xa8(%rbp),%rdx
shl    $0x4,%rdx
mov    %rax,%rcx
add    %rdx,%rcx
mov    (%rcx),%edx
movslq -0xa8(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rcx
lea    0xc78(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0xb0(%rbp),%rax
mov    %rax,%rsp
mov    -0xa8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa8(%rbp)
jmp    12bc <exec_regex+0x13c>
jmp    1408 <exec_regex+0x288>
lea    -0x18(%rbp),%rdi
call   1040 <regfree@plt>
movl   $0x1,-0xa4(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_regex>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0xe5c(%rip),%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1070 <regcomp@plt>
test   %rax,%rax
je     11e1 <exec_regex+0x61>
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
lea    0xe46(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    131e <exec_regex+0x19e>
mov    %rsp,%r14
mov    -0x30(%rbp),%eax
lea    0x1(%rax),%r12d
cmp    $0x1,%eax
cmove  %eax,%r12d
mov    %r12,%rax
shl    $0x4,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
lea    -0x30(%rbp),%rdi
mov    %r15,%rsi
mov    %r12d,%edx
mov    %rbx,%rcx
xor    %r8d,%r8d
call   10a0 <regexec@plt>
test   %eax,%eax
je     1246 <exec_regex+0xc6>
mov    0x2dc6(%rip),%rcx
cmp    (%rcx),%eax
jne    12e7 <exec_regex+0x167>
mov    0x2da7(%rip),%rax
mov    (%rax),%edi
lea    0xdfb(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    131b <exec_regex+0x19b>
mov    %r15,-0x40(%rbp)
mov    %r14,-0x38(%rbp)
test   %r12d,%r12d
jle    12d8 <exec_regex+0x158>
xor    %r13d,%r13d
nopw   0x0(%rax,%rax,1)
cmpl   $0xffffffff,(%rbx)
je     12d8 <exec_regex+0x158>
mov    -0x40(%rbp),%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %rsp,-0x48(%rbp)
add    $0x1,%eax
mov    %r12,%r15
mov    %rsp,%r12
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
movslq (%rbx),%rax
lea    (%r14,%rax,1),%rsi
mov    0x8(%rbx),%r14
sub    %rax,%r14
mov    %r12,%rdi
mov    %r14,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%r14,%r12,1)
mov    (%rbx),%edx
mov    0x8(%rbx),%rcx
lea    0xd9f(%rip),%rdi
mov    %r13d,%esi
mov    %r12,%r8
mov    %r15,%r12
xor    %eax,%eax
call   1060 <printf@plt>
mov    -0x48(%rbp),%rsp
add    $0x1,%r13
add    $0x10,%rbx
cmp    %r13,%r15
jne    1260 <exec_regex+0xe0>
lea    -0x30(%rbp),%rdi
call   1040 <regfree@plt>
mov    -0x38(%rbp),%r14
jmp    131b <exec_regex+0x19b>
lea    -0x30(%rbp),%rsi
lea    -0xb0(%rbp),%rbx
mov    %eax,%edi
mov    %rbx,%rdx
mov    $0x64,%ecx
call   1090 <regerror@plt>
mov    0x2cd0(%rip),%rax
mov    (%rax),%edi
lea    0xd32(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %r14,%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.TYPE_9__ = type { i32 }
%struct.TYPE_8__ = type { i32, i64 }
@.str = [27 x i8] c"String '%s', Pattern '%s'\0A\00"
@stderr = global i32 0
@.str.1 = [26 x i8] c"Could not compiled regex\0A\00"
@REG_NOMATCH = global i32 0
@.str.2 = [14 x i8] c"\09REG_NOMATCH\0A\00"
@.str.3 = [19 x i8] c"\09Regex failed: %s\0A\00"
@.str.4 = [24 x i8] c"\09Group %d: [%u-%u]: %s\0A\00"
define void @exec_regex(i8* %0, i8* %1, i32 %2) {
%4 = alloca %struct.TYPE_9__
%5 = alloca [100 x i8]
%6 = bitcast %struct.TYPE_9__* %4 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%8 = call i64 @regcomp(%struct.TYPE_9__* %4, i8* %1, i32 %2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %65
13: ; preds = %3
%14 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %4, i64 0, i32 0
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, 1
%17 = add nsw i32 %15, 1
%18 = select i1 %16, i32 1, i32 %17
%19 = zext i32 %18 to i64
%20 = call i8* @llvm.stacksave()
%21 = alloca %struct.TYPE_8__, i64 %19
%22 = call i32 @regexec(%struct.TYPE_9__* %4, i8* %0, i32 %18, %struct.TYPE_8__* %21, i32 0)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %13
%25 = icmp sgt i32 %18, 0
br i1 %25, label %37, label %62
26: ; preds = %13
%27 = load i32, i32* @REG_NOMATCH
%28 = icmp eq i32 %22, %27
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i32, i32* @stderr
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %64
32: ; preds = %26
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%34 = call i32 @regerror(i32 %22, %struct.TYPE_9__* %4, i8* %33, i32 100)
%35 = load i32, i32* @stderr
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %33)
br label %64
37: ; preds = %24, %42
%38 = phi i64 [ %60, %42 ], [ 0, %24 ]
%39 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %21, i64 %38, i32 0
%40 = load i32, i32* %39
%41 = icmp eq i32 %40, -1
br i1 %41, label %62, label %42
42: ; preds = %37
%43 = call i32 @strlen(i8* %0)
%44 = add nsw i32 %43, 1
%45 = zext i32 %44 to i64
%46 = call i8* @llvm.stacksave()
%47 = alloca i8, i64 %45
%48 = load i32, i32* %39
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %0, i64 %49
%51 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %21, i64 %38, i32 1
%52 = load i64, i64* %51
%53 = sub i64 %52, %49
%54 = call i32 @strncpy(i8* %47, i8* %50, i64 %53)
%55 = getelementptr inbounds i8, i8* %47, i64 %53
store i8 0, i8* %55
%56 = load i32, i32* %39
%57 = load i64, i64* %51
%58 = trunc i64 %38 to i32
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %58, i32 %56, i64 %57, i8* %47)
%60 = add nuw nsw i64 %38, 1
%61 = icmp eq i64 %60, %19
br i1 %61, label %62, label %37
62: ; preds = %42, %37, %24
%63 = call i32 @regfree(%struct.TYPE_9__* %4)
br label %64
64: ; preds = %29, %32, %62
br label %65
65: ; preds = %64, %10
ret void
}