// File: eiskalteschatten[P]developersnotebook/src/views/DashboardView.cpp
// Function: DashboardView::setup_projects_ending_soon()
void DashboardView::setup_projects_ending_soon() {
    projects_ending_soon_list_store = gtk_list_store_new(N_COLUMNS,
                                                         G_TYPE_STRING,
                                                         G_TYPE_STRING,
                                                         G_TYPE_STRING);

    projects_ending_soon_tree_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(projects_ending_soon_list_store));

    projects_ending_soon_scrolled_window = gtk_scrolled_window_new(NULL, NULL);
    g_object_set(projects_ending_soon_scrolled_window, "hexpand", TRUE, NULL);
    g_object_set(projects_ending_soon_scrolled_window, "vexpand", TRUE, NULL);
    gtk_widget_set_halign(projects_ending_soon_scrolled_window, GTK_ALIGN_FILL);
    gtk_widget_set_valign(projects_ending_soon_scrolled_window, GTK_ALIGN_FILL);
    gtk_container_add(GTK_CONTAINER(projects_ending_soon_scrolled_window), projects_ending_soon_tree_view);

    GtkCellRenderer *text_renderer = gtk_cell_renderer_text_new();

    // ID Column
    {
        GtkTreeViewColumn *id_column = gtk_tree_view_column_new_with_attributes("Id", text_renderer, "text", ID_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(projects_ending_soon_tree_view), id_column);
        gtk_tree_view_column_set_visible(id_column, FALSE);
    }

    // Name Column
    {
        GtkTreeViewColumn *name_column = gtk_tree_view_column_new_with_attributes("Name", text_renderer, "text", NAME_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(projects_ending_soon_tree_view), name_column);
        gtk_tree_view_column_set_sort_column_id(name_column, SORT_NAME_COLUMN);
        gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(projects_ending_soon_list_store), SORT_NAME_COLUMN, sort_by_string, GINT_TO_POINTER(NAME_COLUMN), NULL);
    }

    // End Date Column
    {
        GtkTreeViewColumn *end_date_column = gtk_tree_view_column_new_with_attributes("End Date", text_renderer, "text", END_DATE_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(projects_ending_soon_tree_view), end_date_column);
        gtk_tree_view_column_set_sort_column_id(end_date_column, SORT_END_DATE_COLUMN);
        gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(projects_ending_soon_list_store), SORT_END_DATE_COLUMN, sort_by_date, GINT_TO_POINTER(END_DATE_COLUMN), NULL);
    }

    gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(projects_ending_soon_list_store), SORT_END_DATE_COLUMN, GTK_SORT_ASCENDING);

    g_signal_connect(projects_ending_soon_tree_view, "row-activated", G_CALLBACK(projects_ending_soon_row_activated), this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x3, %edi
movl $0x40, %ecx
movq %rcx, %rsi
movq %rcx, %rdx
movb $0x0, %al
callq 0xab40
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movq 0x20(%rax), %rax
movq %rax, -0x70(%rbp)
callq 0xa6d0
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
callq 0xb3d0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0xab80
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rax), %rdi
leaq 0x36e15(%rip), %rsi     # 0x53459
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0xb230
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x36dfe(%rip), %rsi     # 0x53461
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0xb230
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0xaff0
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0xb190
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
callq 0xac10
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xb1e0
callq 0xa4b0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x36d97(%rip), %rdi     # 0x53469
leaq 0x36d93(%rip), %rdx     # 0x5346c
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
callq 0xb0e0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0xad90
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xadf0
movq -0x10(%rbp), %rsi
leaq 0x36c65(%rip), %rdi     # 0x53392
leaq 0x36d38(%rip), %rdx     # 0x5346c
movl $0x1, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
callq 0xb0e0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0xad90
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xab60
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
callq 0xa310
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
xorl %esi, %esi
leaq -0x1ad9(%rip), %rdx     # 0x1acd0
movl $0x1, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xade0
movq -0x10(%rbp), %rsi
leaq 0x36cc0(%rip), %rdi     # 0x53483
leaq 0x36ca2(%rip), %rdx     # 0x5346c
movl $0x2, %ecx
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xae30
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
callq 0xb0e0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0xad90
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0xab60
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
callq 0xa310
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movl $0x1, %esi
leaq -0x1a05(%rip), %rdx     # 0x1ae40
movl $0x2, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xade0
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
callq 0xa310
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xa850
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rdi
leaq 0x36e6b(%rip), %rsi     # 0x536fa
leaq -0xcf6(%rip), %rdx      # 0x1bba0
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0xa380
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)