#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 SQLITE_OK;
int SQLITE_ROW;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sqlite3_close(int /*<<< orphan*/ *);
int sqlite3_column_count(int /*<<< orphan*/ *);
char *sqlite3_column_text(int /*<<< orphan*/ *, int);
char *sqlite3_errmsg(int /*<<< orphan*/ *);
int /*<<< orphan*/ sqlite3_finalize(int /*<<< orphan*/ *);
int sqlite3_open(char *, int /*<<< orphan*/ **);
int sqlite3_prepare_v2(int /*<<< orphan*/ *, char *, int, int /*<<< orphan*/ **,
                       int /*<<< orphan*/);
int sqlite3_step(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main(int argc, char **argv) {
  sqlite3 *db;
  sqlite3_stmt *stmt;
  int rc;
  if (argc != 3) {
    fprintf(stderr, "Usage: %s <database file> <airport>\n", argv[0]);
    return (1);
  }
  rc = sqlite3_open(argv[1], &db);
  if (rc) {
    fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
    sqlite3_close(db);
    return (1);
  }
  char *test = "WITH RECURSIVE test(Destination_airport) AS "
               "(select distinct routes.Destination_airport "
               "from airports, routes "
               "where routes.Source_airport = '' "
               "UNION "
               "select r.Destination_airport "
               "from routes r "
               "JOIN test t ON r.Source_airport = t.Destination_airport) "
               "select distinct ap.Name "
               "from airports ap, airlines a "
               "where (ap.IATA_FAA NOT IN test) and "
               "ap.IATA_FAA IN (select Source_airport from routes) and "
               "ap.IATA_FAA IN (select destination_airport from routes) and "
               "a.IATA != '' and a.ICAO != '' "
               "and a.Country != '' and a.Callsign != '' "
               "and a.Active = 'Y' and ap.IATA_FAA != '' and ap.ICAO != '';";
  char sql_stmt[800];
  int x = 141;
  strncpy(sql_stmt, test, x);
  sql_stmt[x] = '\0';
  strcat(sql_stmt, argv[2]);
  strcat(sql_stmt, test + x);
  rc = sqlite3_prepare_v2(db, sql_stmt, -1, &stmt, 0);
  if (rc != SQLITE_OK) {
    fprintf(stderr, "Preparation failed: %s\n", sqlite3_errmsg(db));
    sqlite3_close(db);
    return 1;
  }
  while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) {
    int col;
    for (col = 0; col < sqlite3_column_count(stmt) - 1; col++) {
      printf("%s|", sqlite3_column_text(stmt, col));
    }
    printf("%s", sqlite3_column_text(stmt, col));
    printf("\n");
  }
  sqlite3_finalize(stmt);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x370,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     120b <main+0x4b>
mov    0x2dee(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe06(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    140f <main+0x24f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <sqlite3_open@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     126b <main+0xab>
mov    0x2da8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x35c(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <sqlite3_errmsg@plt>
mov    -0x35c(%rbp),%edi
mov    %rax,%rdx
lea    0xdd4(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1090 <sqlite3_close@plt>
movl   $0x1,-0x4(%rbp)
jmp    140f <main+0x24f>
lea    0xdcc(%rip),%rax
mov    %rax,-0x30(%rbp)
movl   $0x8d,-0x354(%rbp)
lea    -0x350(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x354(%rbp),%edx
call   1030 <strncpy@plt>
movslq -0x354(%rbp),%rax
movb   $0x0,-0x350(%rbp,%rax,1)
lea    -0x350(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   10e0 <strcat@plt>
lea    -0x350(%rbp),%rdi
mov    -0x30(%rbp),%rsi
movslq -0x354(%rbp),%rax
add    %rax,%rsi
call   10e0 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    -0x350(%rbp),%rsi
mov    $0xffffffff,%edx
lea    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   10d0 <sqlite3_prepare_v2@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    0x2cec(%rip),%rcx
cmp    (%rcx),%eax
je     1346 <main+0x186>
mov    0x2ccd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x360(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <sqlite3_errmsg@plt>
mov    -0x360(%rbp),%edi
mov    %rax,%rdx
lea    0xf5a(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1090 <sqlite3_close@plt>
movl   $0x1,-0x4(%rbp)
jmp    140f <main+0x24f>
jmp    134b <main+0x18b>
mov    -0x20(%rbp),%rdi
call   1070 <sqlite3_step@plt>
mov    %eax,-0x24(%rbp)
mov    0x2c72(%rip),%rcx
cmp    (%rcx),%eax
jne    13ff <main+0x23f>
movl   $0x0,-0x358(%rbp)
mov    -0x358(%rbp),%eax
mov    %eax,-0x364(%rbp)
mov    -0x20(%rbp),%rdi
call   10a0 <sqlite3_column_count@plt>
mov    %eax,%ecx
mov    -0x364(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13cc <main+0x20c>
mov    -0x20(%rbp),%rdi
mov    -0x358(%rbp),%esi
call   10b0 <sqlite3_column_text@plt>
mov    %rax,%rsi
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x358(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x358(%rbp)
jmp    1370 <main+0x1b0>
mov    -0x20(%rbp),%rdi
mov    -0x358(%rbp),%esi
call   10b0 <sqlite3_column_text@plt>
mov    %rax,%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc30(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    134b <main+0x18b>
mov    -0x20(%rbp),%rdi
call   10c0 <sqlite3_finalize@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x370,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x338,%rsp
mov    %rsi,%rbx
cmp    $0x3,%edi
jne    1216 <main+0x46>
mov    0x8(%rbx),%rdi
lea    0x8(%rsp),%rsi
call   1050 <sqlite3_open@plt>
test   %eax,%eax
je     1233 <main+0x63>
mov    0x2dda(%rip),%rax
mov    (%rax),%ebx
mov    0x8(%rsp),%rdi
call   1070 <sqlite3_errmsg@plt>
lea    0xe14(%rip),%rsi
jmp    1357 <main+0x187>
mov    0x2dbb(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xdd7(%rip),%rsi
call   1090 <fprintf@plt>
jmp    136b <main+0x19b>
lea    0xe04(%rip),%rsi
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x8d,%edx
call   1040 <strncpy@plt>
movb   $0x0,0x9d(%rsp)
mov    0x10(%rbx),%rsi
mov    %rbp,%rdi
call   10f0 <strcat@plt>
lea    0xe64(%rip),%rsi
mov    %rbp,%rdi
call   10f0 <strcat@plt>
mov    0x8(%rsp),%rdi
mov    %rsp,%rcx
mov    %rbp,%rsi
mov    $0xffffffff,%edx
xor    %r8d,%r8d
call   10e0 <sqlite3_prepare_v2@plt>
mov    0x2d5a(%rip),%rcx
cmp    (%rcx),%eax
jne    133d <main+0x16d>
mov    (%rsp),%rdi
call   1080 <sqlite3_step@plt>
mov    0x2d2a(%rip),%r15
cmp    (%r15),%eax
jne    137e <main+0x1ae>
lea    0xfe8(%rip),%rbx
lea    0xfe5(%rip),%r14
jmp    12f4 <main+0x124>
nop
mov    (%rsp),%rdi
mov    %ebp,%esi
call   10c0 <sqlite3_column_text@plt>
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rsp),%rdi
call   1080 <sqlite3_step@plt>
cmp    (%r15),%eax
jne    137e <main+0x1ae>
mov    (%rsp),%rdi
call   10b0 <sqlite3_column_count@plt>
mov    $0x0,%ebp
cmp    $0x2,%eax
jl     12c0 <main+0xf0>
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    (%rsp),%rdi
mov    %ebp,%esi
call   10c0 <sqlite3_column_text@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%ebp
mov    (%rsp),%rdi
call   10b0 <sqlite3_column_count@plt>
add    $0xffffffff,%eax
cmp    %eax,%ebp
jl     1310 <main+0x140>
jmp    12c0 <main+0xf0>
mov    0x2c94(%rip),%rax
mov    (%rax),%ebx
mov    0x8(%rsp),%rdi
call   1070 <sqlite3_errmsg@plt>
lea    0xf2f(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
mov    0x8(%rsp),%rdi
call   10a0 <sqlite3_close@plt>
mov    $0x1,%eax
add    $0x338,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rsp),%rdi
call   10d0 <sqlite3_finalize@plt>
xor    %eax,%eax
jmp    1370 <main+0x1a0>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Usage: %s <database file> <airport>\0A\00"
@.str.1 = [25 x i8] c"Can't open database: %s\0A\00"
@.str.2 = [584 x i8] c"WITH RECURSIVE test(Destination_airport) AS (select distinct routes.Destination_airport from airports, routes where routes.Source_airport = '' UNION select r.Destination_airport from routes r JOIN test t ON r.Source_airport = t.Destination_airport) select distinct ap.Name from airports ap, airlines a where (ap.IATA_FAA NOT IN test) and ap.IATA_FAA IN (select Source_airport from routes) and ap.IATA_FAA IN (select destination_airport from routes) and a.IATA != '' and a.ICAO != '' and a.Country != '' and a.Callsign != '' and a.Active = 'Y' and ap.IATA_FAA != '' and ap.ICAO != '';\00"
@SQLITE_OK = global i32 0
@.str.3 = [24 x i8] c"Preparation failed: %s\0A\00"
@SQLITE_ROW = global i32 0
@.str.4 = [4 x i8] c"%s|\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca [800 x i8]
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 3
br i1 %14, label %15, label %21
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %19)
store i32 1, i32* %3
br label %97
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32 @sqlite3_open(i8* %24, i32** %6)
store i32 %25, i32* %8
%26 = load i32, i32* %8
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %35
28: ; preds = %21
%29 = load i32, i32* @stderr
%30 = load i32*, i32** %6
%31 = call i8* @sqlite3_errmsg(i32* %30)
%32 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %31)
%33 = load i32*, i32** %6
%34 = call i32 @sqlite3_close(i32* %33)
store i32 1, i32* %3
br label %97
35: ; preds = %21
store i8* getelementptr inbounds ([584 x i8], [584 x i8]* @.str.2, i64 0, i64 0), i8** %9
store i32 141, i32* %11
%36 = getelementptr inbounds [800 x i8], [800 x i8]* %10, i64 0, i64 0
%37 = load i8*, i8** %9
%38 = load i32, i32* %11
%39 = call i32 @strncpy(i8* %36, i8* %37, i32 %38)
%40 = load i32, i32* %11
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [800 x i8], [800 x i8]* %10, i64 0, i64 %41
store i8 0, i8* %42
%43 = getelementptr inbounds [800 x i8], [800 x i8]* %10, i64 0, i64 0
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 2
%46 = load i8*, i8** %45
%47 = call i32 @strcat(i8* %43, i8* %46)
%48 = getelementptr inbounds [800 x i8], [800 x i8]* %10, i64 0, i64 0
%49 = load i8*, i8** %9
%50 = load i32, i32* %11
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %49, i64 %51
%53 = call i32 @strcat(i8* %48, i8* %52)
%54 = load i32*, i32** %6
%55 = getelementptr inbounds [800 x i8], [800 x i8]* %10, i64 0, i64 0
%56 = call i32 @sqlite3_prepare_v2(i32* %54, i8* %55, i32 -1, i32** %7, i32 0)
store i32 %56, i32* %8
%57 = load i32, i32* %8
%58 = load i32, i32* @SQLITE_OK
%59 = icmp ne i32 %57, %58
br i1 %59, label %60, label %67
60: ; preds = %35
%61 = load i32, i32* @stderr
%62 = load i32*, i32** %6
%63 = call i8* @sqlite3_errmsg(i32* %62)
%64 = call i32 @fprintf(i32 %61, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %63)
%65 = load i32*, i32** %6
%66 = call i32 @sqlite3_close(i32* %65)
store i32 1, i32* %3
br label %97
67: ; preds = %35
br label %68
68: ; preds = %88, %67
%69 = load i32*, i32** %7
%70 = call i32 @sqlite3_step(i32* %69)
store i32 %70, i32* %8
%71 = load i32, i32* @SQLITE_ROW
%72 = icmp eq i32 %70, %71
br i1 %72, label %73, label %94
73: ; preds = %68
store i32 0, i32* %12
br label %74
74: ; preds = %85, %73
%75 = load i32, i32* %12
%76 = load i32*, i32** %7
%77 = call i32 @sqlite3_column_count(i32* %76)
%78 = sub nsw i32 %77, 1
%79 = icmp slt i32 %75, %78
br i1 %79, label %80, label %88
80: ; preds = %74
%81 = load i32*, i32** %7
%82 = load i32, i32* %12
%83 = call i8* @sqlite3_column_text(i32* %81, i32 %82)
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %83)
br label %85
85: ; preds = %80
%86 = load i32, i32* %12
%87 = add nsw i32 %86, 1
store i32 %87, i32* %12
br label %74
88: ; preds = %74
%89 = load i32*, i32** %7
%90 = load i32, i32* %12
%91 = call i8* @sqlite3_column_text(i32* %89, i32 %90)
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %91)
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %68
94: ; preds = %68
%95 = load i32*, i32** %7
%96 = call i32 @sqlite3_finalize(i32* %95)
store i32 0, i32* %3
br label %97
97: ; preds = %94, %60, %28, %15
%98 = load i32, i32* %3
ret i32 %98
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Usage: %s <database file> <airport>\0A\00"
@.str.1 = [25 x i8] c"Can't open database: %s\0A\00"
@.str.2 = [584 x i8] c"WITH RECURSIVE test(Destination_airport) AS (select distinct routes.Destination_airport from airports, routes where routes.Source_airport = '' UNION select r.Destination_airport from routes r JOIN test t ON r.Source_airport = t.Destination_airport) select distinct ap.Name from airports ap, airlines a where (ap.IATA_FAA NOT IN test) and ap.IATA_FAA IN (select Source_airport from routes) and ap.IATA_FAA IN (select destination_airport from routes) and a.IATA != '' and a.ICAO != '' and a.Country != '' and a.Callsign != '' and a.Active = 'Y' and ap.IATA_FAA != '' and ap.ICAO != '';\00"
@SQLITE_OK = global i32 0
@.str.3 = [24 x i8] c"Preparation failed: %s\0A\00"
@SQLITE_ROW = global i32 0
@.str.4 = [4 x i8] c"%s|\00"
@.str.5 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [800 x i8]
%6 = bitcast i32** %3 to i8*
%7 = bitcast i32** %4 to i8*
%8 = icmp eq i32 %0, 3
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %1
%12 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %78
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @sqlite3_open(i8* %15, i32** %3)
%17 = icmp eq i32 %16, 0
br i1 %17, label %25, label %18
18: ; preds = %13
%19 = load i32, i32* @stderr
%20 = load i32*, i32** %3
%21 = call i8* @sqlite3_errmsg(i32* %20)
%22 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %21)
%23 = load i32*, i32** %3
%24 = call i32 @sqlite3_close(i32* %23)
br label %78
25: ; preds = %13
%26 = getelementptr inbounds [800 x i8], [800 x i8]* %5, i64 0, i64 0
%27 = call i32 @strncpy(i8* %26, i8* getelementptr inbounds ([584 x i8], [584 x i8]* @.str.2, i64 0, i64 0), i32 141)
%28 = getelementptr inbounds [800 x i8], [800 x i8]* %5, i64 0, i64 141
store i8 0, i8* %28
%29 = getelementptr inbounds i8*, i8** %1, i64 2
%30 = load i8*, i8** %29
%31 = call i32 @strcat(i8* %26, i8* %30)
%32 = call i32 @strcat(i8* %26, i8* getelementptr inbounds ([584 x i8], [584 x i8]* @.str.2, i64 0, i64 141))
%33 = load i32*, i32** %3
%34 = call i32 @sqlite3_prepare_v2(i32* %33, i8* %26, i32 -1, i32** %4, i32 0)
%35 = load i32, i32* @SQLITE_OK
%36 = icmp eq i32 %34, %35
br i1 %36, label %37, label %42
37: ; preds = %25
%38 = load i32*, i32** %4
%39 = call i32 @sqlite3_step(i32* %38)
%40 = load i32, i32* @SQLITE_ROW
%41 = icmp eq i32 %39, %40
br i1 %41, label %49, label %73
42: ; preds = %25
%43 = load i32, i32* @stderr
%44 = load i32*, i32** %3
%45 = call i8* @sqlite3_errmsg(i32* %44)
%46 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %45)
%47 = load i32*, i32** %3
%48 = call i32 @sqlite3_close(i32* %47)
br label %76
49: ; preds = %37, %63
%50 = load i32*, i32** %4
%51 = call i32 @sqlite3_column_count(i32* %50)
%52 = icmp sgt i32 %51, 1
br i1 %52, label %53, label %63
53: ; preds = %49, %53
%54 = phi i32 [ %58, %53 ], [ 0, %49 ]
%55 = load i32*, i32** %4
%56 = call i8* @sqlite3_column_text(i32* %55, i32 %54)
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %56)
%58 = add nuw nsw i32 %54, 1
%59 = load i32*, i32** %4
%60 = call i32 @sqlite3_column_count(i32* %59)
%61 = add nsw i32 %60, -1
%62 = icmp slt i32 %58, %61
br i1 %62, label %53, label %63
63: ; preds = %53, %49
%64 = phi i32 [ 0, %49 ], [ %58, %53 ]
%65 = load i32*, i32** %4
%66 = call i8* @sqlite3_column_text(i32* %65, i32 %64)
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %66)
%68 = call i32 @putchar(i32 10)
%69 = load i32*, i32** %4
%70 = call i32 @sqlite3_step(i32* %69)
%71 = load i32, i32* @SQLITE_ROW
%72 = icmp eq i32 %70, %71
br i1 %72, label %49, label %73
73: ; preds = %63, %37
%74 = load i32*, i32** %4
%75 = call i32 @sqlite3_finalize(i32* %74)
br label %76
76: ; preds = %73, %42
%77 = phi i32 [ 1, %42 ], [ 0, %73 ]
br label %78
78: ; preds = %76, %18, %9
%79 = phi i32 [ 1, %9 ], [ 1, %18 ], [ %77, %76 ]
ret i32 %79
}