// File: eiskalteschatten[P]developersnotebook/src/models/AbstractSqliteModel.cpp
// Function: AbstractSqliteModel::update_single(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void AbstractSqliteModel::update_single(const std::string insert_column_name, const std::string &value) {
    try {
        if (!id) {
            insert_new_row();
        }

        SqliteConnectionManager connection_manager;

        char *error_message = 0;
        int connection;
        std::string sql = "UPDATE " + table_schema->table_name +
                          " SET " + (std::string)insert_column_name +
                          " = \"" + text_escape(value) + "\"" +
                          " WHERE id=" + std::to_string(id) + ";";

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

        if(connection != SQLITE_OK) {
            fprintf(stderr, "SQL error: %s\n", error_message);
            sqlite3_free(error_message);
        }
    }
    catch(const std::exception& e) {
        fprintf(stderr, "An exception occured while trying to save to the database: %s\n", e.what());
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rsi, -0x1f8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1f0(%rbp)
cmpl $0x0, 0x58(%rax)
jne 0x21b60
movq -0x1f0(%rbp), %rdi
callq 0x21500
jmp 0x21b4d
jmp 0x21b60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21f5a
leaq -0x30(%rbp), %rdi
callq 0x1cc70
jmp 0x21b6b
movq -0x1f0(%rbp), %rax
movq $0x0, -0x38(%rbp)
movq 0x8(%rax), %rdx
leaq 0x31f5f(%rip), %rsi     # 0x53ae4
leaq -0x160(%rbp), %rdi
callq 0x110c0
jmp 0x21b93
leaq 0x31f52(%rip), %rdx     # 0x53aec
leaq -0x140(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x10eb0
jmp 0x21baf
movq -0x1f8(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0xa230
jmp 0x21bc4
leaq -0x120(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x180(%rbp), %rdx
callq 0x23350
jmp 0x21be0
leaq 0x31f0b(%rip), %rdx     # 0x53af2
leaq -0x100(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x10eb0
jmp 0x21bfc
movq -0x18(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
callq 0xa230
jmp 0x21c0e
movq -0x1f0(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
leaq -0x1c0(%rbp), %rdx
callq 0x21fd0
jmp 0x21c2a
leaq -0xe0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
leaq -0x1a0(%rbp), %rdx
callq 0x23350
jmp 0x21c46
leaq 0x31ea8(%rip), %rdx     # 0x53af5
leaq -0xc0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x10eb0
jmp 0x21c62
leaq 0x31e8e(%rip), %rdx     # 0x53af7
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x10eb0
jmp 0x21c7e
movq -0x1f0(%rbp), %rax
movl 0x58(%rax), %esi
leaq -0x1e0(%rbp), %rdi
callq 0x19050
jmp 0x21c96
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0x1e0(%rbp), %rdx
callq 0x23350
jmp 0x21caf
leaq 0x31afe(%rip), %rdx     # 0x537b4
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x10eb0
jmp 0x21cc5
leaq -0x80(%rbp), %rdi
callq 0xb430
leaq -0x1e0(%rbp), %rdi
callq 0xb430
leaq -0xa0(%rbp), %rdi
callq 0xb430
leaq -0xc0(%rbp), %rdi
callq 0xb430
leaq -0xe0(%rbp), %rdi
callq 0xb430
leaq -0x1a0(%rbp), %rdi
callq 0xb430
leaq -0x1c0(%rbp), %rdi
callq 0xb430
leaq -0x100(%rbp), %rdi
callq 0xb430
leaq -0x120(%rbp), %rdi
callq 0xb430
leaq -0x180(%rbp), %rdi
callq 0xb430
leaq -0x140(%rbp), %rdi
callq 0xb430
leaq -0x160(%rbp), %rdi
callq 0xb430
leaq -0x30(%rbp), %rdi
callq 0x1d940
movq %rax, -0x200(%rbp)
jmp 0x21d64
leaq -0x60(%rbp), %rdi
callq 0xa1d0
movq -0x200(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x38(%rbp), %r8
movq %rcx, %rdx
callq 0xa0e0
movl %eax, -0x204(%rbp)
jmp 0x21d8f
movl -0x204(%rbp), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x21f3d
movq 0x531d7(%rip), %rax     # 0x74f80
movq (%rax), %rdi
movq -0x38(%rbp), %rdx
leaq 0x319ff(%rip), %rsi     # 0x537b6
xorl %eax, %eax
callq 0xa320
movq -0x38(%rbp), %rdi
callq 0xb360
jmp 0x21dc9
jmp 0x21f3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21f51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21f18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21f0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21f00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21ef4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21ee8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21edc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21ed0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21ec4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21eb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21eac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x21ea0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xb430
leaq -0x1e0(%rbp), %rdi
callq 0xb430
leaq -0xa0(%rbp), %rdi
callq 0xb430
leaq -0xc0(%rbp), %rdi
callq 0xb430
leaq -0xe0(%rbp), %rdi
callq 0xb430
leaq -0x1a0(%rbp), %rdi
callq 0xb430
leaq -0x1c0(%rbp), %rdi
callq 0xb430
leaq -0x100(%rbp), %rdi
callq 0xb430
leaq -0x120(%rbp), %rdi
callq 0xb430
leaq -0x180(%rbp), %rdi
callq 0xb430
leaq -0x140(%rbp), %rdi
callq 0xb430
leaq -0x160(%rbp), %rdi
callq 0xb430
jmp 0x21f51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xb430
jmp 0x21f51
leaq -0x60(%rbp), %rdi
callq 0xb430
leaq -0x30(%rbp), %rdi
callq 0x1ccf0
jmp 0x21fb1
leaq -0x30(%rbp), %rdi
callq 0x1ccf0
movl -0x24(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x21fba
movq -0x20(%rbp), %rdi
callq 0xa0b0
movq %rax, -0x1e8(%rbp)
movq 0x53003(%rip), %rax     # 0x74f80
movq (%rax), %rax
movq %rax, -0x210(%rbp)
movq -0x1e8(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x210(%rbp), %rdi
movq %rax, %rdx
leaq 0x31b00(%rip), %rsi     # 0x53aa5
movb $0x0, %al
callq 0xa320
callq 0xac00
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0xaa00
nopw %cs:(%rax,%rax)