#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*/ mysql_close(int /*<<< orphan*/ *);
char **mysql_fetch_row(int /*<<< orphan*/ *);
int /*<<< orphan*/ mysql_free_result(int /*<<< orphan*/ *);
int /*<<< orphan*/ mysql_init(int /*<<< orphan*/ *);
int mysql_num_fields(int /*<<< orphan*/ *);
int mysql_num_rows(int /*<<< orphan*/ *);
int mysql_query(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ *mysql_real_connect(int /*<<< orphan*/ *, char *, char *,
                                       char *, char *, int,
                                       int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
int /*<<< orphan*/ *mysql_store_result(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ send_result(int, int, int);
int /*<<< orphan*/ send_result1(int, int /*<<< orphan*/, int, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
void sele(int fd) {
  MYSQL db;
  MYSQL *pdb;
  mysql_init(&db);
  pdb = mysql_real_connect(&db, "127.0.0.1", "root", "123", "class306", 3306,
                           NULL, 0);
  if (pdb == NULL) {
    perror("connect fail");
    send_result(fd, 1, 6);
    return;
  } else {
    printf("connect ok\n");
  }
  char *sql = "select * from account;";
  int ret;
  ret = mysql_query(pdb, sql);
  if (ret == 0) {
    printf("select ok\n");
  } else {
    perror("select fail");
    printf("sql = %s\n", sql);
    send_result(fd, 1, 6);
  }
  MYSQL_RES *res;
  res = mysql_store_result(&db);
  int row;
  row = mysql_num_rows(res);
  if (row == 0) {
    send_result(fd, 1, 6);
    mysql_free_result(res);
    mysql_close(pdb);
    return;
  }
  int column;
  column = mysql_num_fields(res);
  char buff[1000] = {0};
  MYSQL_ROW result;
  int i;
  int j;
  for (i = 0; i < row; i++) {
    result = mysql_fetch_row(res);
    for (j = 0; j < column; j++) {
      printf("%10.10s", result[j]);
      sprintf(buff, "%s%10.10s", buff, result[j]);
    }
    printf("\n");
    sprintf(buff, "%s%s", buff, "\n");
  }
  send_result1(fd, 0, 6, buff);
  mysql_free_result(res);
  mysql_close(pdb);
  return;
}


x86 assembly (clang, -O0):
<sele>:
push   %rbp
mov    %rsp,%rbp
sub    $0x440,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   10b0 <mysql_init@plt>
lea    -0x8(%rbp),%rdi
lea    0xdee(%rip),%rsi
lea    0xdf1(%rip),%rdx
lea    0xdef(%rip),%rcx
lea    0xdec(%rip),%r8
mov    $0xcea,%r9d
xor    %eax,%eax
xor    %eax,%eax
movq   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1090 <mysql_real_connect@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1278 <sele+0x88>
lea    0xdc0(%rip),%rdi
call   10d0 <perror@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
mov    $0x6,%edx
call   1110 <send_result@plt>
jmp    1466 <sele+0x276>
lea    0xdaa(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xda8(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <mysql_query@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    12be <sele+0xce>
lea    0xd9a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    12ee <sele+0xfe>
lea    0xd92(%rip),%rdi
call   10d0 <perror@plt>
mov    -0x18(%rbp),%rsi
lea    0xd8e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
mov    $0x6,%edx
call   1110 <send_result@plt>
lea    -0x8(%rbp),%rdi
call   1100 <mysql_store_result@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   10f0 <mysql_num_rows@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    133a <sele+0x14a>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
mov    $0x6,%edx
call   1110 <send_result@plt>
mov    -0x28(%rbp),%rdi
call   10c0 <mysql_free_result@plt>
mov    -0x10(%rbp),%rdi
call   10a0 <mysql_close@plt>
jmp    1466 <sele+0x276>
mov    -0x28(%rbp),%rdi
call   1050 <mysql_num_fields@plt>
mov    %eax,-0x30(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1070 <memset@plt>
movl   $0x0,-0x42c(%rbp)
mov    -0x42c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    143e <sele+0x24e>
mov    -0x28(%rbp),%rdi
call   1040 <mysql_fetch_row@plt>
mov    %rax,-0x428(%rbp)
movl   $0x0,-0x430(%rbp)
mov    -0x430(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    13fb <sele+0x20b>
mov    -0x428(%rbp),%rax
movslq -0x430(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xcbb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x420(%rbp),%rdi
lea    -0x420(%rbp),%rdx
mov    -0x428(%rbp),%rax
movslq -0x430(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xc8b(%rip),%rsi
call   10e0 <sprintf@plt>
mov    -0x430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x430(%rbp)
jmp    138c <sele+0x19c>
lea    0xc53(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x420(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    0xc59(%rip),%rsi
lea    0xc30(%rip),%rcx
call   10e0 <sprintf@plt>
mov    -0x42c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x42c(%rbp)
jmp    1363 <sele+0x173>
mov    -0x4(%rbp),%edi
lea    -0x420(%rbp),%rcx
xor    %esi,%esi
mov    $0x6,%edx
call   1080 <send_result1@plt>
mov    -0x28(%rbp),%rdi
call   10c0 <mysql_free_result@plt>
mov    -0x10(%rbp),%rdi
call   10a0 <mysql_close@plt>
add    $0x440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sele>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
mov    %edi,%r14d
lea    0x1c(%rsp),%rbx
mov    %rbx,%rdi
call   10d0 <mysql_init@plt>
lea    0xdc8(%rip),%rsi
lea    0xdcb(%rip),%rdx
lea    0xdc9(%rip),%rcx
lea    0xdc6(%rip),%r8
mov    %rbx,%rdi
mov    $0xcea,%r9d
push   $0x0
push   $0x0
call   10b0 <mysql_real_connect@plt>
add    $0x10,%rsp
test   %rax,%rax
je     13f3 <sele+0x1e3>
mov    %rax,%rbp
lea    0xdef(%rip),%rdi
call   1040 <puts@plt>
lea    0xda7(%rip),%rsi
mov    %rbp,%rdi
call   1050 <mysql_query@plt>
test   %eax,%eax
jne    1413 <sele+0x203>
lea    0xdd7(%rip),%rdi
call   1040 <puts@plt>
lea    0x1c(%rsp),%rdi
call   1120 <mysql_store_result@plt>
mov    %rax,%r12
mov    %rax,%rdi
call   1110 <mysql_num_rows@plt>
test   %eax,%eax
je     13bf <sele+0x1af>
mov    %eax,%ebx
mov    %rbp,0x20(%rsp)
mov    %r14d,0x10(%rsp)
mov    %r12,%rdi
call   1070 <mysql_num_fields@plt>
mov    %eax,0xc(%rsp)
lea    0x30(%rsp),%rdi
mov    $0x3e8,%edx
xor    %esi,%esi
call   1090 <memset@plt>
test   %ebx,%ebx
jle    139b <sele+0x18b>
mov    0xc(%rsp),%r13d
lea    0xd60(%rip),%rbp
lea    0xd57(%rip),%r14
lea    0x30(%rsp),%r15
xor    %eax,%eax
mov    %r12,0x28(%rsp)
mov    %ebx,0x14(%rsp)
jmp    1357 <sele+0x147>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
lea    0xd2c(%rip),%rsi
mov    %r15,%rdx
lea    0xd16(%rip),%rcx
call   1100 <sprintf@plt>
mov    0x18(%rsp),%eax
add    $0x1,%eax
mov    0x14(%rsp),%ebx
cmp    %ebx,%eax
mov    0x28(%rsp),%r12
je     139b <sele+0x18b>
mov    %eax,0x18(%rsp)
mov    %r12,%rdi
call   1060 <mysql_fetch_row@plt>
cmpl   $0x0,0xc(%rsp)
jle    1320 <sele+0x110>
mov    %rax,%r12
xor    %ebx,%ebx
nop
mov    (%r12,%rbx,8),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    (%r12,%rbx,8),%rcx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1100 <sprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1370 <sele+0x160>
jmp    1320 <sele+0x110>
lea    0x30(%rsp),%rcx
mov    0x10(%rsp),%edi
xor    %esi,%esi
mov    $0x6,%edx
call   10a0 <send_result1@plt>
mov    %r12,%rdi
call   10e0 <mysql_free_result@plt>
mov    0x20(%rsp),%rdi
jmp    13dc <sele+0x1cc>
mov    %r14d,%edi
mov    $0x1,%esi
mov    $0x6,%edx
call   1130 <send_result@plt>
mov    %r12,%rdi
call   10e0 <mysql_free_result@plt>
mov    %rbp,%rdi
call   10c0 <mysql_close@plt>
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc22(%rip),%rdi
call   10f0 <perror@plt>
mov    %r14d,%edi
mov    $0x1,%esi
mov    $0x6,%edx
call   1130 <send_result@plt>
jmp    13e1 <sele+0x1d1>
lea    0xc26(%rip),%rdi
call   10f0 <perror@plt>
lea    0xc26(%rip),%rdi
lea    0xbfc(%rip),%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r14d,%edi
mov    $0x1,%esi
mov    $0x6,%edx
call   1130 <send_result@plt>
jmp    129e <sele+0x8e>

LLVM IR (-O0):
@.str = [10 x i8] c"127.0.0.1\00"
@.str.1 = [5 x i8] c"root\00"
@.str.2 = [4 x i8] c"123\00"
@.str.3 = [9 x i8] c"class306\00"
@.str.4 = [13 x i8] c"connect fail\00"
@.str.5 = [12 x i8] c"connect ok\0A\00"
@.str.6 = [23 x i8] c"select * from account;\00"
@.str.7 = [11 x i8] c"select ok\0A\00"
@.str.8 = [12 x i8] c"select fail\00"
@.str.9 = [10 x i8] c"sql = %s\0A\00"
@.str.10 = [8 x i8] c"%10.10s\00"
@.str.11 = [10 x i8] c"%s%10.10s\00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [5 x i8] c"%s%s\00"
define void @sele(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca [1000 x i8]
%11 = alloca i8**
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %2
%14 = call i32 @mysql_init(i32* %3)
%15 = call i32* @mysql_real_connect(i32* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 3306, i32* null, i32 0)
store i32* %15, i32** %4
%16 = load i32*, i32** %4
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %22
18: ; preds = %1
%19 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%20 = load i32, i32* %2
%21 = call i32 @send_result(i32 %20, i32 1, i32 6)
br label %100
22: ; preds = %1
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
br label %24
24: ; preds = %22
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i8** %5
%25 = load i32*, i32** %4
%26 = load i8*, i8** %5
%27 = call i32 @mysql_query(i32* %25, i8* %26)
store i32 %27, i32* %6
%28 = load i32, i32* %6
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %24
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
br label %38
32: ; preds = %24
%33 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%34 = load i8*, i8** %5
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* %34)
%36 = load i32, i32* %2
%37 = call i32 @send_result(i32 %36, i32 1, i32 6)
br label %38
38: ; preds = %32, %30
%39 = call i32* @mysql_store_result(i32* %3)
store i32* %39, i32** %7
%40 = load i32*, i32** %7
%41 = call i32 @mysql_num_rows(i32* %40)
store i32 %41, i32* %8
%42 = load i32, i32* %8
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %51
44: ; preds = %38
%45 = load i32, i32* %2
%46 = call i32 @send_result(i32 %45, i32 1, i32 6)
%47 = load i32*, i32** %7
%48 = call i32 @mysql_free_result(i32* %47)
%49 = load i32*, i32** %4
%50 = call i32 @mysql_close(i32* %49)
br label %100
51: ; preds = %38
%52 = load i32*, i32** %7
%53 = call i32 @mysql_num_fields(i32* %52)
store i32 %53, i32* %9
%54 = bitcast [1000 x i8]* %10 to i8*
store i32 0, i32* %12
br label %55
55: ; preds = %89, %51
%56 = load i32, i32* %12
%57 = load i32, i32* %8
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %92
59: ; preds = %55
%60 = load i32*, i32** %7
%61 = call i8** @mysql_fetch_row(i32* %60)
store i8** %61, i8*** %11
store i32 0, i32* %13
br label %62
62: ; preds = %81, %59
%63 = load i32, i32* %13
%64 = load i32, i32* %9
%65 = icmp slt i32 %63, %64
br i1 %65, label %66, label %84
66: ; preds = %62
%67 = load i8**, i8*** %11
%68 = load i32, i32* %13
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8*, i8** %67, i64 %69
%71 = load i8*, i8** %70
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* %71)
%73 = getelementptr inbounds [1000 x i8], [1000 x i8]* %10, i64 0, i64 0
%74 = getelementptr inbounds [1000 x i8], [1000 x i8]* %10, i64 0, i64 0
%75 = load i8**, i8*** %11
%76 = load i32, i32* %13
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i8*, i8** %75, i64 %77
%79 = load i8*, i8** %78
%80 = call i32 @sprintf(i8* %73, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %74, i8* %79)
br label %81
81: ; preds = %66
%82 = load i32, i32* %13
%83 = add nsw i32 %82, 1
store i32 %83, i32* %13
br label %62
84: ; preds = %62
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%86 = getelementptr inbounds [1000 x i8], [1000 x i8]* %10, i64 0, i64 0
%87 = getelementptr inbounds [1000 x i8], [1000 x i8]* %10, i64 0, i64 0
%88 = call i32 @sprintf(i8* %86, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* %87, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %89
89: ; preds = %84
%90 = load i32, i32* %12
%91 = add nsw i32 %90, 1
store i32 %91, i32* %12
br label %55
92: ; preds = %55
%93 = load i32, i32* %2
%94 = getelementptr inbounds [1000 x i8], [1000 x i8]* %10, i64 0, i64 0
%95 = call i32 @send_result1(i32 %93, i32 0, i32 6, i8* %94)
%96 = load i32*, i32** %7
%97 = call i32 @mysql_free_result(i32* %96)
%98 = load i32*, i32** %4
%99 = call i32 @mysql_close(i32* %98)
br label %100
100: ; preds = %92, %44, %18
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"127.0.0.1\00"
@.str.1 = [5 x i8] c"root\00"
@.str.2 = [4 x i8] c"123\00"
@.str.3 = [9 x i8] c"class306\00"
@.str.4 = [13 x i8] c"connect fail\00"
@.str.6 = [23 x i8] c"select * from account;\00"
@.str.8 = [12 x i8] c"select fail\00"
@.str.9 = [10 x i8] c"sql = %s\0A\00"
@.str.10 = [8 x i8] c"%10.10s\00"
@.str.11 = [10 x i8] c"%s%10.10s\00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [5 x i8] c"%s%s\00"
@str = [11 x i8] c"connect ok\00"
@str.14 = [10 x i8] c"select ok\00"
define void @sele(i32 %0) {
%2 = alloca i32
%3 = alloca [1000 x i8]
%4 = bitcast i32* %2 to i8*
%5 = call i32 @mysql_init(i32* %2)
%6 = call i32* @mysql_real_connect(i32* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 3306, i32* null, i32 0)
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @send_result(i32 %0, i32 1, i32 6)
br label %57
11: ; preds = %1
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%13 = call i32 @mysql_query(i32* %6, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.14, i64 0, i64 0))
br label %21
17: ; preds = %11
%18 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%20 = call i32 @send_result(i32 %0, i32 1, i32 6)
br label %21
21: ; preds = %17, %15
%22 = call i32* @mysql_store_result(i32* %2)
%23 = call i32 @mysql_num_rows(i32* %22)
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = call i32 @send_result(i32 %0, i32 1, i32 6)
%27 = call i32 @mysql_free_result(i32* %22)
%28 = call i32 @mysql_close(i32* %6)
br label %57
29: ; preds = %21
%30 = call i32 @mysql_num_fields(i32* %22)
%31 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%32 = icmp sgt i32 %23, 0
br i1 %32, label %33, label %53
33: ; preds = %29
%34 = icmp sgt i32 %30, 0
%35 = zext i32 %30 to i64
br label %36
36: ; preds = %33, %48
%37 = phi i32 [ 0, %33 ], [ %51, %48 ]
%38 = call i8** @mysql_fetch_row(i32* %22)
br i1 %34, label %39, label %48
39: ; preds = %36, %39
%40 = phi i64 [ %46, %39 ], [ 0, %36 ]
%41 = getelementptr inbounds i8*, i8** %38, i64 %40
%42 = load i8*, i8** %41
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* %42)
%44 = load i8*, i8** %41
%45 = call i32 @sprintf(i8* %31, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %31, i8* %44)
%46 = add nuw nsw i64 %40, 1
%47 = icmp eq i64 %46, %35
br i1 %47, label %48, label %39
48: ; preds = %39, %36
%49 = call i32 @putchar(i32 10)
%50 = call i32 @sprintf(i8* %31, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%51 = add nuw nsw i32 %37, 1
%52 = icmp eq i32 %51, %23
br i1 %52, label %53, label %36
53: ; preds = %48, %29
%54 = call i32 @send_result1(i32 %0, i32 0, i32 6, i8* %31)
%55 = call i32 @mysql_free_result(i32* %22)
%56 = call i32 @mysql_close(i32* %6)
br label %57
57: ; preds = %25, %53, %8
ret void
}