// File: /workspace/github_cpp_makefile_star2_O1/eiskalteschatten[P]developersnotebook/src/models/AbstractSqliteModel.cpp
// Function: AbstractSqliteModel::select_one()
void AbstractSqliteModel::select_one() {
    try {
        SqliteConnectionManager connection_manager;

        std::string sql = "SELECT * FROM " + table_schema->table_name + " WHERE ID=" + std::to_string(id) + ";";
        int connection;
        sqlite3_stmt *stmt;

        connection = sqlite3_prepare_v2(connection_manager.get_db(), sql.c_str(), -1, &stmt, NULL);

        if(connection != SQLITE_OK) {
            fprintf(stderr, "SQL error: %s\n", sqlite3_errmsg(connection_manager.get_db()));
        }

        while ((connection = sqlite3_step(stmt)) == SQLITE_ROW) {
            for (int i = 0; i < sqlite3_column_count(stmt); i++) {
                std::string column_name = std::string(reinterpret_cast<const char*>(sqlite3_column_name(stmt, i)));
                std::string column_text = std::string(reinterpret_cast<const char*>(sqlite3_column_text(stmt, i)));
                contents[column_name]   = column_text;
            }

            break; // We only want one row. There should only be one with the id, but just be sure.
        }

        sqlite3_finalize(stmt);

        fill_model();
    }
    catch(const std::exception& e) {
        fprintf(stderr, "An exception occured while trying to set up the database: %s\n", e.what());
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
callq 0x12e2c
movq 0x8(%rbx), %rdx
leaq 0x1249f(%rip), %rsi     # 0x298b6
leaq 0x78(%rsp), %rdi
callq 0xd49b
leaq 0x1249d(%rip), %rsi     # 0x298c5
leaq 0x78(%rsp), %rdi
callq 0x87f0
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x17459
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x17461
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x58(%rbx), %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x174da
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x174d1
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x174d7
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x174da
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x1749e
addl $-0x3, %r15d
jmp 0x174da
addl $-0x2, %r15d
jmp 0x174da
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x50(%rsp), %rdi
movl $0x2d, %edx
callq 0x8740
addq 0x50(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x1175c
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x1752f
movq 0x40(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1754a
movl $0xf, %esi
cmpq %r12, 0x50(%rsp)
je 0x17545
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1755b
movq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x8940
jmp 0x17569
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x81e0
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x1758d
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x17593
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x11fc3(%rip), %rsi     # 0x2957a
leaq 0x8(%rsp), %rdi
callq 0x87f0
leaq 0xa8(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x175f1
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x175f7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xa0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1762d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x17644
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x1765b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1767c
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x28(%rsp), %rdi
movq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x8a60
testl %eax, %eax
jne 0x177c3
movq 0x78(%rsp), %rdi
callq 0x8310
movq %rbx, 0x70(%rsp)
cmpl $0x64, %eax
jne 0x1776e
movq %r13, %rbx
movq 0x70(%rsp), %rax
leaq 0x10(%rax), %r14
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
leaq 0x30(%rsp), %r12
leaq 0x50(%rsp), %r13
movq 0x78(%rsp), %rdi
callq 0x8d60
cmpl %eax, %ebp
jge 0x1776e
movq 0x78(%rsp), %rdi
movl %ebp, %esi
callq 0x8840
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0xd45e
movq 0x78(%rsp), %rdi
movl %ebp, %esi
callq 0x8130
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xd45e
movq %r14, %rdi
movq %r15, %rsi
callq 0x18236
movq %rax, %rdi
movq %r12, %rsi
callq 0x8ed0
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1774b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x17767
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
incl %ebp
jmp 0x176d8
movq 0x78(%rsp), %rdi
callq 0x8ad0
movq 0x70(%rsp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x177a7
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x28(%rsp), %rdi
callq 0x12e56
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1f7b6(%rip), %rax     # 0x36f80
movq (%rax), %r14
movq 0x28(%rsp), %rdi
callq 0x8fa0
leaq 0x11d9e(%rip), %rsi     # 0x2957c
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8240
jmp 0x176a3
movq %rdx, %r15
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17819
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x17819
movq %rdx, %r15
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x17838
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x17838
movq %rdx, %r15
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x17857
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x17857
movq %rdx, %r15
movq %rax, %r14
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17905
movq 0x88(%rsp), %rsi
jmp 0x178fd
movq %rdx, %r15
movq %rax, %r14
jmp 0x17905
movq %rdx, %r15
movq %rax, %r14
jmp 0x1790f
jmp 0x1789f
jmp 0x1789f
jmp 0x17895
movq %rdx, %r15
movq %rax, %r14
jmp 0x178c4
jmp 0x1789f
movq %rdx, %r15
movq %rax, %r14
jmp 0x178e0
movq %rdx, %r15
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x178c4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x178e0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x17905
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x28(%rsp), %rdi
callq 0x12e56
movq %r14, %rdi
cmpl $0x1, %r15d
jne 0x17925
movl %r15d, %esi
callq 0x923c
jmp 0x177b1
callq 0x87b0