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

/* Variables and functions */
int rand();
int /*<<< orphan*/ sprintf(char *, char *, int);
int sqlite3_exec(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                 int /*<<< orphan*/, char **);
int /*<<< orphan*/ sqlite3_free(char *);
char *sqlite3_mprintf(char *, ...);
int /*<<< orphan*/ strcat(char *, char *);
void generate_chng(sqlite3 *db, time_t when, int cn) {
  int rc;
  char *zSql;
  char *zErrMsg;
  char zDir[4096];
  char zBase[4096];
  int depth = 1 + (rand() % 3);
  int num_filechng = 1 + (rand() % 10);
  int j, k;
  zDir[0] = 0;
  sqlite3_exec(db, "BEGIN;", 0, 0, &zErrMsg);
  for (j = k = 0; j < depth; j++) {
    sprintf(zBase, "dir_%d", rand() % 8);
    zSql =
        sqlite3_mprintf("REPLACE INTO file VALUES(1,'%q','%q')", zBase, zDir);
    sqlite3_exec(db, zSql, 0, 0, &zErrMsg);
    sqlite3_free(zSql);
    if (zDir[0])
      strcat(zDir, "/");
    strcat(zDir, zBase);
  }
  for (j = 0, k = rand() % 10; j < num_filechng; j++, k += 1 + (rand() % 3)) {
    sprintf(zBase, "file_%d.c", k);
    zSql =
        sqlite3_mprintf("REPLACE INTO file VALUES(0,'%q','%q')", zBase, zDir);
    sqlite3_exec(db, zSql, 0, 0, &zErrMsg);
    sqlite3_free(zSql);
    zSql = sqlite3_mprintf("INSERT INTO filechng "
                           "VALUES(%d,'%q/%q','%d',%d,%d)",
                           cn, zDir, zBase, cn, rand() % 10, rand() % 10);
    sqlite3_exec(db, zSql, 0, 0, &zErrMsg);
    sqlite3_free(zSql);
  }
  zSql = sqlite3_mprintf("INSERT INTO chng "
                         "VALUES(%d,%d,'',0,'setup','checkin %d of %d');"
                         "COMMIT",
                         cn, when, cn, 20000);
  rc = sqlite3_exec(db, zSql, 0, 0, &zErrMsg);
  sqlite3_free(zSql);
}


x86 assembly (clang, -O0):
<generate_chng>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2070,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x2034(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x2038(%rbp)
movb   $0x0,-0x1030(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe49(%rip),%rsi
xor    %ecx,%ecx
lea    -0x28(%rbp),%r8
mov    %ecx,%edx
call   1030 <sqlite3_exec@plt>
movl   $0x0,-0x2040(%rbp)
movl   $0x0,-0x203c(%rbp)
mov    -0x203c(%rbp),%eax
cmp    -0x2034(%rbp),%eax
jge    129f <generate_chng+0x13f>
lea    -0x2030(%rbp),%rax
mov    %rax,-0x2048(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
mov    -0x2048(%rbp),%rdi
mov    $0x8,%ecx
cltd
idiv   %ecx
lea    0xdf2(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x2030(%rbp),%rsi
lea    -0x1030(%rbp),%rdx
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1070 <sqlite3_mprintf@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
xor    %ecx,%ecx
lea    -0x28(%rbp),%r8
mov    %ecx,%edx
call   1030 <sqlite3_exec@plt>
mov    -0x20(%rbp),%rdi
call   1050 <sqlite3_free@plt>
cmpb   $0x0,-0x1030(%rbp)
je     1278 <generate_chng+0x118>
lea    -0x1030(%rbp),%rdi
lea    0xdc1(%rip),%rsi
call   1040 <strcat@plt>
lea    -0x1030(%rbp),%rdi
lea    -0x2030(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x203c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x203c(%rbp)
jmp    11d8 <generate_chng+0x78>
movl   $0x0,-0x203c(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x2040(%rbp)
mov    -0x203c(%rbp),%eax
cmp    -0x2038(%rbp),%eax
jge    1404 <generate_chng+0x2a4>
lea    -0x2030(%rbp),%rdi
mov    -0x2040(%rbp),%edx
lea    0xd52(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x2030(%rbp),%rsi
lea    -0x1030(%rbp),%rdx
lea    0xd42(%rip),%rdi
mov    $0x0,%al
call   1070 <sqlite3_mprintf@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
xor    %ecx,%ecx
lea    -0x28(%rbp),%r8
mov    %ecx,%edx
call   1030 <sqlite3_exec@plt>
mov    -0x20(%rbp),%rdi
call   1050 <sqlite3_free@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x2064(%rbp)
lea    -0x1030(%rbp),%rax
mov    %rax,-0x2050(%rbp)
lea    -0x2030(%rbp),%rax
mov    %rax,-0x2060(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x2058(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x2054(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
mov    -0x2064(%rbp),%esi
mov    -0x2060(%rbp),%rcx
mov    -0x2058(%rbp),%r8d
mov    -0x2054(%rbp),%r9d
mov    $0xa,%edi
cltd
idiv   %edi
mov    %edx,%eax
mov    -0x2050(%rbp),%rdx
lea    0xcc2(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1070 <sqlite3_mprintf@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
xor    %ecx,%ecx
lea    -0x28(%rbp),%r8
mov    %ecx,%edx
call   1030 <sqlite3_exec@plt>
mov    -0x20(%rbp),%rdi
call   1050 <sqlite3_free@plt>
mov    -0x203c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x203c(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x1,%eax
add    -0x2040(%rbp),%eax
mov    %eax,-0x2040(%rbp)
jmp    12be <generate_chng+0x15e>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xc85(%rip),%rdi
mov    $0x4e20,%r8d
mov    $0x0,%al
call   1070 <sqlite3_mprintf@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
xor    %ecx,%ecx
lea    -0x28(%rbp),%r8
mov    %ecx,%edx
call   1030 <sqlite3_exec@plt>
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <sqlite3_free@plt>
add    $0x2070,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_chng>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2038,%rsp
mov    %edx,%r13d
mov    %esi,0x24(%rsp)
mov    %rdi,%rbx
xor    %eax,%eax
call   1080 <rand@plt>
movslq %eax,%r15
imul   $0x55555556,%r15,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%r14d
xor    %eax,%eax
call   1080 <rand@plt>
movslq %eax,%rbp
imul   $0x66666667,%rbp,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebp
movb   $0x0,0x30(%rsp)
lea    0xe32(%rip),%rsi
lea    0x10(%rsp),%r8
mov    %rbx,0x18(%rsp)
mov    %rbx,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <sqlite3_exec@plt>
sub    %r14d,%r15d
js     1286 <generate_chng+0x126>
add    $0x1,%r15d
lea    0x1030(%rsp),%rbx
lea    0x30(%rsp),%r14
jmp    1211 <generate_chng+0xb1>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcat@plt>
add    $0xffffffff,%r15d
je     1286 <generate_chng+0x126>
xor    %eax,%eax
call   1080 <rand@plt>
lea    0x7(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffff8,%ecx
sub    %ecx,%eax
mov    %rbx,%rdi
lea    0xdd8(%rip),%rsi
mov    %eax,%edx
call   1060 <sprintf@plt>
lea    0xdd1(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1070 <sqlite3_mprintf@plt>
mov    %rax,%r12
mov    0x18(%rsp),%rdi
mov    %rax,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
lea    0x10(%rsp),%r8
call   1030 <sqlite3_exec@plt>
mov    %r12,%rdi
call   1050 <sqlite3_free@plt>
cmpb   $0x0,0x30(%rsp)
je     1200 <generate_chng+0xa0>
mov    %r14,%rdi
lea    0xdb8(%rip),%rsi
call   1040 <strcat@plt>
jmp    1200 <generate_chng+0xa0>
xor    %eax,%eax
call   1080 <rand@plt>
test   %ebp,%ebp
mov    0x18(%rsp),%r12
js     13e7 <generate_chng+0x287>
movslq %eax,%r14
imul   $0x66666667,%r14,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%r14d
add    $0x1,%ebp
nopl   0x0(%rax)
mov    %rbp,0x28(%rsp)
mov    %r13d,%ebp
lea    0x1030(%rsp),%r13
mov    %r13,%rdi
lea    0xd5c(%rip),%rsi
mov    %r14d,%edx
call   1060 <sprintf@plt>
lea    0xd57(%rip),%rdi
mov    %r13,%rsi
lea    0x30(%rsp),%r15
mov    %r15,%rdx
xor    %eax,%eax
call   1070 <sqlite3_mprintf@plt>
mov    %rax,%rbx
mov    %r12,%rdi
mov    %rax,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
lea    0x10(%rsp),%r8
call   1030 <sqlite3_exec@plt>
mov    %rbx,%rdi
call   1050 <sqlite3_free@plt>
xor    %eax,%eax
call   1080 <rand@plt>
movslq %eax,%r12
imul   $0x66666667,%r12,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x2,%eax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%r12d
xor    %eax,%eax
call   1080 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,(%rsp)
lea    0xcf2(%rip),%rdi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r13,%rcx
mov    %ebp,%r13d
mov    0x28(%rsp),%rbp
mov    %r13d,%r8d
mov    %r12d,%r9d
mov    0x18(%rsp),%r12
xor    %eax,%eax
call   1070 <sqlite3_mprintf@plt>
mov    %rax,%rbx
mov    %r12,%rdi
mov    %rax,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
lea    0x10(%rsp),%r8
call   1030 <sqlite3_exec@plt>
mov    %rbx,%rdi
call   1050 <sqlite3_free@plt>
xor    %eax,%eax
call   1080 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
add    %eax,%r14d
add    $0x1,%r14d
add    $0xffffffff,%ebp
jne    12c0 <generate_chng+0x160>
lea    0xcab(%rip),%rdi
mov    %r13d,%esi
mov    0x24(%rsp),%edx
mov    %r13d,%ecx
mov    $0x4e20,%r8d
xor    %eax,%eax
call   1070 <sqlite3_mprintf@plt>
mov    %rax,%rbx
lea    0x10(%rsp),%r8
mov    %r12,%rdi
mov    %rax,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <sqlite3_exec@plt>
mov    %rbx,%rdi
call   1050 <sqlite3_free@plt>
add    $0x2038,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"BEGIN;\00"
@.str.1 = [7 x i8] c"dir_%d\00"
@.str.2 = [38 x i8] c"REPLACE INTO file VALUES(1,'%q','%q')\00"
@.str.3 = [2 x i8] c"/\00"
@.str.4 = [10 x i8] c"file_%d.c\00"
@.str.5 = [38 x i8] c"REPLACE INTO file VALUES(0,'%q','%q')\00"
@.str.6 = [51 x i8] c"INSERT INTO filechng VALUES(%d,'%q/%q','%d',%d,%d)\00"
@.str.7 = [70 x i8] c"INSERT INTO chng VALUES(%d,%d,'',0,'setup','checkin %d of %d');COMMIT\00"
define void @generate_chng(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca [4096 x i8]
%11 = alloca [4096 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%16 = call i32 (...) @rand()
%17 = srem i32 %16, 3
%18 = add nsw i32 1, %17
store i32 %18, i32* %12
%19 = call i32 (...) @rand()
%20 = srem i32 %19, 10
%21 = add nsw i32 1, %20
store i32 %21, i32* %13
%22 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
store i8 0, i8* %22
%23 = load i32*, i32** %4
%24 = call i32 @sqlite3_exec(i32* %23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i8** %9)
store i32 0, i32* %15
store i32 0, i32* %14
br label %25
25: ; preds = %52, %3
%26 = load i32, i32* %14
%27 = load i32, i32* %12
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %55
29: ; preds = %25
%30 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%31 = call i32 (...) @rand()
%32 = srem i32 %31, 8
%33 = call i32 @sprintf(i8* %30, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%35 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%36 = call i8* (i8*, ...) @sqlite3_mprintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* %34, i8* %35)
store i8* %36, i8** %8
%37 = load i32*, i32** %4
%38 = load i8*, i8** %8
%39 = call i32 @sqlite3_exec(i32* %37, i8* %38, i32 0, i32 0, i8** %9)
%40 = load i8*, i8** %8
%41 = call i32 @sqlite3_free(i8* %40)
%42 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%43 = load i8, i8* %42
%44 = icmp ne i8 %43, 0
br i1 %44, label %45, label %48
45: ; preds = %29
%46 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%47 = call i32 @strcat(i8* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %48
48: ; preds = %45, %29
%49 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%50 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%51 = call i32 @strcat(i8* %49, i8* %50)
br label %52
52: ; preds = %48
%53 = load i32, i32* %14
%54 = add nsw i32 %53, 1
store i32 %54, i32* %14
br label %25
55: ; preds = %25
store i32 0, i32* %14
%56 = call i32 (...) @rand()
%57 = srem i32 %56, 10
store i32 %57, i32* %15
br label %58
58: ; preds = %88, %55
%59 = load i32, i32* %14
%60 = load i32, i32* %13
%61 = icmp slt i32 %59, %60
br i1 %61, label %62, label %96
62: ; preds = %58
%63 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%64 = load i32, i32* %15
%65 = call i32 @sprintf(i8* %63, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %64)
%66 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%67 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%68 = call i8* (i8*, ...) @sqlite3_mprintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i8* %66, i8* %67)
store i8* %68, i8** %8
%69 = load i32*, i32** %4
%70 = load i8*, i8** %8
%71 = call i32 @sqlite3_exec(i32* %69, i8* %70, i32 0, i32 0, i8** %9)
%72 = load i8*, i8** %8
%73 = call i32 @sqlite3_free(i8* %72)
%74 = load i32, i32* %6
%75 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%76 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%77 = load i32, i32* %6
%78 = call i32 (...) @rand()
%79 = srem i32 %78, 10
%80 = call i32 (...) @rand()
%81 = srem i32 %80, 10
%82 = call i8* (i8*, ...) @sqlite3_mprintf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0), i32 %74, i8* %75, i8* %76, i32 %77, i32 %79, i32 %81)
store i8* %82, i8** %8
%83 = load i32*, i32** %4
%84 = load i8*, i8** %8
%85 = call i32 @sqlite3_exec(i32* %83, i8* %84, i32 0, i32 0, i8** %9)
%86 = load i8*, i8** %8
%87 = call i32 @sqlite3_free(i8* %86)
br label %88
88: ; preds = %62
%89 = load i32, i32* %14
%90 = add nsw i32 %89, 1
store i32 %90, i32* %14
%91 = call i32 (...) @rand()
%92 = srem i32 %91, 3
%93 = add nsw i32 1, %92
%94 = load i32, i32* %15
%95 = add nsw i32 %94, %93
store i32 %95, i32* %15
br label %58
96: ; preds = %58
%97 = load i32, i32* %6
%98 = load i32, i32* %5
%99 = load i32, i32* %6
%100 = call i8* (i8*, ...) @sqlite3_mprintf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.7, i64 0, i64 0), i32 %97, i32 %98, i32 %99, i32 20000)
store i8* %100, i8** %8
%101 = load i32*, i32** %4
%102 = load i8*, i8** %8
%103 = call i32 @sqlite3_exec(i32* %101, i8* %102, i32 0, i32 0, i8** %9)
store i32 %103, i32* %7
%104 = load i8*, i8** %8
%105 = call i32 @sqlite3_free(i8* %104)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"BEGIN;\00"
@.str.1 = [7 x i8] c"dir_%d\00"
@.str.2 = [38 x i8] c"REPLACE INTO file VALUES(1,'%q','%q')\00"
@.str.3 = [2 x i8] c"/\00"
@.str.4 = [10 x i8] c"file_%d.c\00"
@.str.5 = [38 x i8] c"REPLACE INTO file VALUES(0,'%q','%q')\00"
@.str.6 = [51 x i8] c"INSERT INTO filechng VALUES(%d,'%q/%q','%d',%d,%d)\00"
@.str.7 = [70 x i8] c"INSERT INTO chng VALUES(%d,%d,'',0,'setup','checkin %d of %d');COMMIT\00"
define void @generate_chng(i32* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca [4096 x i8]
%6 = alloca [4096 x i8]
%7 = bitcast i8** %4 to i8*
%8 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 3
%12 = tail call i32 (...) @rand()
%13 = srem i32 %12, 10
store i8 0, i8* %8
%14 = call i32 @sqlite3_exec(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i8** %4)
%15 = icmp slt i32 %11, 0
br i1 %15, label %32, label %16
16: ; preds = %3, %28
%17 = phi i32 [ %30, %28 ], [ 0, %3 ]
%18 = call i32 (...) @rand()
%19 = srem i32 %18, 8
%20 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = call i8* (i8*, ...) @sqlite3_mprintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* %9, i8* %8)
%22 = call i32 @sqlite3_exec(i32* %0, i8* %21, i32 0, i32 0, i8** %4)
%23 = call i32 @sqlite3_free(i8* %21)
%24 = load i8, i8* %8
%25 = icmp eq i8 %24, 0
br i1 %25, label %28, label %26
26: ; preds = %16
%27 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %28
28: ; preds = %26, %16
%29 = call i32 @strcat(i8* %8, i8* %9)
%30 = add nuw nsw i32 %17, 1
%31 = icmp eq i32 %17, %11
br i1 %31, label %32, label %16
32: ; preds = %28, %3
%33 = call i32 (...) @rand()
%34 = icmp slt i32 %13, 0
br i1 %34, label %57, label %35
35: ; preds = %32
%36 = srem i32 %33, 10
br label %37
37: ; preds = %35, %37
%38 = phi i32 [ %55, %37 ], [ %36, %35 ]
%39 = phi i32 [ %51, %37 ], [ 0, %35 ]
%40 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %38)
%41 = call i8* (i8*, ...) @sqlite3_mprintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i8* %9, i8* %8)
%42 = call i32 @sqlite3_exec(i32* %0, i8* %41, i32 0, i32 0, i8** %4)
%43 = call i32 @sqlite3_free(i8* %41)
%44 = call i32 (...) @rand()
%45 = srem i32 %44, 10
%46 = call i32 (...) @rand()
%47 = srem i32 %46, 10
%48 = call i8* (i8*, ...) @sqlite3_mprintf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0), i32 %2, i8* %8, i8* %9, i32 %2, i32 %45, i32 %47)
%49 = call i32 @sqlite3_exec(i32* %0, i8* %48, i32 0, i32 0, i8** %4)
%50 = call i32 @sqlite3_free(i8* %48)
%51 = add nuw nsw i32 %39, 1
%52 = call i32 (...) @rand()
%53 = srem i32 %52, 3
%54 = add i32 %38, 1
%55 = add i32 %54, %53
%56 = icmp eq i32 %39, %13
br i1 %56, label %57, label %37
57: ; preds = %37, %32
%58 = call i8* (i8*, ...) @sqlite3_mprintf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.7, i64 0, i64 0), i32 %2, i32 %1, i32 %2, i32 20000)
%59 = call i32 @sqlite3_exec(i32* %0, i8* %58, i32 0, i32 0, i8** %4)
%60 = call i32 @sqlite3_free(i8* %58)
ret void
}