// File: /workspace/github_cpp_makefile_star2_O1/eiskalteschatten[P]developersnotebook/src/views/ProjectsView.cpp
// Function: ProjectsView::fill_in_sidebar(ProjectsModel const*)
void ProjectsView::fill_in_sidebar(const ProjectsModel *row) {
    gtk_entry_set_text(GTK_ENTRY(project_name_input), row->get_name().c_str());
    gtk_entry_set_text(GTK_ENTRY(url_input), row->get_url().c_str());
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(is_complete_checkbox), row->get_is_complete());

    if (row->get_start_date() != "") {
        std::string date_str  = row->get_start_date();
        std::tm start_date_tm = get_date_from_string(&date_str);
        guint year            = start_date_tm.tm_year + 1900;

        gtk_calendar_select_month(GTK_CALENDAR(start_date_input), start_date_tm.tm_mon, year);
        gtk_calendar_select_day(GTK_CALENDAR(start_date_input), start_date_tm.tm_mday);
    }
    else {
        reset_calender(start_date_input);
    }

    if (row->get_end_date() != "") {
        std::string date_str = row->get_end_date();
        std::tm end_date_tm  = get_date_from_string(&date_str);
        guint year           = end_date_tm.tm_year + 1900;

        gtk_calendar_select_month(GTK_CALENDAR(end_date_input), end_date_tm.tm_mon, year);
        gtk_calendar_select_day(GTK_CALENDAR(end_date_input), end_date_tm.tm_mday);
    }
    else {
        reset_calender(end_date_input);
    }


    GtkTextIter start;
    GtkTextIter end;
    GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(notes_input));
    gtk_text_buffer_get_bounds(buffer, &start, &end);
    gtk_text_buffer_delete(buffer, &start, &end);

    if (row->get_notes() != "") {
        GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(notes_input));
        gtk_text_buffer_get_start_iter(buffer, &start);
        gtk_text_buffer_insert(buffer, &start, row->get_notes().c_str(), -1);
    }

    gtk_button_set_label(GTK_BUTTON(save_button), "Save Project");
    gtk_widget_set_sensitive(delete_button, TRUE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rdi), %r12
callq 0x84a0
movq %rax, %r15
movq %r12, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %r12
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x60(%r14), %rsi
movq 0x68(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0xd524
movq (%r13), %rsi
movq %r12, %rdi
callq 0x8bf0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
movq %rbp, %r13
je 0xfc56
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x88(%rbx), %rdi
movq %r15, %rsi
callq 0x8150
movq %rax, %r15
leaq 0x8(%rsp), %r12
movq %r13, (%r12)
movq 0xc0(%r14), %rsi
movq 0xc8(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xd524
movq (%r12), %rsi
movq %r15, %rdi
callq 0x8bf0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xfcad
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0x98(%rbx), %r15
callq 0x8f20
movq %r15, %rdi
movq %rax, %rsi
callq 0x8150
movzbl 0x100(%r14), %esi
movq %rax, %rdi
callq 0x90b0
leaq 0x8(%rsp), %r15
movq %r13, (%r15)
movq 0x80(%r14), %rsi
movq 0x88(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xd524
leaq 0x19c59(%rip), %rsi     # 0x29955
movq %r15, %rdi
callq 0x8c00
movl %eax, %ebp
movq (%r15), %rdi
cmpq %r13, %rdi
je 0xfd1b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
testl %ebp, %ebp
je 0xfdc2
leaq 0x88(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x80(%r14), %rsi
movq 0x88(%r14), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %r15
movq %r15, %rdi
callq 0xd524
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x11e7a
movl 0x1c(%rsp), %ebp
movq 0x68(%rbx), %r12
callq 0x8540
movq %rax, %r15
movq %r12, %rdi
movq %rax, %rsi
callq 0x8150
addl $0x76c, %ebp            # imm = 0x76C
movl 0x18(%rsp), %esi
movq %rax, %rdi
movl %ebp, %edx
callq 0x9020
movq 0x68(%rbx), %rdi
movq %r15, %rsi
callq 0x8150
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x8c90
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0xfdbb
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8170
leaq 0x18(%rsp), %r13
jmp 0xfdce
movq 0x68(%rbx), %rsi
movq %rbx, %rdi
callq 0x12082
leaq 0x8(%rsp), %r15
movq %r13, (%r15)
movq 0xa0(%r14), %rsi
movq 0xa8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xd524
leaq 0x19b5f(%rip), %rsi     # 0x29955
movq %r15, %rdi
callq 0x8c00
movl %eax, %ebp
movq (%r15), %rdi
cmpq %r13, %rdi
je 0xfe15
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8170
testl %ebp, %ebp
je 0xfeb7
leaq 0x88(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0xa0(%r14), %rsi
movq 0xa8(%r14), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %r15
movq %r15, %rdi
callq 0xd524
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x11e7a
movl 0x1c(%rsp), %ebp
movq 0x78(%rbx), %r12
callq 0x8540
movq %rax, %r15
movq %r12, %rdi
movq %rax, %rsi
callq 0x8150
addl $0x76c, %ebp            # imm = 0x76C
movl 0x18(%rsp), %esi
movq %rax, %rdi
movl %ebp, %edx
callq 0x9020
movq 0x78(%rbx), %rdi
movq %r15, %rsi
callq 0x8150
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x8c90
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0xfec3
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8170
jmp 0xfec3
movq 0x78(%rbx), %rsi
movq %rbx, %rdi
callq 0x12082
movq 0x90(%rbx), %r12
callq 0x8890
movq %rax, %r15
movq %r12, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x8320
movq %rax, %r12
leaq 0x8(%rsp), %r13
leaq 0x78(%rsp), %rbp
movq %rax, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x80b0
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x8c20
leaq 0x68(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0xe0(%r14), %rsi
movq 0xe8(%r14), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %r12
movq %r12, %rdi
callq 0xd524
leaq 0x19a19(%rip), %rsi     # 0x29955
movq %r12, %rdi
callq 0x8c00
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xff5c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8170
testl %ebp, %ebp
je 0xffdc
movq 0x90(%rbx), %rdi
movq %r15, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x8320
movq %rax, %r15
leaq 0x8(%rsp), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x80d0
leaq 0x58(%rsp), %r13
leaq 0x68(%rsp), %rbp
movq %rbp, (%r13)
movq 0xe0(%r14), %rsi
movq 0xe8(%r14), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xd524
movq (%r13), %rdx
movq %r15, %rdi
movq %r12, %rsi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x8b20
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0xffdc
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8170
movq 0xa0(%rbx), %r14
callq 0x86c0
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
leaq 0x19327(%rip), %rsi     # 0x29321
movq %rax, %rdi
callq 0x8700
movq 0xa8(%rbx), %rdi
movl $0x1, %esi
callq 0x8fc0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1007f
movq 0x68(%rsp), %rsi
jmp 0x10077
jmp 0x10062
jmp 0x10062
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x10059
jmp 0x1007f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1007f
movq 0x18(%rsp), %rsi
jmp 0x10077
jmp 0x10062
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x1007f
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8170
movq %rbx, %rdi
callq 0x87b0
nop