// File: /workspace/github_cpp_makefile_star2_O1/eiskalteschatten[P]developersnotebook/src/views/ProjectsView.cpp
// Function: ProjectsView::setup_form_sidebar()
void ProjectsView::setup_form_sidebar() {
    const int grid_spacing        = 10;
    const int field_margin_bottom = 10;

    form_grid = gtk_grid_new();
    g_object_set(form_grid, "hexpand", TRUE, NULL);

    gtk_grid_set_column_spacing(GTK_GRID(form_grid), grid_spacing);
    gtk_grid_set_row_spacing(GTK_GRID(form_grid), grid_spacing);
    gtk_container_set_border_width(GTK_CONTAINER(form_grid), grid_spacing);


    // Project Name
    {
        GtkWidget *project_name_label = gtk_label_new("Project Name");
        gtk_widget_set_halign(project_name_label, GTK_ALIGN_START);

        project_name_input = gtk_entry_new();
        g_object_set(project_name_input, "hexpand", TRUE, NULL);
        gtk_widget_set_margin_bottom(project_name_input, field_margin_bottom);

        gtk_grid_insert_row(GTK_GRID(form_grid), 0);
        gtk_grid_insert_row(GTK_GRID(form_grid), 1);
        gtk_grid_attach(GTK_GRID(form_grid), project_name_label, 0, 0, 1, 1);
        gtk_grid_attach(GTK_GRID(form_grid), project_name_input, 0, 1, 1, 1);
    }

    // Start Date
    {
        GtkWidget *start_date_label = gtk_label_new("Start Date");
        gtk_widget_set_halign(start_date_label, GTK_ALIGN_START);

        start_date_input = gtk_calendar_new();
        g_object_set(start_date_input, "hexpand", TRUE, NULL);

        gtk_grid_insert_row(GTK_GRID(form_grid), 2);
        gtk_grid_insert_row(GTK_GRID(form_grid), 3);
        gtk_grid_attach(GTK_GRID(form_grid), start_date_label, 0, 2, 1, 1);
        gtk_grid_attach(GTK_GRID(form_grid), start_date_input, 0, 3, 1, 1);
    }

    // Clear start date selection button
    {
        start_date_clear_button = gtk_button_new_with_label("Clear Selection");
        gtk_widget_set_halign(start_date_clear_button, GTK_ALIGN_END);
        g_object_set(start_date_clear_button, "hexpand", FALSE, NULL);
        gtk_widget_set_margin_bottom(start_date_clear_button, field_margin_bottom);
        g_signal_connect(G_OBJECT(start_date_clear_button), "clicked", G_CALLBACK(clear_start_date_selection), this);

        gtk_grid_insert_row(GTK_GRID(form_grid), 4);
        gtk_grid_attach(GTK_GRID(form_grid), start_date_clear_button, 0, 4, 1, 1);
    }

    // End Date
    {
        GtkWidget *end_date_label = gtk_label_new("End Date");
        gtk_widget_set_halign(end_date_label, GTK_ALIGN_START);

        end_date_input = gtk_calendar_new();
        g_object_set(end_date_input, "hexpand", TRUE, NULL);

        gtk_grid_insert_row(GTK_GRID(form_grid), 5);
        gtk_grid_insert_row(GTK_GRID(form_grid), 6);
        gtk_grid_attach(GTK_GRID(form_grid), end_date_label, 0, 5, 1, 1);
        gtk_grid_attach(GTK_GRID(form_grid), end_date_input, 0, 6, 1, 1);
    }

    // Clear end date selection button
    {
        end_date_clear_button = gtk_button_new_with_label("Clear Selection");
        gtk_widget_set_halign(end_date_clear_button, GTK_ALIGN_END);
        g_object_set(end_date_clear_button, "hexpand", FALSE, NULL);
        gtk_widget_set_margin_bottom(end_date_clear_button, field_margin_bottom);
        g_signal_connect(G_OBJECT(end_date_clear_button), "clicked", G_CALLBACK(clear_end_date_selection), this);

        gtk_grid_insert_row(GTK_GRID(form_grid), 7);
        gtk_grid_attach(GTK_GRID(form_grid), end_date_clear_button, 0, 7, 1, 1);
    }


    // URL
    {
        GtkWidget *url_label = gtk_label_new("URL");
        gtk_widget_set_halign(url_label, GTK_ALIGN_START);

        url_input = gtk_entry_new();
        g_object_set(url_input, "hexpand", TRUE, NULL);
        gtk_widget_set_margin_bottom(url_input, field_margin_bottom);

        gtk_grid_insert_row(GTK_GRID(form_grid), 8);
        gtk_grid_insert_row(GTK_GRID(form_grid), 9);
        gtk_grid_attach(GTK_GRID(form_grid), url_label, 0, 8, 1, 1);
        gtk_grid_attach(GTK_GRID(form_grid), url_input, 0, 9, 1, 1);
    }


    // Notes
    {
        GtkWidget *notes_label = gtk_label_new("Notes");
        gtk_widget_set_halign(notes_label, GTK_ALIGN_START);

        notes_input = gtk_text_view_new();

        GtkWidget *notes_scrolled_window = gtk_scrolled_window_new(NULL, NULL);
        g_object_set(notes_scrolled_window, "hexpand", TRUE, NULL);
        gtk_container_add(GTK_CONTAINER(notes_scrolled_window), notes_input);

        gtk_widget_set_size_request(notes_input, -1, 75);
        gtk_widget_set_size_request(notes_scrolled_window, -1, 75);
        gtk_widget_set_margin_bottom(notes_scrolled_window, field_margin_bottom);

        gtk_grid_insert_row(GTK_GRID(form_grid), 10);
        gtk_grid_insert_row(GTK_GRID(form_grid), 11);
        gtk_grid_attach(GTK_GRID(form_grid), notes_label, 0, 10, 1, 1);
        gtk_grid_attach(GTK_GRID(form_grid), notes_scrolled_window, 0, 11, 1, 1);
    }


    // Is Complete
    {
        is_complete_checkbox = gtk_check_button_new_with_label("Project is completed");
        gtk_widget_set_margin_bottom(is_complete_checkbox, field_margin_bottom);

        gtk_grid_insert_row(GTK_GRID(form_grid), 12);
        gtk_grid_attach(GTK_GRID(form_grid), is_complete_checkbox, 0, 12, 1, 1);
    }


    // Button Grid
    {
        GtkWidget *button_grid = gtk_grid_new();
        g_object_set(button_grid, "hexpand", TRUE, NULL);
        gtk_grid_insert_row(GTK_GRID(button_grid), 0);


        // Create New Project / Save Button
        save_button = gtk_button_new_with_label("Create New Project");
        gtk_widget_set_halign(save_button, GTK_ALIGN_START);
        g_object_set(save_button, "hexpand", FALSE, NULL);
        g_signal_connect(G_OBJECT(save_button), "clicked", G_CALLBACK(save_project), this);

        gtk_grid_insert_column(GTK_GRID(button_grid), 0);
        gtk_grid_attach(GTK_GRID(button_grid), save_button, 0, 0, 1, 1);


        // Delete Button
        delete_button = gtk_button_new_from_icon_name("edit-delete", GTK_ICON_SIZE_BUTTON);
        gtk_widget_set_halign(delete_button, GTK_ALIGN_END);
        g_object_set(delete_button, "hexpand", TRUE, NULL);
        g_signal_connect(G_OBJECT(delete_button), "clicked", G_CALLBACK(delete_project), this);

        gtk_grid_insert_column(GTK_GRID(button_grid), 1);
        gtk_grid_attach(GTK_GRID(button_grid), delete_button, 1, 0, 1, 1);


        // Add the button grid to the form grid
        gtk_grid_insert_row(GTK_GRID(form_grid), 13);
        gtk_grid_attach(GTK_GRID(form_grid), button_grid, 0, 13, 1, 1);
    }


    // Setup the scrollbar
    {
        form_scrolled_window = gtk_scrolled_window_new(NULL, NULL);
        g_object_set(form_scrolled_window, "hexpand", TRUE, NULL);
        g_object_set(form_scrolled_window, "vexpand", TRUE, NULL);
        gtk_widget_set_halign(form_scrolled_window, GTK_ALIGN_FILL);
        gtk_widget_set_valign(form_scrolled_window, GTK_ALIGN_FILL);
        gtk_widget_set_size_request(form_scrolled_window, 300, -1);
        gtk_container_add(GTK_CONTAINER(form_scrolled_window), form_grid);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8c10
movq %rax, 0x28(%rbx)
leaq 0x1861e(%rip), %r14     # 0x29226
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x28(%rbx), %r15
callq 0x89d0
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movl $0xa, %esi
callq 0x8200
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0xa, %esi
callq 0x8460
movq 0x28(%rbx), %r13
callq 0x89c0
movq %rax, (%rsp)
movq %r13, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movl $0xa, %esi
callq 0x9000
leaq 0x184d2(%rip), %rdi     # 0x29157
callq 0x8800
movq %rax, %r13
movq %rax, %rdi
movl $0x1, %esi
callq 0x8d10
callq 0x8280
movq %rax, 0x60(%rbx)
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x60(%rbx), %rdi
movl $0xa, %esi
callq 0x8c40
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
xorl %esi, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x1, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq 0x60(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
leaq 0x184f8(%rip), %rdi     # 0x29245
callq 0x8800
movq %rax, %r13
movq %rax, %rdi
movl $0x1, %esi
callq 0x8d10
callq 0x8250
movq %rax, 0x68(%rbx)
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x2, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x3, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq 0x68(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl $0x3, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
leaq 0x18497(%rip), %rbp     # 0x292a4
movq %rbp, %rdi
callq 0x80a0
movq %rax, 0x70(%rbx)
movq %rax, %rdi
movl $0x2, %esi
callq 0x8d10
movq 0x70(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x70(%rbx), %rdi
movl $0xa, %esi
callq 0x8c40
movq 0x70(%rbx), %rdi
movl $0x50, %esi
callq 0x8150
leaq 0x18435(%rip), %r15     # 0x29290
leaq -0xa15(%rip), %rdx      # 0x1044d
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x82a0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x4, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq 0x70(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl $0x4, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
leaq 0x1838f(%rip), %rdi     # 0x29250
callq 0x8800
movq %rax, %r13
movq %rax, %rdi
movl $0x1, %esi
callq 0x8d10
callq 0x8250
movq %rax, 0x78(%rbx)
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x5, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x6, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0x5, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq 0x78(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl $0x6, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
movq %rbp, %rdi
callq 0x80a0
movq %rax, 0x80(%rbx)
movq %rax, %rdi
movl $0x2, %esi
callq 0x8d10
movq 0x80(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x80(%rbx), %rdi
movl $0xa, %esi
callq 0x8c40
movq 0x80(%rbx), %rdi
movl $0x50, %esi
callq 0x8150
leaq -0xb7b(%rip), %rdx      # 0x10459
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x82a0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x7, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq 0x80(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl $0x7, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
leaq 0x18233(%rip), %rdi     # 0x29269
callq 0x8800
movq %rax, %r13
movq %rax, %rdi
movl $0x1, %esi
callq 0x8d10
callq 0x8280
movq %rax, 0x88(%rbx)
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x88(%rbx), %rdi
movl $0xa, %esi
callq 0x8c40
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x8, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x9, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0x8, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq 0x88(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl $0x9, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
leaq 0x1858d(%rip), %rdi     # 0x2969a
callq 0x8800
movq %rax, %rbp
movq %rax, %rdi
movl $0x1, %esi
callq 0x8d10
callq 0x8fb0
movq %rax, 0x90(%rbx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x8920
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq %r13, %rdi
movq (%rsp), %r15
movq %r15, %rsi
callq 0x8150
movq 0x90(%rbx), %rsi
movq %rax, %rdi
callq 0x8ef0
movq 0x90(%rbx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x4b, %edx
callq 0x9070
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x4b, %edx
callq 0x9070
movq %r13, %rdi
movl $0xa, %esi
callq 0x8c40
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0xa, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0xb, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %rbp, %rsi
xorl %edx, %edx
movl $0xa, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0xb, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
leaq 0x18086(%rip), %rdi     # 0x292b4
callq 0x8680
movq %rax, 0x98(%rbx)
movq %rax, %rdi
movl $0xa, %esi
callq 0x8c40
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0xc, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq 0x98(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl $0xc, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
callq 0x8c10
movq %rax, %rbp
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq %rbp, %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
xorl %esi, %esi
callq 0x82e0
leaq 0x18003(%rip), %rdi     # 0x292c9
callq 0x80a0
movq %rax, 0xa0(%rbx)
movq %rax, %rdi
movl $0x1, %esi
callq 0x8d10
movq 0xa0(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0xa0(%rbx), %rdi
movl $0x50, %esi
callq 0x8150
leaq -0x2cc0(%rip), %rdx     # 0xe64c
movq %rax, %rdi
leaq 0x17f7a(%rip), %r13     # 0x29290
movq %r13, %rsi
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x82a0
movq %rbp, %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
xorl %esi, %esi
callq 0x8710
movq %rbp, %rdi
movq %r12, %rsi
callq 0x8150
movq 0xa0(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
leaq 0x17f2b(%rip), %rdi     # 0x29298
movl $0x4, %esi
callq 0x8d20
movq %rax, 0xa8(%rbx)
movq %rax, %rdi
movl $0x2, %esi
callq 0x8d10
movq 0xa8(%rbx), %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0xa8(%rbx), %rdi
movl $0x50, %esi
callq 0x8150
leaq -0x1e92(%rip), %rdx     # 0xf529
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x82a0
movq %rbp, %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x1, %esi
callq 0x8710
movq %rbp, %rdi
movq %r12, %rsi
callq 0x8150
movq 0xa8(%rbx), %rsi
movq %rax, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movl $0xd, %esi
callq 0x82e0
movq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rax, %rdi
movq %rbp, %rsi
xorl %edx, %edx
movl $0xd, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
xorl %edi, %edi
xorl %esi, %esi
callq 0x8920
movq %rax, 0x30(%rbx)
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x30(%rbx), %rdi
leaq 0x17dab(%rip), %rsi     # 0x2922e
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8f30
movq 0x30(%rbx), %rdi
xorl %esi, %esi
callq 0x8d10
movq 0x30(%rbx), %rdi
xorl %esi, %esi
callq 0x8e90
movq 0x30(%rbx), %rdi
movl $0x12c, %esi            # imm = 0x12C
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x9070
movq 0x30(%rbx), %rdi
movq %r15, %rsi
callq 0x8150
movq 0x28(%rbx), %rsi
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8ef0