// File: /workspace/github_cpp_makefile_star2_O1/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 $0x188, %rsp            # imm = 0x188
movq %rdi, %rbx
leaq 0x40(%rsp), %rdi
callq 0x12e2c
xorl %eax, %eax
movq %rax, 0x48(%rsp)
leaq 0x98(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x78(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq %rbx, 0x10(%rsp)
movq 0x8(%rbx), %rsi
addq $0x20, %rsi
leaq 0x50(%rsp), %rdi
callq 0x13a3a
movq 0x50(%rsp), %rax
cmpq %rax, 0x58(%rsp)
je 0x15b5a
leaq 0x30(%rsp), %rbx
movl $0x1, %ebp
xorl %r14d, %r14d
leaq 0x148(%rsp), %r15
shlq $0x7, %r14
movq (%rax,%r14), %rsi
movq 0x8(%rax,%r14), %rdx
leaq 0x88(%rsp), %rdi
callq 0x8940
movq 0x50(%rsp), %rax
movq 0x68(%rax,%r14), %r12
testq %r12, %r12
setne 0xf(%rsp)
je 0x15a71
leaq (%rax,%r14), %rdx
addq $0x60, %rdx
movq %r15, %r13
movq %r15, %rdi
leaq 0x13dea(%rip), %r14     # 0x29825
movq %r14, %rsi
callq 0xd49b
movq %r13, %rdi
movq %r14, %rsi
callq 0x87f0
movq %rbx, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15a90
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x15a96
movq %rbx, 0x20(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x14c8f(%rip), %rsi     # 0x2a711
leaq 0x14c8a(%rip), %rdx     # 0x2a713
callq 0xd5b4
jmp 0x15aae
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x68(%rsp), %rdi
callq 0x8940
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x15ad9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8170
testq %r12, %r12
je 0x15b03
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0x15b03
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x8170
movl %ebp, %r14d
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
sarq $0x7, %rax
cmpq %r14, %rax
jbe 0x15b3e
leaq 0x88(%rsp), %rdi
leaq 0x13dac(%rip), %rsi     # 0x298d4
callq 0x87f0
leaq 0x68(%rsp), %rdi
leaq 0x13d9b(%rip), %rsi     # 0x298d4
callq 0x87f0
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
sarq $0x7, %rcx
incl %ebp
cmpq %r14, %rcx
ja 0x159f8
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0x13c5e(%rip), %rsi     # 0x297c8
leaq 0x168(%rsp), %rdi
callq 0xd49b
leaq 0x13a2b(%rip), %rsi     # 0x295a9
leaq 0x168(%rsp), %rdi
callq 0x87f0
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15bbb
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x15bc2
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0xa8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x8940
leaq 0xd8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15c27
movq %rdx, 0xc8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd8(%rsp)
jmp 0x15c2f
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0xc8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x14513(%rip), %rsi     # 0x2a168
callq 0x87f0
leaq 0xf8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15c8a
movq %rdx, 0xe8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf8(%rsp)
jmp 0x15c90
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0xe8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x138ec(%rip), %rsi     # 0x295a2
callq 0x87f0
leaq 0x118(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15ceb
movq %rdx, 0x108(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x118(%rsp)
jmp 0x15cf2
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x108(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x8940
leaq 0x138(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15d50
movq %rdx, 0x128(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x138(%rsp)
jmp 0x15d58
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x128(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x137fb(%rip), %rsi     # 0x29579
callq 0x87f0
leaq 0x30(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15daa
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x15db1
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x128(%rsp), %rdi
cmpq %r13, %rdi
je 0x15de6
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x108(%rsp), %rdi
cmpq %r14, %rdi
je 0x15e03
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0xe8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x15e20
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x15e3d
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x15e5a
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15e7b
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0x48(%rsp), %r8
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x80c0
testl %eax, %eax
jne 0x15f2b
movq 0x40(%rsp), %rdi
callq 0x8730
movq 0x10(%rsp), %rcx
movl %eax, 0x58(%rcx)
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x15ec4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x50(%rsp), %rdi
callq 0x13ac4
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x15eea
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x15f0f
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x40(%rsp), %rdi
callq 0x12e56
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2104e(%rip), %rax     # 0x36f80
movq (%rax), %rdi
movq 0x48(%rsp), %rdx
leaq 0x1363b(%rip), %rsi     # 0x2957c
xorl %eax, %eax
callq 0x8240
movq 0x48(%rsp), %rdi
callq 0x9010
jmp 0x15e9b
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x128(%rsp), %rdi
cmpq %r13, %rdi
je 0x15f8a
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x15f8a
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x108(%rsp), %rdi
cmpq %r14, %rdi
je 0x15fb3
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x15fb3
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0xe8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x15fdc
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x15fdc
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x16005
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x16005
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1602e
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x1602e
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1611c
movq 0x178(%rsp), %rsi
jmp 0x1608d
jmp 0x16112
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
jmp 0x16126
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
jmp 0x16171
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1611c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x1611c
jmp 0x16112
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x1, 0xf(%rsp)
jmp 0x1610b
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movb $0x1, 0xf(%rsp)
jmp 0x160df
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x160df
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8170
cmpb $0x0, 0xf(%rsp)
je 0x1610b
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0x1610b
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x8170
cmpb $0x0, 0xf(%rsp)
jmp 0x1611c
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x13ac4
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x16142
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x16167
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x40(%rsp), %rdi
callq 0x12e56
movq 0x10(%rsp), %rsi
cmpl $0x1, %esi
jne 0x1618a
movq 0x18(%rsp), %rdi
callq 0x9150
jmp 0x15f19
movq 0x18(%rsp), %rdi
callq 0x87b0