// File: /workspace/github_cpp_makefile_star2_O1/eiskalteschatten[P]developersnotebook/src/windows/MainWindow.cpp
// Function: MainWindow::setup_stack()
void MainWindow::setup_stack() {
    // Views for the stack
    dashboard_view                   = new DashboardView(this);
    GtkWidget *dashboard_view_widget = dashboard_view->get_widget();

    projects_view                   = new ProjectsView(window);
    GtkWidget *projects_view_widget = projects_view->get_widget();

    // Stack
    stack = gtk_stack_new();
    gtk_stack_set_homogeneous(GTK_STACK(stack), TRUE);
    gtk_widget_set_hexpand(stack, TRUE);
    gtk_widget_set_vexpand(stack, TRUE);

    // Sidebar
    GtkWidget *sidebar = gtk_stack_sidebar_new();
    gtk_stack_sidebar_set_stack(GTK_STACK_SIDEBAR(sidebar), GTK_STACK(stack));
    gtk_widget_set_vexpand(sidebar, TRUE);
    gtk_widget_set_name(sidebar, "main-sidebar");
    gtk_container_foreach(GTK_CONTAINER(sidebar), (GtkCallback)style_sidebar_children, NULL);

    // Add the elements to the stack
    gtk_stack_add_titled(GTK_STACK(stack), dashboard_view_widget, "dashboard", "Dashboard");
    gtk_stack_add_titled(GTK_STACK(stack), projects_view_widget, "projects", "Projects");

    gtk_grid_attach(GTK_GRID(grid), sidebar, 0, 1, 1, 1);
    gtk_grid_attach(GTK_GRID(grid), stack, 1, 1, 1, 1);

    g_signal_connect(stack, "notify::visible-child", G_CALLBACK(refresh_all_sub_views), this);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x30, %edi
callq 0x81a0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x124a8
movq %r14, 0x40(%rbx)
movq 0x8(%r14), %r14
movl $0xb0, %edi
callq 0x81a0
movq %rax, %r15
movq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x10466
movq %r15, 0x48(%rbx)
movq 0x8(%r15), %r15
callq 0x8ec0
movq %rax, %r13
movq %rax, 0x30(%rbx)
callq 0x89e0
movq %rax, %r12
movq %r13, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movl $0x1, %esi
callq 0x8390
movq 0x30(%rbx), %rdi
movl $0x1, %esi
callq 0x8bd0
movq 0x30(%rbx), %rdi
movl $0x1, %esi
callq 0x9060
callq 0x8480
movq %rax, %r13
callq 0x80e0
movq %r13, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rbp
movq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %rbp, %rdi
movq %rax, %rsi
callq 0x8dc0
movq %r13, %rdi
movl $0x1, %esi
callq 0x9060
leaq 0x14d01(%rip), %rsi     # 0x2965c
movq %r13, %rdi
callq 0x8220
callq 0x89c0
movq %r13, %rdi
movq %rax, %rsi
callq 0x8150
leaq 0x1d4(%rip), %rsi       # 0x14b4e
movq %rax, %rdi
xorl %edx, %edx
callq 0x8a70
movq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
leaq 0x14c9f(%rip), %rdx     # 0x29636
leaq 0x14ccb(%rip), %rcx     # 0x29669
movq %rax, %rdi
movq %r14, %rsi
callq 0x87d0
movq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
leaq 0x14a4e(%rip), %rdx     # 0x2940a
leaq 0x14cb0(%rip), %rcx     # 0x29673
movq %rax, %rdi
movq %r15, %rsi
callq 0x87d0
movq 0x28(%rbx), %r14
callq 0x89d0
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
movq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0x8150
movq 0x30(%rbx), %rsi
movq %rax, %rdi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x8ac0
movq 0x30(%rbx), %rdi
leaq 0x14c40(%rip), %rsi     # 0x2967c
leaq -0x813(%rip), %rdx      # 0x14230
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x82a0
movq %rax, %rbx
movl $0xb0, %esi
movq %r15, %rdi
jmp 0x14a77
movq %rax, %rbx
movl $0x30, %esi
movq %r14, %rdi
callq 0x8170
movq %rbx, %rdi
callq 0x87b0