#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ get_data_for_query(int /*<<< orphan*/ *, char *, char *, int,
                                      char *, char *, int);
int /*<<< orphan*/ printf(char *, ...);
void make_html_table(char *html_file_name, char *database_name, char *sql,
                     char *field_names[], int fields, int precision,
                     int font_size, char *bg_color1, char *bg_color2,
                     int alternate, char *field_bg_color, bool fields_found) {
  int i = 0;
  FILE *f = fopen(html_file_name, "w");
  if (f == NULL) {
    printf("Error opening file!\n");
  }
  fprintf(f, "<!DOCTYPE html>\n");
  fprintf(f, "<html lang=\"en\">\n");
  fprintf(f, "<head>\n");
  fprintf(f, "<meta charset=\"UTF-8\"/>\n");
  fprintf(f, "<title>Table Test</title>\n");
  fprintf(f, "</head>\n");
  fprintf(f, "<body style=\"font-size:%ipx\">\n", font_size);
  fprintf(f, "<h1 align=\"center\">Database Query</h1>\n");
  fprintf(f, "<h4 align=\"center\">%s</h4>\n", sql);
  fprintf(f, "<table align=\"center\" style=\"border-collapse:collapse;\">\n");
  fprintf(f, "<thead><tr>\n");
  for (i = 0; i < fields; i++) {
    fprintf(f,
            "<th scope=\"col\" bgcolor=\"%s\" style=\"border:1px solid "
            "#000000\">&nbsp%s&nbsp</th>\n",
            field_bg_color, field_names[i]);
  }
  fprintf(f, "</tr></thead><tbody>\n");
  get_data_for_query(f, database_name, sql, precision, bg_color1, bg_color2,
                     alternate);
  fprintf(f, "</tbody></table>");
  fprintf(f, "</body>\n");
  fprintf(f, "</html>\n");
  fclose(f);
  printf("%s file created.\n", html_file_name);
}


x86 assembly (clang, -O0):
<make_html_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe69(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    11b9 <make_html_table+0x69>
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe53(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe52(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe52(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe48(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe4f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe58(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    0x10(%rbp),%edx
lea    0xe4c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe59(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe6b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe75(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe9d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    12c9 <make_html_table+0x179>
mov    -0x38(%rbp),%rdi
mov    0x30(%rbp),%rdx
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xe75(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    128d <make_html_table+0x13d>
mov    -0x38(%rbp),%rdi
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%ecx
mov    0x18(%rbp),%r8
mov    0x20(%rbp),%r9
mov    0x28(%rbp),%eax
mov    %eax,(%rsp)
call   1070 <get_data_for_query@plt>
mov    -0x38(%rbp),%rdi
lea    0xe88(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe87(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe7e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x8(%rbp),%rsi
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_html_table>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9d,0xc(%rsp)
mov    %r8d,%ebx
mov    %rcx,%r12
mov    %rdx,%rbp
mov    %rsi,0x20(%rsp)
mov    0x90(%rsp),%r13
mov    0x88(%rsp),%eax
mov    %eax,0x8(%rsp)
mov    0x80(%rsp),%rax
mov    %rax,0x18(%rsp)
mov    0x78(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x70(%rsp),%r14d
lea    0xe39(%rip),%rsi
mov    %rdi,0x30(%rsp)
call   1070 <fopen@plt>
mov    %rax,%r15
test   %rax,%rax
jne    11e5 <make_html_table+0x75>
lea    0xfd0(%rip),%rdi
call   1030 <puts@plt>
lea    0xe16(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
lea    0xe0e(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
lea    0xe07(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
lea    0xdf6(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
lea    0xdf6(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
lea    0xdf8(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
lea    0xde8(%rip),%rsi
mov    %r15,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xdf3(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
lea    0xe02(%rip),%rsi
mov    %r15,%rdi
mov    %rbp,0x28(%rsp)
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xe05(%rip),%rdi
mov    $0x39,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
lea    0xe26(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
test   %ebx,%ebx
jle    132d <make_html_table+0x1bd>
mov    %ebx,%ebx
lea    0xe14(%rip),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r12,%rbp,8),%rcx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1310 <make_html_table+0x1a0>
lea    0xe31(%rip),%rdi
mov    $0x15,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
mov    0x8(%rsp),%eax
mov    %eax,(%rsp)
mov    %r15,%rdi
mov    0x20(%rsp),%rsi
mov    0x28(%rsp),%rdx
mov    0xc(%rsp),%ecx
mov    0x10(%rsp),%r8
mov    0x18(%rsp),%r9
call   1080 <get_data_for_query@plt>
lea    0xe07(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
lea    0xdff(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
lea    0xdef(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1090 <fwrite@plt>
mov    %r15,%rdi
call   1040 <fclose@plt>
lea    0xdd7(%rip),%rdi
mov    0x30(%rsp),%rsi
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [21 x i8] c"Error opening file!\0A\00"
@.str.2 = [17 x i8] c"<!DOCTYPE html>\0A\00"
@.str.3 = [18 x i8] c"<html lang=\22en\22>\0A\00"
@.str.4 = [8 x i8] c"<head>\0A\00"
@.str.5 = [25 x i8] c"<meta charset=\22UTF-8\22/>\0A\00"
@.str.6 = [27 x i8] c"<title>Table Test</title>\0A\00"
@.str.7 = [9 x i8] c"</head>\0A\00"
@.str.8 = [31 x i8] c"<body style=\22font-size:%ipx\22>\0A\00"
@.str.9 = [40 x i8] c"<h1 align=\22center\22>Database Query</h1>\0A\00"
@.str.10 = [28 x i8] c"<h4 align=\22center\22>%s</h4>\0A\00"
@.str.11 = [58 x i8] c"<table align=\22center\22 style=\22border-collapse:collapse;\22>\0A\00"
@.str.12 = [13 x i8] c"<thead><tr>\0A\00"
@.str.13 = [81 x i8] c"<th scope=\22col\22 bgcolor=\22%s\22 style=\22border:1px solid\22>&nbsp%s&nbsp</th>\0A\00"
@.str.14 = [22 x i8] c"</tr></thead><tbody>\0A\00"
@.str.15 = [17 x i8] c"</tbody></table>\00"
@.str.16 = [9 x i8] c"</body>\0A\00"
@.str.17 = [9 x i8] c"</html>\0A\00"
@.str.18 = [18 x i8] c"%s file created.\0A\00"
define void @make_html_table(i8* %0, i8* %1, i8* %2, i8** %3, i32 %4, i32 %5, i32 %6, i8* %7, i8* %8, i32 %9, i8* %10, i32 %11) {
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8**
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i8*
%21 = alloca i8*
%22 = alloca i32
%23 = alloca i8*
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32*
store i8* %0, i8** %13
store i8* %1, i8** %14
store i8* %2, i8** %15
store i8** %3, i8*** %16
store i32 %4, i32* %17
store i32 %5, i32* %18
store i32 %6, i32* %19
store i8* %7, i8** %20
store i8* %8, i8** %21
store i32 %9, i32* %22
store i8* %10, i8** %23
store i32 %11, i32* %24
store i32 0, i32* %25
%27 = load i8*, i8** %13
%28 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %28, i32** %26
%29 = load i32*, i32** %26
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %33
31: ; preds = %12
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %33
33: ; preds = %31, %12
%34 = load i32*, i32** %26
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%36 = load i32*, i32** %26
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%38 = load i32*, i32** %26
%39 = call i32 (i32*, i8*, ...) @fprintf(i32* %38, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%40 = load i32*, i32** %26
%41 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0))
%42 = load i32*, i32** %26
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%44 = load i32*, i32** %26
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%46 = load i32*, i32** %26
%47 = load i32, i32* %19
%48 = call i32 (i32*, i8*, ...) @fprintf(i32* %46, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 %47)
%49 = load i32*, i32** %26
%50 = call i32 (i32*, i8*, ...) @fprintf(i32* %49, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0))
%51 = load i32*, i32** %26
%52 = load i8*, i8** %15
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %51, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i8* %52)
%54 = load i32*, i32** %26
%55 = call i32 (i32*, i8*, ...) @fprintf(i32* %54, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
%56 = load i32*, i32** %26
%57 = call i32 (i32*, i8*, ...) @fprintf(i32* %56, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0))
store i32 0, i32* %25
br label %58
58: ; preds = %71, %33
%59 = load i32, i32* %25
%60 = load i32, i32* %17
%61 = icmp slt i32 %59, %60
br i1 %61, label %62, label %74
62: ; preds = %58
%63 = load i32*, i32** %26
%64 = load i8*, i8** %23
%65 = load i8**, i8*** %16
%66 = load i32, i32* %25
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8*, i8** %65, i64 %67
%69 = load i8*, i8** %68
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %63, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.13, i64 0, i64 0), i8* %64, i8* %69)
br label %71
71: ; preds = %62
%72 = load i32, i32* %25
%73 = add nsw i32 %72, 1
store i32 %73, i32* %25
br label %58
74: ; preds = %58
%75 = load i32*, i32** %26
%76 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0))
%77 = load i32*, i32** %26
%78 = load i8*, i8** %14
%79 = load i8*, i8** %15
%80 = load i32, i32* %18
%81 = load i8*, i8** %20
%82 = load i8*, i8** %21
%83 = load i32, i32* %22
%84 = call i32 @get_data_for_query(i32* %77, i8* %78, i8* %79, i32 %80, i8* %81, i8* %82, i32 %83)
%85 = load i32*, i32** %26
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %85, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0))
%87 = load i32*, i32** %26
%88 = call i32 (i32*, i8*, ...) @fprintf(i32* %87, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
%89 = load i32*, i32** %26
%90 = call i32 (i32*, i8*, ...) @fprintf(i32* %89, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%91 = load i32*, i32** %26
%92 = call i32 @fclose(i32* %91)
%93 = load i8*, i8** %13
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0), i8* %93)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.2 = [17 x i8] c"<!DOCTYPE html>\0A\00"
@.str.3 = [18 x i8] c"<html lang=\22en\22>\0A\00"
@.str.4 = [8 x i8] c"<head>\0A\00"
@.str.5 = [25 x i8] c"<meta charset=\22UTF-8\22/>\0A\00"
@.str.6 = [27 x i8] c"<title>Table Test</title>\0A\00"
@.str.7 = [9 x i8] c"</head>\0A\00"
@.str.8 = [31 x i8] c"<body style=\22font-size:%ipx\22>\0A\00"
@.str.9 = [40 x i8] c"<h1 align=\22center\22>Database Query</h1>\0A\00"
@.str.10 = [28 x i8] c"<h4 align=\22center\22>%s</h4>\0A\00"
@.str.11 = [58 x i8] c"<table align=\22center\22 style=\22border-collapse:collapse;\22>\0A\00"
@.str.12 = [13 x i8] c"<thead><tr>\0A\00"
@.str.13 = [81 x i8] c"<th scope=\22col\22 bgcolor=\22%s\22 style=\22border:1px solid\22>&nbsp%s&nbsp</th>\0A\00"
@.str.14 = [22 x i8] c"</tr></thead><tbody>\0A\00"
@.str.15 = [17 x i8] c"</tbody></table>\00"
@.str.16 = [9 x i8] c"</body>\0A\00"
@.str.17 = [9 x i8] c"</html>\0A\00"
@.str.18 = [18 x i8] c"%s file created.\0A\00"
@str = [20 x i8] c"Error opening file!\00"
define void @make_html_table(i8* %0, i8* %1, i8* %2, i8** nocapture %3, i32 %4, i32 %5, i32 %6, i8* %7, i8* %8, i32 %9, i8* %10, i32 %11) {
%13 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
br label %17
17: ; preds = %15, %12
%18 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i64 16, i64 1, i32* %13)
%19 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i64 17, i64 1, i32* %13)
%20 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i64 7, i64 1, i32* %13)
%21 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i64 24, i64 1, i32* %13)
%22 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i64 26, i64 1, i32* %13)
%23 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i64 8, i64 1, i32* %13)
%24 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), i32 %6)
%25 = tail call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i64 39, i64 1, i32* %13)
%26 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i8* %2)
%27 = tail call i64 @fwrite(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0), i64 57, i64 1, i32* %13)
%28 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0), i64 12, i64 1, i32* %13)
%29 = icmp sgt i32 %4, 0
br i1 %29, label %30, label %39
30: ; preds = %17
%31 = zext i32 %4 to i64
br label %32
32: ; preds = %30, %32
%33 = phi i64 [ 0, %30 ], [ %37, %32 ]
%34 = getelementptr inbounds i8*, i8** %3, i64 %33
%35 = load i8*, i8** %34
%36 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.13, i64 0, i64 0), i8* %10, i8* %35)
%37 = add nuw nsw i64 %33, 1
%38 = icmp eq i64 %37, %31
br i1 %38, label %39, label %32
39: ; preds = %32, %17
%40 = tail call i64 @fwrite(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), i64 21, i64 1, i32* %13)
%41 = tail call i32 @get_data_for_query(i32* %13, i8* %1, i8* %2, i32 %5, i8* %7, i8* %8, i32 %9)
%42 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i64 16, i64 1, i32* %13)
%43 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i64 8, i64 1, i32* %13)
%44 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i64 8, i64 1, i32* %13)
%45 = tail call i32 @fclose(i32* %13)
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0), i8* %0)
ret void
}