// File: /workspace/github_cpp_makefile_star2_O3/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 0x12e50
movq 0x8(%rbx), %rdx
leaq 0x124c9(%rip), %rsi     # 0x298b6
leaq 0x78(%rsp), %rdi
callq 0xd469
leaq 0x124c7(%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 0x1742f
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x17437
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 0x174b0
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x174a7
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x174ad
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x174b0
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x17474
addl $-0x3, %r15d
jmp 0x174b0
addl $-0x2, %r15d
jmp 0x174b0
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x58(%rsp), %rdi
movl $0x2d, %edx
callq 0x8740
addq 0x58(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x11780
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x60(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0x17505
movq 0x40(%rsp), %rdi
movq 0x58(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x17523
movl $0xf, %edi
cmpq %r12, %rsi
je 0x1751e
movq 0x68(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1752f
leaq 0x30(%rsp), %rdi
callq 0x8940
jmp 0x1753d
leaq 0x58(%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 0x17561
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x17567
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 0x11fef(%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 0x175c5
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x175cb
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 0x17601
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x17618
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x1762f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17650
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 0x17797
movq 0x78(%rsp), %rdi
callq 0x8310
movq %rbx, 0x50(%rsp)
cmpl $0x64, %eax
jne 0x17742
movq %r13, %rbx
movq 0x50(%rsp), %rax
leaq 0x10(%rax), %r14
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
leaq 0x30(%rsp), %r12
leaq 0x58(%rsp), %r13
movq 0x78(%rsp), %rdi
callq 0x8d60
cmpl %eax, %ebp
jge 0x17742
movq 0x78(%rsp), %rdi
movl %ebp, %esi
callq 0x8840
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0xd42c
movq 0x78(%rsp), %rdi
movl %ebp, %esi
callq 0x8130
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xd42c
movq %r14, %rdi
movq %r15, %rsi
callq 0x18210
movq %rax, %rdi
movq %r12, %rsi
callq 0x8ed0
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1771f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1773b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
incl %ebp
jmp 0x176ac
movq 0x78(%rsp), %rdi
callq 0x8ad0
movq 0x50(%rsp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x1777b
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x28(%rsp), %rdi
callq 0x12e7a
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1f7e2(%rip), %rax     # 0x36f80
movq (%rax), %r14
movq 0x28(%rsp), %rdi
callq 0x8fa0
leaq 0x11dca(%rip), %rsi     # 0x2957c
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8240
jmp 0x17677
movq %rdx, %r15
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x177ed
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x177ed
movq %rdx, %r15
movq %rax, %r14
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x1780c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x1780c
movq %rdx, %r15
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x1782b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0x1782b
movq %rdx, %r15
movq %rax, %r14
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x178d9
movq 0x88(%rsp), %rsi
jmp 0x178d1
movq %rdx, %r15
movq %rax, %r14
jmp 0x178d9
movq %rdx, %r15
movq %rax, %r14
jmp 0x178e3
jmp 0x17873
jmp 0x17873
jmp 0x17869
movq %rdx, %r15
movq %rax, %r14
jmp 0x17898
jmp 0x17873
movq %rdx, %r15
movq %rax, %r14
jmp 0x178b4
movq %rdx, %r15
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x17898
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x178b4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x178d9
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x28(%rsp), %rdi
callq 0x12e7a
movq %r14, %rdi
cmpl $0x1, %r15d
jne 0x178f9
movl %r15d, %esi
callq 0x923a
jmp 0x17785
callq 0x87b0