#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*/ capitalize_name(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ uncapitalize_name(char *);
void mount_method_insert(FILE *file_out, char name_array[][500],
                         char type_array[][500], int real_dimension,
                         char primary_key[500]) {
  char capital_entity_name[500];
  strcpy(capital_entity_name, name_array[0]);
  capitalize_name(capital_entity_name);
  char lowercase_entity_name[500];
  strcpy(lowercase_entity_name, name_array[0]);
  uncapitalize_name(lowercase_entity_name);
  char capital_primary_key[500];
  strcpy(capital_primary_key, primary_key);
  capitalize_name(capital_primary_key);
  fprintf(file_out, "	public void insert(%s %s) throws SQLException {\n",
          capital_entity_name, lowercase_entity_name);
  fprintf(file_out, "\t\t\tString sql = 'INSERT INTO %s (", name_array[0]);
  int i = 0;
  for (i = 1; i < real_dimension; ++i) {
    if (i != (real_dimension - 1)) {
      fprintf(file_out, "%s, ", name_array[i]);
    } else {
      fprintf(file_out, "%s)", name_array[i]);
    }
  }
  fprintf(file_out, " VALUE (");
  int j = 0;
  for (j = 1; j < real_dimension; ++j) {
    if (j != (real_dimension - 1)) {
      fprintf(file_out, "?, ", name_array[j]);
    } else {
      fprintf(file_out, "?)';\n", name_array[j]);
    }
  }
  fprintf(file_out,
          "\t\t\tPreparedStatement statement = conn.preparedStatement(sql);\n");
  int l = 1;
  for (l = 1; l < real_dimension; l++) {
    char capital_column_name[500];
    strcpy(capital_column_name, name_array[l]);
    capitalize_name(capital_column_name);
    if (strcmp(type_array[l], "INT") == 0) {
      fprintf(file_out, "\t\t\tstatement.setInt(%d, %s.get%s());\n", l,
              lowercase_entity_name, capital_column_name);
    } else if (strcmp(type_array[j], "FLOAT") == 0) {
      fprintf(file_out, "\t\t\tstatement.setFloat(%d, %s.get%s());\n", l,
              lowercase_entity_name, capital_column_name);
    } else {
      fprintf(file_out, "\t\t\tstatement.setString(%d, %s.get%s());\n", l,
              lowercase_entity_name, capital_column_name);
    }
  }
  fprintf(file_out, "\t\t\tint rowsInserted = statement.executeUpdate();\n");
  fprintf(file_out, "\t\t\tif (rowsInserted > 0) {\n");
  fprintf(
      file_out,
      "\t\t\t\tSystem.out.println('A new %s was inserted successfully!');\n",
      lowercase_entity_name);
  fprintf(file_out, "\t\t\t}\n");
  fprintf(file_out, "\t\t}");
}


x86 assembly (clang, -O0):
<mount_method_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x820,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
lea    -0x220(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x220(%rbp),%rdi
call   1060 <capitalize_name@plt>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x420(%rbp),%rdi
call   1070 <uncapitalize_name@plt>
lea    -0x620(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x620(%rbp),%rdi
call   1060 <capitalize_name@plt>
mov    -0x8(%rbp),%rdi
lea    -0x220(%rbp),%rdx
lea    -0x420(%rbp),%rcx
lea    0xe25(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe41(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x624(%rbp)
movl   $0x1,-0x624(%rbp)
mov    -0x624(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    129b <mount_method_insert+0x14b>
mov    -0x624(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     125b <mount_method_insert+0x10b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
movslq -0x624(%rbp),%rax
imul   $0x1f4,%rax,%rax
add    %rax,%rdx
lea    0xe05(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1282 <mount_method_insert+0x132>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
movslq -0x624(%rbp),%rax
imul   $0x1f4,%rax,%rax
add    %rax,%rdx
lea    0xdde(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1287 <mount_method_insert+0x137>
mov    -0x624(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x624(%rbp)
jmp    120c <mount_method_insert+0xbc>
mov    -0x8(%rbp),%rdi
lea    0xdb7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x628(%rbp)
movl   $0x1,-0x628(%rbp)
mov    -0x628(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1350 <mount_method_insert+0x200>
mov    -0x628(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     1310 <mount_method_insert+0x1c0>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
movslq -0x628(%rbp),%rax
imul   $0x1f4,%rax,%rax
add    %rax,%rdx
lea    0xd62(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1337 <mount_method_insert+0x1e7>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
movslq -0x628(%rbp),%rax
imul   $0x1f4,%rax,%rax
add    %rax,%rdx
lea    0xd3a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    133c <mount_method_insert+0x1ec>
mov    -0x628(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x628(%rbp)
jmp    12c1 <mount_method_insert+0x171>
mov    -0x8(%rbp),%rdi
lea    0xd15(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x62c(%rbp)
movl   $0x1,-0x62c(%rbp)
mov    -0x62c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    14a2 <mount_method_insert+0x352>
lea    -0x820(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x62c(%rbp),%rax
imul   $0x1f4,%rax,%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
lea    -0x820(%rbp),%rdi
call   1060 <capitalize_name@plt>
mov    -0x18(%rbp),%rdi
movslq -0x62c(%rbp),%rax
imul   $0x1f4,%rax,%rax
add    %rax,%rdi
lea    0xce1(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1408 <mount_method_insert+0x2b8>
mov    -0x8(%rbp),%rdi
mov    -0x62c(%rbp),%edx
lea    -0x420(%rbp),%rcx
lea    -0x820(%rbp),%r8
lea    0xcb7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1489 <mount_method_insert+0x339>
mov    -0x18(%rbp),%rdi
movslq -0x628(%rbp),%rax
imul   $0x1f4,%rax,%rax
add    %rax,%rdi
lea    0xcb5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    145e <mount_method_insert+0x30e>
mov    -0x8(%rbp),%rdi
mov    -0x62c(%rbp),%edx
lea    -0x420(%rbp),%rcx
lea    -0x820(%rbp),%r8
lea    0xc8d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1484 <mount_method_insert+0x334>
mov    -0x8(%rbp),%rdi
mov    -0x62c(%rbp),%edx
lea    -0x420(%rbp),%rcx
lea    -0x820(%rbp),%r8
lea    0xc8a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1489 <mount_method_insert+0x339>
jmp    148e <mount_method_insert+0x33e>
mov    -0x62c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x62c(%rbp)
jmp    1376 <mount_method_insert+0x226>
mov    -0x8(%rbp),%rdi
lea    0xc83(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xca3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x420(%rbp),%rdx
lea    0xca6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xcd4(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xcc8(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
add    $0x820,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mount_method_insert>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x818,%rsp
mov    %r8,%rbp
mov    %ecx,%r14d
mov    %rdx,0x18(%rsp)
mov    %rsi,%r13
mov    %rdi,%r15
lea    0x220(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1060 <capitalize_name@plt>
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1070 <uncapitalize_name@plt>
lea    0x620(%rsp),%r12
mov    %r12,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %r12,%rdi
call   1060 <capitalize_name@plt>
lea    0xe2c(%rip),%rsi
mov    %r15,%rdi
lea    0x220(%rsp),%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe42(%rip),%rsi
mov    %r15,%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
cmp    $0x1,%r14d
jle    1275 <mount_method_insert+0x115>
lea    -0x1(%r14),%ecx
mov    %r14,(%rsp)
mov    %r14d,%eax
mov    %rcx,0x10(%rsp)
imul   $0x1f4,%rcx,%r12
lea    (%r12,%r13,1),%rbx
mov    %rax,0x8(%rsp)
imul   $0x1f4,%rax,%rbp
mov    $0x1f4,%r14d
jmp    1260 <mount_method_insert+0x100>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
lea    0xe0f(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
add    $0x1f4,%r14
cmp    %r14,%rbp
je     1290 <mount_method_insert+0x130>
cmp    %r14,%r12
je     1240 <mount_method_insert+0xe0>
lea    (%r14,%r13,1),%rdx
mov    %r15,%rdi
lea    0xde1(%rip),%rsi
jmp    124d <mount_method_insert+0xed>
lea    0xde1(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
jmp    1309 <mount_method_insert+0x1a9>
lea    0xdc6(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
cmpl   $0x2,(%rsp)
jl     1309 <mount_method_insert+0x1a9>
imul   $0x1f4,0x10(%rsp),%r12
lea    (%r12,%r13,1),%r14
mov    $0x1f4,%ebx
jmp    12f4 <mount_method_insert+0x194>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
lea    0xd90(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
add    $0x1f4,%rbx
cmp    %rbx,%rbp
je     13ae <mount_method_insert+0x24e>
cmp    %rbx,%r12
je     12d0 <mount_method_insert+0x170>
lea    (%rbx,%r13,1),%rdx
mov    %r15,%rdi
lea    0xd5f(%rip),%rsi
jmp    12dd <mount_method_insert+0x17d>
lea    0xd60(%rip),%rdi
mov    $0x3e,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xe07(%rip),%rdi
mov    $0x31,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xe20(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xe23(%rip),%rsi
lea    0x20(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe4d(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
lea    0xe3a(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
add    $0x818,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcbb(%rip),%rdi
mov    $0x1,%ebx
mov    $0x3e,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
cmpl   $0x2,(%rsp)
mov    0x18(%rsp),%rbp
jl     1322 <mount_method_insert+0x1c2>
imul   $0x1f4,0x8(%rsp),%r12
add    %rbp,%r12
add    $0x1f4,%r13
add    $0x1f4,%rbp
lea    0x420(%rsp),%r14
jmp    1438 <mount_method_insert+0x2d8>
nop
mov    %r15,%rdi
lea    0xca9(%rip),%rsi
mov    %ebx,%edx
lea    0x20(%rsp),%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <fprintf@plt>
add    $0x1,%rbx
add    $0x1f4,%r13
add    $0x1f4,%rbp
cmp    %rbx,0x8(%rsp)
je     1322 <mount_method_insert+0x1c2>
mov    %r14,%rdi
mov    %r13,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
call   1060 <capitalize_name@plt>
mov    %rbp,%rdi
lea    0xc5a(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1400 <mount_method_insert+0x2a0>
mov    %r12,%rdi
lea    0xc70(%rip),%rsi
call   1040 <strcmp@plt>
mov    %r15,%rdi
test   %rax,%rax
je     1480 <mount_method_insert+0x320>
lea    0xc8a(%rip),%rsi
jmp    140a <mount_method_insert+0x2aa>
nop
lea    0xc58(%rip),%rsi
jmp    140a <mount_method_insert+0x2aa>

LLVM IR (-O0):
@.str = [50 x i8] c"\09public void insert(%s %s) throws SQLException {\0A\00"
@.str.1 = [34 x i8] c"\09\09\09String sql = 'INSERT INTO %s (\00"
@.str.2 = [5 x i8] c"%s, \00"
@.str.3 = [4 x i8] c"%s)\00"
@.str.4 = [9 x i8] c" VALUE (\00"
@.str.5 = [4 x i8] c"?, \00"
@.str.6 = [6 x i8] c"?)';\0A\00"
@.str.7 = [63 x i8] c"\09\09\09PreparedStatement statement = conn.preparedStatement(sql);\0A\00"
@.str.8 = [4 x i8] c"INT\00"
@.str.9 = [38 x i8] c"\09\09\09statement.setInt(%d, %s.get%s());\0A\00"
@.str.10 = [6 x i8] c"FLOAT\00"
@.str.11 = [40 x i8] c"\09\09\09statement.setFloat(%d, %s.get%s());\0A\00"
@.str.12 = [41 x i8] c"\09\09\09statement.setString(%d, %s.get%s());\0A\00"
@.str.13 = [50 x i8] c"\09\09\09int rowsInserted = statement.executeUpdate();\0A\00"
@.str.14 = [28 x i8] c"\09\09\09if (rowsInserted > 0) {\0A\00"
@.str.15 = [64 x i8] c"\09\09\09\09System.out.println('A new %s was inserted successfully!');\0A\00"
@.str.16 = [6 x i8] c"\09\09\09}\0A\00"
@.str.17 = [4 x i8] c"\09\09}\00"
define void @mount_method_insert(i32* %0, [500 x i8]* %1, [500 x i8]* %2, i32 %3, i8* %4) {
%6 = alloca i32*
%7 = alloca [500 x i8]*
%8 = alloca [500 x i8]*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca [500 x i8]
%12 = alloca [500 x i8]
%13 = alloca [500 x i8]
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [500 x i8]
store i32* %0, i32** %6
store [500 x i8]* %1, [500 x i8]** %7
store [500 x i8]* %2, [500 x i8]** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%18 = getelementptr inbounds [500 x i8], [500 x i8]* %11, i64 0, i64 0
%19 = load [500 x i8]*, [500 x i8]** %7
%20 = getelementptr inbounds [500 x i8], [500 x i8]* %19, i64 0
%21 = getelementptr inbounds [500 x i8], [500 x i8]* %20, i64 0, i64 0
%22 = call i32 @strcpy(i8* %18, i8* %21)
%23 = getelementptr inbounds [500 x i8], [500 x i8]* %11, i64 0, i64 0
%24 = call i32 @capitalize_name(i8* %23)
%25 = getelementptr inbounds [500 x i8], [500 x i8]* %12, i64 0, i64 0
%26 = load [500 x i8]*, [500 x i8]** %7
%27 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0
%28 = getelementptr inbounds [500 x i8], [500 x i8]* %27, i64 0, i64 0
%29 = call i32 @strcpy(i8* %25, i8* %28)
%30 = getelementptr inbounds [500 x i8], [500 x i8]* %12, i64 0, i64 0
%31 = call i32 @uncapitalize_name(i8* %30)
%32 = getelementptr inbounds [500 x i8], [500 x i8]* %13, i64 0, i64 0
%33 = load i8*, i8** %10
%34 = call i32 @strcpy(i8* %32, i8* %33)
%35 = getelementptr inbounds [500 x i8], [500 x i8]* %13, i64 0, i64 0
%36 = call i32 @capitalize_name(i8* %35)
%37 = load i32*, i32** %6
%38 = getelementptr inbounds [500 x i8], [500 x i8]* %11, i64 0, i64 0
%39 = getelementptr inbounds [500 x i8], [500 x i8]* %12, i64 0, i64 0
%40 = call i32 (i32*, i8*, ...) @fprintf(i32* %37, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %38, i8* %39)
%41 = load i32*, i32** %6
%42 = load [500 x i8]*, [500 x i8]** %7
%43 = getelementptr inbounds [500 x i8], [500 x i8]* %42, i64 0
%44 = getelementptr inbounds [500 x i8], [500 x i8]* %43, i64 0, i64 0
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %41, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %44)
store i32 0, i32* %14
store i32 1, i32* %14
br label %46
46: ; preds = %72, %5
%47 = load i32, i32* %14
%48 = load i32, i32* %9
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %75
50: ; preds = %46
%51 = load i32, i32* %14
%52 = load i32, i32* %9
%53 = sub nsw i32 %52, 1
%54 = icmp ne i32 %51, %53
br i1 %54, label %55, label %63
55: ; preds = %50
%56 = load i32*, i32** %6
%57 = load [500 x i8]*, [500 x i8]** %7
%58 = load i32, i32* %14
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [500 x i8], [500 x i8]* %57, i64 %59
%61 = getelementptr inbounds [500 x i8], [500 x i8]* %60, i64 0, i64 0
%62 = call i32 (i32*, i8*, ...) @fprintf(i32* %56, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %61)
br label %71
63: ; preds = %50
%64 = load i32*, i32** %6
%65 = load [500 x i8]*, [500 x i8]** %7
%66 = load i32, i32* %14
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [500 x i8], [500 x i8]* %65, i64 %67
%69 = getelementptr inbounds [500 x i8], [500 x i8]* %68, i64 0, i64 0
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %69)
br label %71
71: ; preds = %63, %55
br label %72
72: ; preds = %71
%73 = load i32, i32* %14
%74 = add nsw i32 %73, 1
store i32 %74, i32* %14
br label %46
75: ; preds = %46
%76 = load i32*, i32** %6
%77 = call i32 (i32*, i8*, ...) @fprintf(i32* %76, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %15
store i32 1, i32* %15
br label %78
78: ; preds = %104, %75
%79 = load i32, i32* %15
%80 = load i32, i32* %9
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %107
82: ; preds = %78
%83 = load i32, i32* %15
%84 = load i32, i32* %9
%85 = sub nsw i32 %84, 1
%86 = icmp ne i32 %83, %85
br i1 %86, label %87, label %95
87: ; preds = %82
%88 = load i32*, i32** %6
%89 = load [500 x i8]*, [500 x i8]** %7
%90 = load i32, i32* %15
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [500 x i8], [500 x i8]* %89, i64 %91
%93 = getelementptr inbounds [500 x i8], [500 x i8]* %92, i64 0, i64 0
%94 = call i32 (i32*, i8*, ...) @fprintf(i32* %88, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %93)
br label %103
95: ; preds = %82
%96 = load i32*, i32** %6
%97 = load [500 x i8]*, [500 x i8]** %7
%98 = load i32, i32* %15
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [500 x i8], [500 x i8]* %97, i64 %99
%101 = getelementptr inbounds [500 x i8], [500 x i8]* %100, i64 0, i64 0
%102 = call i32 (i32*, i8*, ...) @fprintf(i32* %96, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %101)
br label %103
103: ; preds = %95, %87
br label %104
104: ; preds = %103
%105 = load i32, i32* %15
%106 = add nsw i32 %105, 1
store i32 %106, i32* %15
br label %78
107: ; preds = %78
%108 = load i32*, i32** %6
%109 = call i32 (i32*, i8*, ...) @fprintf(i32* %108, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.7, i64 0, i64 0))
store i32 1, i32* %16
store i32 1, i32* %16
br label %110
110: ; preds = %159, %107
%111 = load i32, i32* %16
%112 = load i32, i32* %9
%113 = icmp slt i32 %111, %112
br i1 %113, label %114, label %162
114: ; preds = %110
%115 = getelementptr inbounds [500 x i8], [500 x i8]* %17, i64 0, i64 0
%116 = load [500 x i8]*, [500 x i8]** %7
%117 = load i32, i32* %16
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [500 x i8], [500 x i8]* %116, i64 %118
%120 = getelementptr inbounds [500 x i8], [500 x i8]* %119, i64 0, i64 0
%121 = call i32 @strcpy(i8* %115, i8* %120)
%122 = getelementptr inbounds [500 x i8], [500 x i8]* %17, i64 0, i64 0
%123 = call i32 @capitalize_name(i8* %122)
%124 = load [500 x i8]*, [500 x i8]** %8
%125 = load i32, i32* %16
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [500 x i8], [500 x i8]* %124, i64 %126
%128 = getelementptr inbounds [500 x i8], [500 x i8]* %127, i64 0, i64 0
%129 = call i64 @strcmp(i8* %128, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%130 = icmp eq i64 %129, 0
br i1 %130, label %131, label %137
131: ; preds = %114
%132 = load i32*, i32** %6
%133 = load i32, i32* %16
%134 = getelementptr inbounds [500 x i8], [500 x i8]* %12, i64 0, i64 0
%135 = getelementptr inbounds [500 x i8], [500 x i8]* %17, i64 0, i64 0
%136 = call i32 (i32*, i8*, ...) @fprintf(i32* %132, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0), i32 %133, i8* %134, i8* %135)
br label %158
137: ; preds = %114
%138 = load [500 x i8]*, [500 x i8]** %8
%139 = load i32, i32* %15
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [500 x i8], [500 x i8]* %138, i64 %140
%142 = getelementptr inbounds [500 x i8], [500 x i8]* %141, i64 0, i64 0
%143 = call i64 @strcmp(i8* %142, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%144 = icmp eq i64 %143, 0
br i1 %144, label %145, label %151
145: ; preds = %137
%146 = load i32*, i32** %6
%147 = load i32, i32* %16
%148 = getelementptr inbounds [500 x i8], [500 x i8]* %12, i64 0, i64 0
%149 = getelementptr inbounds [500 x i8], [500 x i8]* %17, i64 0, i64 0
%150 = call i32 (i32*, i8*, ...) @fprintf(i32* %146, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.11, i64 0, i64 0), i32 %147, i8* %148, i8* %149)
br label %157
151: ; preds = %137
%152 = load i32*, i32** %6
%153 = load i32, i32* %16
%154 = getelementptr inbounds [500 x i8], [500 x i8]* %12, i64 0, i64 0
%155 = getelementptr inbounds [500 x i8], [500 x i8]* %17, i64 0, i64 0
%156 = call i32 (i32*, i8*, ...) @fprintf(i32* %152, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i32 %153, i8* %154, i8* %155)
br label %157
157: ; preds = %151, %145
br label %158
158: ; preds = %157, %131
br label %159
159: ; preds = %158
%160 = load i32, i32* %16
%161 = add nsw i32 %160, 1
store i32 %161, i32* %16
br label %110
162: ; preds = %110
%163 = load i32*, i32** %6
%164 = call i32 (i32*, i8*, ...) @fprintf(i32* %163, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.13, i64 0, i64 0))
%165 = load i32*, i32** %6
%166 = call i32 (i32*, i8*, ...) @fprintf(i32* %165, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
%167 = load i32*, i32** %6
%168 = getelementptr inbounds [500 x i8], [500 x i8]* %12, i64 0, i64 0
%169 = call i32 (i32*, i8*, ...) @fprintf(i32* %167, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.15, i64 0, i64 0), i8* %168)
%170 = load i32*, i32** %6
%171 = call i32 (i32*, i8*, ...) @fprintf(i32* %170, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0))
%172 = load i32*, i32** %6
%173 = call i32 (i32*, i8*, ...) @fprintf(i32* %172, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"\09public void insert(%s %s) throws SQLException {\0A\00"
@.str.1 = [34 x i8] c"\09\09\09String sql = 'INSERT INTO %s (\00"
@.str.2 = [5 x i8] c"%s, \00"
@.str.3 = [4 x i8] c"%s)\00"
@.str.4 = [9 x i8] c" VALUE (\00"
@.str.5 = [4 x i8] c"?, \00"
@.str.6 = [6 x i8] c"?)';\0A\00"
@.str.7 = [63 x i8] c"\09\09\09PreparedStatement statement = conn.preparedStatement(sql);\0A\00"
@.str.8 = [4 x i8] c"INT\00"
@.str.9 = [38 x i8] c"\09\09\09statement.setInt(%d, %s.get%s());\0A\00"
@.str.10 = [6 x i8] c"FLOAT\00"
@.str.11 = [40 x i8] c"\09\09\09statement.setFloat(%d, %s.get%s());\0A\00"
@.str.12 = [41 x i8] c"\09\09\09statement.setString(%d, %s.get%s());\0A\00"
@.str.13 = [50 x i8] c"\09\09\09int rowsInserted = statement.executeUpdate();\0A\00"
@.str.14 = [28 x i8] c"\09\09\09if (rowsInserted > 0) {\0A\00"
@.str.15 = [64 x i8] c"\09\09\09\09System.out.println('A new %s was inserted successfully!');\0A\00"
@.str.16 = [6 x i8] c"\09\09\09}\0A\00"
@.str.17 = [4 x i8] c"\09\09}\00"
define void @mount_method_insert(i32* nocapture %0, [500 x i8]* %1, [500 x i8]* %2, i32 %3, i8* %4) {
%6 = alloca [500 x i8]
%7 = alloca [500 x i8]
%8 = alloca [500 x i8]
%9 = alloca [500 x i8]
%10 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%11 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 0, i64 0
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = call i32 @capitalize_name(i8* %10)
%14 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%15 = call i32 @strcpy(i8* %14, i8* %11)
%16 = call i32 @uncapitalize_name(i8* %14)
%17 = getelementptr inbounds [500 x i8], [500 x i8]* %8, i64 0, i64 0
%18 = call i32 @strcpy(i8* %17, i8* %4)
%19 = call i32 @capitalize_name(i8* %17)
%20 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %14)
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%22 = icmp sgt i32 %3, 1
br i1 %22, label %25, label %23
23: ; preds = %5
%24 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i64 8, i64 1, i32* %0)
br label %59
25: ; preds = %5
%26 = add nsw i32 %3, -1
%27 = zext i32 %26 to i64
%28 = zext i32 %3 to i64
%29 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 %27, i64 0
br label %30
30: ; preds = %25, %38
%31 = phi i64 [ 1, %25 ], [ %39, %38 ]
%32 = icmp eq i64 %31, %27
br i1 %32, label %36, label %33
33: ; preds = %30
%34 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 %31, i64 0
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %34)
br label %38
36: ; preds = %30
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %29)
br label %38
38: ; preds = %33, %36
%39 = add nuw nsw i64 %31, 1
%40 = icmp eq i64 %39, %28
br i1 %40, label %41, label %30
41: ; preds = %38
%42 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i64 8, i64 1, i32* %0)
br i1 %22, label %43, label %59
43: ; preds = %41
%44 = add nsw i32 %3, -1
%45 = zext i32 %44 to i64
%46 = zext i32 %3 to i64
%47 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 %45, i64 0
br label %48
48: ; preds = %43, %56
%49 = phi i64 [ 1, %43 ], [ %57, %56 ]
%50 = icmp eq i64 %49, %45
br i1 %50, label %54, label %51
51: ; preds = %48
%52 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 %49, i64 0
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %52)
br label %56
54: ; preds = %48
%55 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %47)
br label %56
56: ; preds = %51, %54
%57 = add nuw nsw i64 %49, 1
%58 = icmp eq i64 %57, %46
br i1 %58, label %61, label %48
59: ; preds = %23, %41
%60 = call i64 @fwrite(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.7, i64 0, i64 0), i64 62, i64 1, i32* %0)
br label %90
61: ; preds = %56
%62 = call i64 @fwrite(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.7, i64 0, i64 0), i64 62, i64 1, i32* %0)
br i1 %22, label %63, label %90
63: ; preds = %61
%64 = zext i32 %3 to i64
%65 = getelementptr inbounds [500 x i8], [500 x i8]* %9, i64 0, i64 0
%66 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 %64, i64 0
%67 = zext i32 %3 to i64
br label %68
68: ; preds = %63, %87
%69 = phi i64 [ 1, %63 ], [ %88, %87 ]
%70 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 %69, i64 0
%71 = call i32 @strcpy(i8* %65, i8* %70)
%72 = call i32 @capitalize_name(i8* %65)
%73 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 %69, i64 0
%74 = call i64 @strcmp(i8* %73, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %79
76: ; preds = %68
%77 = trunc i64 %69 to i32
%78 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0), i32 %77, i8* %14, i8* %65)
br label %87
79: ; preds = %68
%80 = call i64 @strcmp(i8* %66, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%81 = icmp eq i64 %80, 0
%82 = trunc i64 %69 to i32
br i1 %81, label %83, label %85
83: ; preds = %79
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.11, i64 0, i64 0), i32 %82, i8* %14, i8* %65)
br label %87
85: ; preds = %79
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0), i32 %82, i8* %14, i8* %65)
br label %87
87: ; preds = %83, %85, %76
%88 = add nuw nsw i64 %69, 1
%89 = icmp eq i64 %88, %67
br i1 %89, label %90, label %68
90: ; preds = %87, %59, %61
%91 = call i64 @fwrite(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.13, i64 0, i64 0), i64 49, i64 1, i32* %0)
%92 = call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), i64 27, i64 1, i32* %0)
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.15, i64 0, i64 0), i8* %14)
%94 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i64 5, i64 1, i32* %0)
%95 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i64 3, i64 1, i32* %0)
ret void
}