#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*/ sqlite3_stmt;
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ Double_Shuffle(int *, char **, size_t);
int Get_Sub_Names(int /*<<< orphan*/ *, int /*<<< orphan*/ *, char *, char **,
                  int *, size_t);
int Min(int, size_t);
char *calloc(int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
int Get_Full_Names(sqlite3 *db, sqlite3_stmt *stmt, char *fullnames[],
                   size_t maxLength) {
  int rv;
  char *firstnames[maxLength];
  int firstnameLengths[maxLength];
  char *lastnames[maxLength];
  int lastnameLengths[maxLength];
  char *sql_stmt = "select length(firstname), firstname from firstnames ORDER "
                   "BY RANDOM() LIMIT ?;";
  char *sql_stmt2 = "select length(lastname), lastname from lastnames ORDER BY "
                    "RANDOM() LIMIT ?;";
  rv = Get_Sub_Names(db, stmt, sql_stmt, firstnames, firstnameLengths,
                     maxLength);
  if (rv == -1) {
    fprintf(stderr, "Failed to get firstnames\n");
    return -1;
  }
  rv =
      Get_Sub_Names(db, stmt, sql_stmt2, lastnames, lastnameLengths, maxLength);
  if (rv == -1) {
    fprintf(stderr, "Failed to get lastnames\n");
    return -1;
  }
  for (int currSet = 0; currSet < 5500000; currSet = currSet + maxLength) {
    int currSize = Min(5500000 - currSet, maxLength);
    if (currSet != 0) {
      Double_Shuffle(firstnameLengths, firstnames, maxLength);
      Double_Shuffle(lastnameLengths, lastnames, maxLength);
    }
    for (int i = 0; i < currSize; i++) {
      fullnames[i + currSet] =
          calloc(1, firstnameLengths[i] + lastnameLengths[i] + 2);
      sprintf(fullnames[i + currSet], "%s %s", firstnames[i], lastnames[i]);
    }
  }
  for (int i = 0; i < maxLength; i++) {
    free(firstnames[i]);
    free(lastnames[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<Get_Full_Names>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xa0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%r8
sub    %rdx,%r8
mov    %r8,-0x98(%rbp)
mov    %r8,%rsp
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rax
lea    0xf(,%rax,8),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x90(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
lea    0xf(,%rax,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x88(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x58(%rbp)
lea    0xdd7(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xe1b(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x60(%rbp),%rdx
mov    -0x28(%rbp),%r9
call   1080 <Get_Sub_Names@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0xffffffff,-0x2c(%rbp)
jne    1282 <Get_Full_Names+0x112>
mov    0x2d7f(%rip),%rax
mov    (%rax),%edi
lea    0xe31(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x6c(%rbp)
jmp    1441 <Get_Full_Names+0x2d1>
mov    -0x88(%rbp),%r8
mov    -0x90(%rbp),%rcx
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x28(%rbp),%r9
call   1080 <Get_Sub_Names@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0xffffffff,-0x2c(%rbp)
jne    12da <Get_Full_Names+0x16a>
mov    0x2d27(%rip),%rax
mov    (%rax),%edi
lea    0xdf3(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x6c(%rbp)
jmp    1441 <Get_Full_Names+0x2d1>
movl   $0x0,-0x70(%rbp)
cmpl   $0x53ec60,-0x70(%rbp)
jge    13e8 <Get_Full_Names+0x278>
mov    $0x53ec60,%edi
sub    -0x70(%rbp),%edi
mov    -0x28(%rbp),%rsi
call   1050 <Min@plt>
mov    %eax,-0x74(%rbp)
cmpl   $0x0,-0x70(%rbp)
je     133a <Get_Full_Names+0x1ca>
mov    -0xa0(%rbp),%rsi
mov    -0x98(%rbp),%rdi
mov    -0x28(%rbp),%rdx
call   1030 <Double_Shuffle@plt>
mov    -0x88(%rbp),%rdi
mov    -0x90(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <Double_Shuffle@plt>
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    13d3 <Get_Full_Names+0x263>
mov    -0x88(%rbp),%rax
mov    -0x98(%rbp),%rcx
movslq -0x78(%rbp),%rdx
mov    (%rcx,%rdx,4),%esi
movslq -0x78(%rbp),%rcx
add    (%rax,%rcx,4),%esi
add    $0x2,%esi
mov    $0x1,%edi
call   1060 <calloc@plt>
mov    -0xa0(%rbp),%rcx
mov    %rax,%rdi
mov    -0x90(%rbp),%rax
mov    -0x20(%rbp),%rdx
mov    -0x78(%rbp),%esi
add    -0x70(%rbp),%esi
movslq %esi,%rsi
mov    %rdi,(%rdx,%rsi,8)
mov    -0x20(%rbp),%rdx
mov    -0x78(%rbp),%esi
add    -0x70(%rbp),%esi
movslq %esi,%rsi
mov    (%rdx,%rsi,8),%rdi
movslq -0x78(%rbp),%rdx
mov    (%rcx,%rdx,8),%rdx
movslq -0x78(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xd0e(%rip),%rsi
call   1090 <sprintf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1341 <Get_Full_Names+0x1d1>
jmp    13d8 <Get_Full_Names+0x268>
movslq -0x70(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %eax,-0x70(%rbp)
jmp    12e1 <Get_Full_Names+0x171>
movl   $0x0,-0x7c(%rbp)
movslq -0x7c(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1433 <Get_Full_Names+0x2c3>
mov    -0xa0(%rbp),%rax
movslq -0x7c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <free@plt>
mov    -0x90(%rbp),%rax
movslq -0x7c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <free@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    13ef <Get_Full_Names+0x27f>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x6c(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get_Full_Names>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rcx,%r15
mov    %rdx,-0x48(%rbp)
mov    %rsp,%rcx
lea    0xf(,%r15,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,%rsp
mov    %rsp,%r14
lea    0xf(,%r15,4),%rdx
and    $0xfffffffffffffff0,%rdx
sub    %rdx,%r14
mov    %r14,%rsp
mov    %rsp,%r13
sub    %rax,%r13
mov    %r13,%rsp
mov    %rsp,%r12
sub    %rdx,%r12
mov    %r12,%rsp
lea    0xe35(%rip),%rdx
mov    %rdi,-0x30(%rbp)
mov    %rsi,%rbx
mov    %rcx,-0x38(%rbp)
mov    %r14,%r8
mov    %r15,%r9
call   1080 <Get_Sub_Names@plt>
cmp    $0xffffffff,%eax
je     131e <Get_Full_Names+0x1ae>
lea    0xe5e(%rip),%rdx
mov    -0x30(%rbp),%rdi
mov    %rbx,%rsi
mov    %r13,%rcx
mov    %r12,%r8
mov    %r15,%r9
call   1080 <Get_Sub_Names@plt>
cmp    $0xffffffff,%eax
je     1327 <Get_Full_Names+0x1b7>
xor    %ebx,%ebx
mov    %r15,-0x50(%rbp)
mov    %r13,-0x40(%rbp)
jmp    123e <Get_Full_Names+0xce>
nopl   0x0(%rax,%rax,1)
mov    -0x50(%rbp),%r15
mov    -0x30(%rbp),%rbx
add    %r15d,%ebx
cmp    $0x53ec60,%ebx
mov    -0x40(%rbp),%r13
mov    %rdx,%r14
jge    12e5 <Get_Full_Names+0x175>
mov    $0x53ec60,%edi
sub    %ebx,%edi
mov    %r15,%rsi
call   1050 <Min@plt>
mov    %rbx,-0x30(%rbp)
test   %ebx,%ebx
je     1276 <Get_Full_Names+0x106>
mov    %r14,%rdi
mov    %eax,%ebx
mov    -0x38(%rbp),%rsi
mov    %r15,%rdx
call   1030 <Double_Shuffle@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
call   1030 <Double_Shuffle@plt>
mov    %ebx,%eax
test   %eax,%eax
mov    %r14,%rdx
jle    1220 <Get_Full_Names+0xb0>
movslq -0x30(%rbp),%rsi
mov    -0x48(%rbp),%rcx
lea    (%rcx,%rsi,8),%r14
mov    %eax,%r15d
xor    %r13d,%r13d
nop
mov    (%rdx,%r13,4),%eax
mov    (%r12,%r13,4),%ecx
lea    (%rax,%rcx,1),%esi
add    $0x2,%esi
mov    $0x1,%edi
mov    %r12,%rbx
mov    %rdx,%r12
call   1060 <calloc@plt>
mov    %rax,(%r14,%r13,8)
mov    -0x38(%rbp),%rcx
mov    (%rcx,%r13,8),%rdx
mov    -0x40(%rbp),%rcx
mov    (%rcx,%r13,8),%rcx
mov    %rax,%rdi
lea    0xe02(%rip),%rsi
call   1090 <sprintf@plt>
mov    %r12,%rdx
mov    %rbx,%r12
add    $0x1,%r13
cmp    %r13,%r15
jne    1290 <Get_Full_Names+0x120>
jmp    1220 <Get_Full_Names+0xb0>
xor    %r14d,%r14d
test   %r15,%r15
je     1342 <Get_Full_Names+0x1d2>
xor    %ebx,%ebx
mov    -0x38(%rbp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12,%rbx,8),%rdi
call   1040 <free@plt>
mov    0x0(%r13,%rbx,8),%rdi
call   1040 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1300 <Get_Full_Names+0x190>
jmp    1342 <Get_Full_Names+0x1d2>
lea    0xd76(%rip),%rsi
jmp    132e <Get_Full_Names+0x1be>
lea    0xd87(%rip),%rsi
mov    0x2cab(%rip),%rax
mov    (%rax),%edi
call   1070 <fprintf@plt>
mov    $0xffffffff,%r14d
mov    %r14d,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [79 x i8] c"select length(firstname), firstname from firstnames ORDER BY RANDOM() LIMIT ?;\00"
@.str.1 = [76 x i8] c"select length(lastname), lastname from lastnames ORDER BY RANDOM() LIMIT ?;\00"
@stderr = global i32 0
@.str.2 = [26 x i8] c"Failed to get firstnames\0A\00"
@.str.3 = [25 x i8] c"Failed to get lastnames\0A\00"
@.str.4 = [6 x i8] c"%s %s\00"
define i32 @Get_Full_Names(i32* %0, i32* %1, i8** %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i8**
%9 = alloca i64
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i32* %0, i32** %6
store i32* %1, i32** %7
store i8** %2, i8*** %8
store i64 %3, i64* %9
%23 = load i64, i64* %9
%24 = call i8* @llvm.stacksave()
store i8* %24, i8** %11
%25 = alloca i8*, i64 %23
store i64 %23, i64* %12
%26 = load i64, i64* %9
%27 = alloca i32, i64 %26
store i64 %26, i64* %13
%28 = load i64, i64* %9
%29 = alloca i8*, i64 %28
store i64 %28, i64* %14
%30 = load i64, i64* %9
%31 = alloca i32, i64 %30
store i64 %30, i64* %15
store i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i8** %16
store i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8** %17
%32 = load i32*, i32** %6
%33 = load i32*, i32** %7
%34 = load i8*, i8** %16
%35 = load i64, i64* %9
%36 = call i32 @Get_Sub_Names(i32* %32, i32* %33, i8* %34, i8** %25, i32* %27, i64 %35)
store i32 %36, i32* %10
%37 = load i32, i32* %10
%38 = icmp eq i32 %37, -1
br i1 %38, label %39, label %42
39: ; preds = %4
%40 = load i32, i32* @stderr
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %5
store i32 1, i32* %18
br label %139
42: ; preds = %4
%43 = load i32*, i32** %6
%44 = load i32*, i32** %7
%45 = load i8*, i8** %17
%46 = load i64, i64* %9
%47 = call i32 @Get_Sub_Names(i32* %43, i32* %44, i8* %45, i8** %29, i32* %31, i64 %46)
store i32 %47, i32* %10
%48 = load i32, i32* %10
%49 = icmp eq i32 %48, -1
br i1 %49, label %50, label %53
50: ; preds = %42
%51 = load i32, i32* @stderr
%52 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
store i32 -1, i32* %5
store i32 1, i32* %18
br label %139
53: ; preds = %42
store i32 0, i32* %19
br label %54
54: ; preds = %112, %53
%55 = load i32, i32* %19
%56 = icmp slt i32 %55, 5500000
br i1 %56, label %57, label %118
57: ; preds = %54
%58 = load i32, i32* %19
%59 = sub nsw i32 5500000, %58
%60 = load i64, i64* %9
%61 = call i32 @Min(i32 %59, i64 %60)
store i32 %61, i32* %20
%62 = load i32, i32* %19
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %69
64: ; preds = %57
%65 = load i64, i64* %9
%66 = call i32 @Double_Shuffle(i32* %27, i8** %25, i64 %65)
%67 = load i64, i64* %9
%68 = call i32 @Double_Shuffle(i32* %31, i8** %29, i64 %67)
br label %69
69: ; preds = %64, %57
store i32 0, i32* %21
br label %70
70: ; preds = %108, %69
%71 = load i32, i32* %21
%72 = load i32, i32* %20
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %111
74: ; preds = %70
%75 = load i32, i32* %21
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i32, i32* %27, i64 %76
%78 = load i32, i32* %77
%79 = load i32, i32* %21
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i32, i32* %31, i64 %80
%82 = load i32, i32* %81
%83 = add nsw i32 %78, %82
%84 = add nsw i32 %83, 2
%85 = call i8* @calloc(i32 1, i32 %84)
%86 = load i8**, i8*** %8
%87 = load i32, i32* %21
%88 = load i32, i32* %19
%89 = add nsw i32 %87, %88
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8*, i8** %86, i64 %90
store i8* %85, i8** %91
%92 = load i8**, i8*** %8
%93 = load i32, i32* %21
%94 = load i32, i32* %19
%95 = add nsw i32 %93, %94
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i8*, i8** %92, i64 %96
%98 = load i8*, i8** %97
%99 = load i32, i32* %21
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8*, i8** %25, i64 %100
%102 = load i8*, i8** %101
%103 = load i32, i32* %21
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i8*, i8** %29, i64 %104
%106 = load i8*, i8** %105
%107 = call i32 @sprintf(i8* %98, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %102, i8* %106)
br label %108
108: ; preds = %74
%109 = load i32, i32* %21
%110 = add nsw i32 %109, 1
store i32 %110, i32* %21
br label %70
111: ; preds = %70
br label %112
112: ; preds = %111
%113 = load i32, i32* %19
%114 = sext i32 %113 to i64
%115 = load i64, i64* %9
%116 = add i64 %114, %115
%117 = trunc i64 %116 to i32
store i32 %117, i32* %19
br label %54
118: ; preds = %54
store i32 0, i32* %22
br label %119
119: ; preds = %135, %118
%120 = load i32, i32* %22
%121 = sext i32 %120 to i64
%122 = load i64, i64* %9
%123 = icmp ult i64 %121, %122
br i1 %123, label %124, label %138
124: ; preds = %119
%125 = load i32, i32* %22
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i8*, i8** %25, i64 %126
%128 = load i8*, i8** %127
%129 = call i32 @free(i8* %128)
%130 = load i32, i32* %22
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds i8*, i8** %29, i64 %131
%133 = load i8*, i8** %132
%134 = call i32 @free(i8* %133)
br label %135
135: ; preds = %124
%136 = load i32, i32* %22
%137 = add nsw i32 %136, 1
store i32 %137, i32* %22
br label %119
138: ; preds = %119
store i32 0, i32* %5
store i32 1, i32* %18
br label %139
139: ; preds = %138, %50, %39
%140 = load i8*, i8** %11
%141 = load i32, i32* %5
ret i32 %141
}

LLVM IR (-O2):
@.str = [79 x i8] c"select length(firstname), firstname from firstnames ORDER BY RANDOM() LIMIT ?;\00"
@.str.1 = [76 x i8] c"select length(lastname), lastname from lastnames ORDER BY RANDOM() LIMIT ?;\00"
@stderr = global i32 0
@.str.2 = [26 x i8] c"Failed to get firstnames\0A\00"
@.str.3 = [25 x i8] c"Failed to get lastnames\0A\00"
@.str.4 = [6 x i8] c"%s %s\00"
define i32 @Get_Full_Names(i32* %0, i32* %1, i8** nocapture writeonly %2, i64 %3) {
%5 = alloca i8*, i64 %3
%6 = alloca i32, i64 %3
%7 = alloca i8*, i64 %3
%8 = alloca i32, i64 %3
%9 = call i32 @Get_Sub_Names(i32* %0, i32* %1, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i8** %5, i32* %6, i64 %3)
%10 = icmp eq i32 %9, -1
br i1 %10, label %62, label %11
11: ; preds = %4
%12 = call i32 @Get_Sub_Names(i32* %0, i32* %1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8** %7, i32* %8, i64 %3)
%13 = icmp eq i32 %12, -1
br i1 %13, label %62, label %14
14: ; preds = %11
%15 = trunc i64 %3 to i32
br label %18
16: ; preds = %31
%17 = icmp eq i64 %3, 0
br i1 %17, label %66, label %52
18: ; preds = %14, %31
%19 = phi i32 [ 0, %14 ], [ %32, %31 ]
%20 = sub nsw i32 5500000, %19
%21 = call i32 @Min(i32 %20, i64 %3)
%22 = icmp eq i32 %19, 0
br i1 %22, label %26, label %23
23: ; preds = %18
%24 = call i32 @Double_Shuffle(i32* %6, i8** %5, i64 %3)
%25 = call i32 @Double_Shuffle(i32* %8, i8** %7, i64 %3)
br label %26
26: ; preds = %23, %18
%27 = icmp sgt i32 %21, 0
br i1 %27, label %28, label %31
28: ; preds = %26
%29 = sext i32 %19 to i64
%30 = zext i32 %21 to i64
br label %34
31: ; preds = %34, %26
%32 = add i32 %19, %15
%33 = icmp slt i32 %32, 5500000
br i1 %33, label %18, label %16
34: ; preds = %28, %34
%35 = phi i64 [ 0, %28 ], [ %50, %34 ]
%36 = getelementptr inbounds i32, i32* %6, i64 %35
%37 = load i32, i32* %36
%38 = getelementptr inbounds i32, i32* %8, i64 %35
%39 = load i32, i32* %38
%40 = add i32 %37, 2
%41 = add i32 %40, %39
%42 = call i8* @calloc(i32 1, i32 %41)
%43 = add nsw i64 %35, %29
%44 = getelementptr inbounds i8*, i8** %2, i64 %43
store i8* %42, i8** %44
%45 = getelementptr inbounds i8*, i8** %5, i64 %35
%46 = load i8*, i8** %45
%47 = getelementptr inbounds i8*, i8** %7, i64 %35
%48 = load i8*, i8** %47
%49 = call i32 @sprintf(i8* dereferenceable(1) %42, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %46, i8* %48)
%50 = add nuw nsw i64 %35, 1
%51 = icmp eq i64 %50, %30
br i1 %51, label %31, label %34
52: ; preds = %16, %52
%53 = phi i64 [ %60, %52 ], [ 0, %16 ]
%54 = getelementptr inbounds i8*, i8** %5, i64 %53
%55 = load i8*, i8** %54
%56 = call i32 @free(i8* %55)
%57 = getelementptr inbounds i8*, i8** %7, i64 %53
%58 = load i8*, i8** %57
%59 = call i32 @free(i8* %58)
%60 = add nuw nsw i64 %53, 1
%61 = icmp eq i64 %60, %3
br i1 %61, label %66, label %52
62: ; preds = %11, %4
%63 = phi i8* [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), %11 ]
%64 = load i32, i32* @stderr
%65 = call i32 @fprintf(i32 %64, i8* %63)
br label %66
66: ; preds = %52, %62, %16
%67 = phi i32 [ 0, %16 ], [ -1, %62 ], [ 0, %52 ]
ret i32 %67
}