// File: /workspace/github_cpp_makefile_star2_O3/eiskalteschatten[P]developersnotebook/src/models/AbstractSqliteModel.cpp
// Function: AbstractSqliteModel::insert_new_row()
void AbstractSqliteModel::insert_new_row() {
    try {
        SqliteConnectionManager connection_manager;
        char *error_message = 0;
        int connection;

        std::string insert_sql_columns;
        std::string insert_sql_values;
        std::vector<SqliteSchema::ColumnSchema> table_columns = table_schema->columns;

        for (unsigned int c = 0; c < table_columns.size(); c++) {
            insert_sql_columns += table_columns[c].column_name;
            insert_sql_values  += table_columns[c].default_value.empty() ? "\"\"" : "\"" + table_columns[c].default_value + "\"";

            if ((c + 1) < table_columns.size()) {
                insert_sql_columns += ",";
                insert_sql_values  += ",";
            }
        }

        std::string insert_sql = "INSERT INTO " + table_schema->table_name +
                                 " (" + insert_sql_columns + ")" +
                                 " VALUES (" + insert_sql_values + ");";

        connection = sqlite3_exec(connection_manager.get_db(), insert_sql.c_str(), NULL, 0, &error_message);

        if(connection != SQLITE_OK) {
            fprintf(stderr, "SQL error: %s\n", error_message);
            sqlite3_free(error_message);
        }

        id = sqlite3_last_insert_rowid(connection_manager.get_db());
    }
    catch(const std::exception& e) {
        fprintf(stderr, "An exception occured while trying to save to the database: %s\n", e.what());
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdi, %rbx
leaq 0x30(%rsp), %rdi
callq 0x12e50
xorl %eax, %eax
movq %rax, 0x38(%rsp)
leaq 0x68(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x88(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq %rbx, (%rsp)
movq 0x8(%rbx), %rsi
addq $0x20, %rsi
leaq 0x40(%rsp), %rdi
callq 0x13a5e
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x15b71
leaq 0x20(%rsp), %r13
movl $0x1, %ebx
xorl %r12d, %r12d
leaq 0x78(%rsp), %rbp
shlq $0x7, %r12
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
leaq 0x58(%rsp), %rdi
callq 0x8940
movq 0x40(%rsp), %rax
movq 0x68(%rax,%r12), %r15
testq %r15, %r15
leaq 0x138(%rsp), %rdi
je 0x15a8a
leaq (%rax,%r12), %rdx
addq $0x60, %rdx
leaq 0x13dd4(%rip), %r12     # 0x29825
movq %r12, %rsi
movq %rdi, %r14
callq 0xd469
movq %r14, %rdi
movq %r12, %rsi
callq 0x87f0
movq %r13, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15aa9
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x15ab1
movq %r13, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x14c76(%rip), %rsi     # 0x2a711
leaq 0x14c71(%rip), %rdx     # 0x2a713
callq 0xd588
jmp 0x15ac9
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbp, %rdi
callq 0x8940
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x15af2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8170
testq %r15, %r15
je 0x15b1c
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x15b1c
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x8170
movl %ebx, %r12d
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
subq %rax, %rcx
sarq $0x7, %rcx
cmpq %r12, %rcx
jbe 0x15b66
leaq 0x58(%rsp), %rdi
leaq 0x13d93(%rip), %rsi     # 0x298d4
callq 0x87f0
movq %rbp, %rdi
leaq 0x13d84(%rip), %rsi     # 0x298d4
callq 0x87f0
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
subq %rax, %rcx
sarq $0x7, %rcx
incl %ebx
cmpq %r12, %rcx
ja 0x15a14
movq (%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0x13c48(%rip), %rsi     # 0x297c8
leaq 0x158(%rsp), %rdi
callq 0xd469
leaq 0x13a15(%rip), %rsi     # 0x295a9
leaq 0x158(%rsp), %rdi
callq 0x87f0
leaq 0xa8(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15bd1
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x15bd8
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x98(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x8940
leaq 0xc8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15c37
movq %rdx, 0xb8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc8(%rsp)
jmp 0x15c3f
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0xb8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x14503(%rip), %rsi     # 0x2a168
callq 0x87f0
leaq 0xe8(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15c9a
movq %rdx, 0xd8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe8(%rsp)
jmp 0x15ca2
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0xd8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x138da(%rip), %rsi     # 0x295a2
callq 0x87f0
leaq 0x108(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15cfd
movq %rdx, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
jmp 0x15d04
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0xf8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x8940
leaq 0x128(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15d65
movq %rdx, 0x118(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x128(%rsp)
jmp 0x15d6b
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x118(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x137e8(%rip), %rsi     # 0x29579
callq 0x87f0
leaq 0x20(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15dbd
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x15dc4
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x15df9
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0xf8(%rsp), %rdi
cmpq %r14, %rdi
je 0x15e16
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0xd8(%rsp), %rdi
cmpq %r13, %rdi
je 0x15e33
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x15e50
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x15e6d
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15e8e
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %r8
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x80c0
testl %eax, %eax
jne 0x15f3a
movq 0x30(%rsp), %rdi
callq 0x8730
movq (%rsp), %rcx
movl %eax, 0x58(%rcx)
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x15ed6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x40(%rsp), %rdi
callq 0x13ae8
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x15f02
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x15f1e
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x30(%rsp), %rdi
callq 0x12e7a
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2103f(%rip), %rax     # 0x36f80
movq (%rax), %rdi
movq 0x38(%rsp), %rdx
leaq 0x1362c(%rip), %rsi     # 0x2957c
xorl %eax, %eax
callq 0x8240
movq 0x38(%rsp), %rdi
callq 0x9010
jmp 0x15eae
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x15f97
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x15f97
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
movq 0xf8(%rsp), %rdi
cmpq %r14, %rdi
je 0x15fbf
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x15fbf
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
movq 0xd8(%rsp), %rdi
cmpq %r13, %rdi
je 0x15fe7
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x15fe7
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1600f
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x1600f
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x16037
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x16037
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x160f8
movq 0x168(%rsp), %rsi
jmp 0x160e5
jmp 0x160ef
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
jmp 0x16102
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
jmp 0x1614a
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x160f8
movq 0x20(%rsp), %rsi
jmp 0x160e5
jmp 0x160ef
jmp 0x160ef
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
jmp 0x160c8
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x160c3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8170
testq %r15, %r15
je 0x160f8
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x160f8
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x160f8
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x13ae8
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x16124
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x16140
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x30(%rsp), %rdi
callq 0x12e7a
movq (%rsp), %rsi
cmpl $0x1, %esi
jne 0x16162
movq 0x8(%rsp), %rdi
callq 0x914e
jmp 0x15f28
movq 0x8(%rsp), %rdi
callq 0x87b0