#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 char **MYSQL_ROW;
typedef int /*<<< orphan*/ MYSQL_RES;
typedef int /*<<< orphan*/ MYSQL;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ mysql_close(int /*<<< orphan*/ *);
char *mysql_error(int /*<<< orphan*/ *);
char **mysql_fetch_row(int /*<<< orphan*/ *);
int /*<<< orphan*/ mysql_free_result(int /*<<< orphan*/ *);
int /*<<< orphan*/ *mysql_init(int /*<<< orphan*/ *);
int mysql_num_rows(int /*<<< orphan*/ *);
scalar_t__ mysql_query(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ mysql_real_connect(int /*<<< orphan*/ *, char *, char *,
                                      char *, char *, int /*<<< orphan*/,
                                      int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ *mysql_store_result(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
int main(void) {
  MYSQL *conn;
  MYSQL_RES *res;
  MYSQL_ROW row;
  int lengths;
  char *server = "localhost";
  char *user = "perdition";
  char *password = "123456";
  char *database = "perdition";
  conn = mysql_init(NULL);
  if (!mysql_real_connect(conn, server, user, password, database, 0, NULL, 0)) {
    fprintf(stderr, "%s\n", mysql_error(conn));
    exit(1);
  }
  if (mysql_query(conn, "select keyword from replace_keyword") == 0) {
    res = mysql_store_result(conn);
    if (res != NULL) {
      lengths = mysql_num_rows(res);
      printf("Retrieved %u rows\n", lengths);
      char **arrayString = (char **)malloc(lengths * sizeof(char *));
      int i = 0;
      for (i = 0; i < lengths; i++) {
        arrayString[i] = (char *)malloc(lengths * sizeof(char));
      }
      int index = 0;
      printf("MySQL Tables in mysql database:\n");
      while ((row = mysql_fetch_row(res)) != NULL) {
        printf("%s \n", row[0]);
        printf("%d \n", index);
        strcpy(arrayString[index], row[0]);
        index++;
        printf("%d \n", index);
      }
      printf("Printf data from array string:\n");
      for (i = 0; i < index; i++) {
        printf("%s \n", arrayString[i]);
      }
    } else
      printf("Query failed\n");
  }
  mysql_free_result(res);
  mysql_close(conn);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe0a(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe09(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe08(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xdf3(%rip),%rax
mov    %rax,-0x48(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10b0 <mysql_init@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
xor    %r9d,%r9d
xor    %eax,%eax
movq   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1090 <mysql_real_connect@plt>
cmp    $0x0,%eax
jne    1290 <main+0xb0>
mov    0x2d7a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x10(%rbp),%rdi
call   10d0 <mysql_error@plt>
mov    -0x5c(%rbp),%edi
mov    %rax,%rdx
lea    0xd9a(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    -0x10(%rbp),%rdi
lea    0xd84(%rip),%rsi
call   1040 <mysql_query@plt>
cmp    $0x0,%rax
jne    1422 <main+0x242>
mov    -0x10(%rbp),%rdi
call   1100 <mysql_store_result@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     140f <main+0x22f>
mov    -0x18(%rbp),%rdi
call   10f0 <mysql_num_rows@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xd6b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1338 <main+0x158>
movslq -0x24(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1300 <main+0x120>
movl   $0x0,-0x58(%rbp)
lea    0xd10(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <mysql_fetch_row@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     13c1 <main+0x1e1>
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
lea    0xd05(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x58(%rbp),%esi
lea    0xcf9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x50(%rbp),%rax
movslq -0x58(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcpy@plt>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%esi
lea    0xcc7(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    134d <main+0x16d>
lea    0xcb9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x58(%rbp),%eax
jge    140a <main+0x22a>
mov    -0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xc82(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    13d6 <main+0x1f6>
jmp    141d <main+0x23d>
lea    0xc8b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1422 <main+0x242>
mov    -0x18(%rbp),%rdi
call   10c0 <mysql_free_result@plt>
mov    -0x10(%rbp),%rdi
call   10a0 <mysql_close@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %edi,%edi
call   10c0 <mysql_init@plt>
mov    %rax,%r13
lea    0xdf4(%rip),%rsi
lea    0xe01(%rip),%rcx
lea    0xdf0(%rip),%rdx
mov    %rax,%rdi
mov    %rdx,%r8
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   10a0 <mysql_real_connect@plt>
add    $0x10,%rsp
test   %eax,%eax
je     139f <main+0x1af>
lea    0xde0(%rip),%rsi
mov    %r13,%rdi
call   1050 <mysql_query@plt>
mov    %r13,%rdi
call   1110 <mysql_store_result@plt>
mov    %rax,%r15
test   %rax,%rax
je     1369 <main+0x179>
mov    %r15,%rdi
call   1100 <mysql_num_rows@plt>
mov    %eax,%r14d
lea    0xdd6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x0(,%r14,8),%edi
call   1090 <malloc@plt>
mov    %rax,%r12
test   %r14d,%r14d
jle    12a5 <main+0xb5>
mov    %r14d,%ebp
xor    %ebx,%ebx
mov    %r14d,%edi
call   1090 <malloc@plt>
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1290 <main+0xa0>
lea    0xdc1(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1060 <mysql_fetch_row@plt>
test   %rax,%rax
je     1372 <main+0x182>
mov    %rax,%r14
mov    %r13,(%rsp)
lea    0xd86(%rip),%r13
lea    0xd84(%rip),%rbp
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14),%rsi
mov    %r13,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    (%r12,%rbx,8),%rdi
mov    (%r14),%rsi
call   1030 <strcpy@plt>
add    $0x1,%rbx
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r15,%rdi
call   1060 <mysql_fetch_row@plt>
mov    %rax,%r14
test   %rax,%rax
jne    12e0 <main+0xf0>
lea    0xd61(%rip),%rdi
call   1040 <puts@plt>
test   %ebx,%ebx
mov    (%rsp),%r13
je     137e <main+0x18e>
mov    %ebx,%ebp
lea    0xd14(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r12,%rbx,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1350 <main+0x160>
jmp    137e <main+0x18e>
lea    0xcf0(%rip),%rdi
jmp    1379 <main+0x189>
lea    0xd14(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   10d0 <mysql_free_result@plt>
mov    %r13,%rdi
call   10b0 <mysql_close@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c3a(%rip),%rax
mov    (%rax),%ebx
mov    %r13,%rdi
call   10e0 <mysql_error@plt>
lea    0xc64(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [10 x i8] c"perdition\00"
@.str.2 = [7 x i8] c"123456\00"
@stderr = global i32 0
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [36 x i8] c"select keyword from replace_keyword\00"
@.str.5 = [19 x i8] c"Retrieved %u rows\0A\00"
@.str.6 = [33 x i8] c"MySQL Tables in mysql database:\0A\00"
@.str.7 = [5 x i8] c"%s \0A\00"
@.str.8 = [5 x i8] c"%d \0A\00"
@.str.9 = [32 x i8] c"Printf data from array string:\0A\00"
@.str.10 = [14 x i8] c"Query failed\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8**
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %9
%13 = call i32* @mysql_init(i32* null)
store i32* %13, i32** %2
%14 = load i32*, i32** %2
%15 = load i8*, i8** %6
%16 = load i8*, i8** %7
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = call i32 @mysql_real_connect(i32* %14, i8* %15, i8* %16, i8* %17, i8* %18, i32 0, i32* null, i32 0)
%20 = icmp ne i32 %19, 0
br i1 %20, label %27, label %21
21: ; preds = %0
%22 = load i32, i32* @stderr
%23 = load i32*, i32** %2
%24 = call i8* @mysql_error(i32* %23)
%25 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %24)
%26 = call i32 @exit(i32 1)
unreachable
27: ; preds = %0
%28 = load i32*, i32** %2
%29 = call i64 @mysql_query(i32* %28, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %111
31: ; preds = %27
%32 = load i32*, i32** %2
%33 = call i32* @mysql_store_result(i32* %32)
store i32* %33, i32** %3
%34 = load i32*, i32** %3
%35 = icmp ne i32* %34, null
br i1 %35, label %36, label %108
36: ; preds = %31
%37 = load i32*, i32** %3
%38 = call i32 @mysql_num_rows(i32* %37)
store i32 %38, i32* %5
%39 = load i32, i32* %5
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %5
%42 = sext i32 %41 to i64
%43 = mul i64 %42, 8
%44 = trunc i64 %43 to i32
%45 = call i64 @malloc(i32 %44)
%46 = inttoptr i64 %45 to i8**
store i8** %46, i8*** %10
store i32 0, i32* %11
store i32 0, i32* %11
br label %47
47: ; preds = %62, %36
%48 = load i32, i32* %11
%49 = load i32, i32* %5
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %65
51: ; preds = %47
%52 = load i32, i32* %5
%53 = sext i32 %52 to i64
%54 = mul i64 %53, 1
%55 = trunc i64 %54 to i32
%56 = call i64 @malloc(i32 %55)
%57 = inttoptr i64 %56 to i8*
%58 = load i8**, i8*** %10
%59 = load i32, i32* %11
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8*, i8** %58, i64 %60
store i8* %57, i8** %61
br label %62
62: ; preds = %51
%63 = load i32, i32* %11
%64 = add nsw i32 %63, 1
store i32 %64, i32* %11
br label %47
65: ; preds = %47
store i32 0, i32* %12
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
br label %67
67: ; preds = %71, %65
%68 = load i32*, i32** %3
%69 = call i8** @mysql_fetch_row(i32* %68)
store i8** %69, i8*** %4
%70 = icmp ne i8** %69, null
br i1 %70, label %71, label %91
71: ; preds = %67
%72 = load i8**, i8*** %4
%73 = getelementptr inbounds i8*, i8** %72, i64 0
%74 = load i8*, i8** %73
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %74)
%76 = load i32, i32* %12
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 %76)
%78 = load i8**, i8*** %10
%79 = load i32, i32* %12
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8*, i8** %78, i64 %80
%82 = load i8*, i8** %81
%83 = load i8**, i8*** %4
%84 = getelementptr inbounds i8*, i8** %83, i64 0
%85 = load i8*, i8** %84
%86 = call i32 @strcpy(i8* %82, i8* %85)
%87 = load i32, i32* %12
%88 = add nsw i32 %87, 1
store i32 %88, i32* %12
%89 = load i32, i32* %12
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 %89)
br label %67
91: ; preds = %67
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %11
br label %93
93: ; preds = %104, %91
%94 = load i32, i32* %11
%95 = load i32, i32* %12
%96 = icmp slt i32 %94, %95
br i1 %96, label %97, label %107
97: ; preds = %93
%98 = load i8**, i8*** %10
%99 = load i32, i32* %11
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8*, i8** %98, i64 %100
%102 = load i8*, i8** %101
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %102)
br label %104
104: ; preds = %97
%105 = load i32, i32* %11
%106 = add nsw i32 %105, 1
store i32 %106, i32* %11
br label %93
107: ; preds = %93
br label %110
108: ; preds = %31
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %110
110: ; preds = %108, %107
br label %111
111: ; preds = %110, %27
%112 = load i32*, i32** %3
%113 = call i32 @mysql_free_result(i32* %112)
%114 = load i32*, i32** %2
%115 = call i32 @mysql_close(i32* %114)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [10 x i8] c"perdition\00"
@.str.2 = [7 x i8] c"123456\00"
@stderr = global i32 0
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [36 x i8] c"select keyword from replace_keyword\00"
@.str.5 = [19 x i8] c"Retrieved %u rows\0A\00"
@.str.7 = [5 x i8] c"%s \0A\00"
@.str.8 = [5 x i8] c"%d \0A\00"
@str = [13 x i8] c"Query failed\00"
@str.11 = [32 x i8] c"MySQL Tables in mysql database:\00"
@str.12 = [31 x i8] c"Printf data from array string:\00"
define i32 @main() {
%1 = tail call i32* @mysql_init(i32* null)
%2 = tail call i32 @mysql_real_connect(i32* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 0, i32* null, i32 0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = load i32, i32* @stderr
%6 = tail call i8* @mysql_error(i32* %1)
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = tail call i64 @mysql_query(i32* %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
tail call void @llvm.assume(i1 %11)
%12 = tail call i32* @mysql_store_result(i32* %1)
%13 = icmp eq i32* %12, null
br i1 %13, label %63, label %14
14: ; preds = %9
%15 = tail call i32 @mysql_num_rows(i32* %12)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %15)
%17 = shl i32 %15, 3
%18 = tail call i64 @malloc(i32 %17)
%19 = inttoptr i64 %18 to i8**
%20 = icmp sgt i32 %15, 0
br i1 %20, label %21, label %30
21: ; preds = %14
%22 = zext i32 %15 to i64
br label %23
23: ; preds = %21, %23
%24 = phi i64 [ 0, %21 ], [ %28, %23 ]
%25 = tail call i64 @malloc(i32 %15)
%26 = inttoptr i64 %25 to i8*
%27 = getelementptr inbounds i8*, i8** %19, i64 %24
store i8* %26, i8** %27
%28 = add nuw nsw i64 %24, 1
%29 = icmp eq i64 %28, %22
br i1 %29, label %30, label %23
30: ; preds = %23, %14
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.11, i64 0, i64 0))
%32 = tail call i8** @mysql_fetch_row(i32* %12)
%33 = icmp eq i8** %32, null
br i1 %33, label %63, label %34
34: ; preds = %30, %34
%35 = phi i64 [ %45, %34 ], [ 0, %30 ]
%36 = phi i8** [ %48, %34 ], [ %32, %30 ]
%37 = load i8*, i8** %36
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %37)
%39 = trunc i64 %35 to i32
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 %39)
%41 = getelementptr inbounds i8*, i8** %19, i64 %35
%42 = load i8*, i8** %41
%43 = load i8*, i8** %36
%44 = tail call i32 @strcpy(i8* %42, i8* %43)
%45 = add nuw i64 %35, 1
%46 = trunc i64 %45 to i32
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 %46)
%48 = tail call i8** @mysql_fetch_row(i32* %12)
%49 = icmp eq i8** %48, null
br i1 %49, label %50, label %34
50: ; preds = %34
%51 = trunc i64 %45 to i32
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.12, i64 0, i64 0))
%53 = icmp eq i32 %51, 0
br i1 %53, label %66, label %54
54: ; preds = %50
%55 = and i64 %45, 4294967295
br label %56
56: ; preds = %54, %56
%57 = phi i64 [ 0, %54 ], [ %61, %56 ]
%58 = getelementptr inbounds i8*, i8** %19, i64 %57
%59 = load i8*, i8** %58
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %59)
%61 = add nuw nsw i64 %57, 1
%62 = icmp eq i64 %61, %55
br i1 %62, label %66, label %56
63: ; preds = %9, %30
%64 = phi i8* [ getelementptr inbounds ([31 x i8], [31 x i8]* @str.12, i64 0, i64 0), %30 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0), %9 ]
%65 = tail call i32 @puts(i8* dereferenceable(1) %64)
br label %66
66: ; preds = %56, %63, %50
%67 = tail call i32 @mysql_free_result(i32* %12)
%68 = tail call i32 @mysql_close(i32* %1)
ret i32 0
}