// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x30
popq %rdi
callq 0x81c0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf072
movq %r14, 0x40(%rbx)
movq 0x8(%r14), %rax
movq %rax, (%rsp)
movl $0xb0, %edi
callq 0x81c0
movq %rax, %r15
movq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0xd084
movq %r15, 0x48(%rbx)
movq 0x8(%r15), %r15
callq 0x8ef0
movq %rax, %r13
movq %rax, 0x30(%rbx)
callq 0x8a00
movq %rax, %r12
movq %r13, %rdi
movq %rax, %rsi
callq 0x8150
pushq $0x1
popq %rbp
movq %rax, %rdi
movl %ebp, %esi
callq 0x83a0
movq 0x30(%rbx), %rdi
movl %ebp, %esi
callq 0x8c20
movq 0x30(%rbx), %rdi
movl %ebp, %esi
callq 0x90b0
callq 0x8490
movq %rax, %r13
callq 0x80e0
movq %r13, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %r14
movq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
movq %r14, %rdi
movq %rax, %rsi
callq 0x8e00
movq %r13, %rdi
movl %ebp, %esi
callq 0x90b0
leaq 0x11a68(%rip), %rsi     # 0x22666
movq %r13, %rdi
callq 0x8230
callq 0x89e0
movq %r13, %rdi
movq %rax, %rsi
callq 0x8150
leaq 0x1b4(%rip), %rsi       # 0x10dd1
movq %rax, %rdi
xorl %edx, %edx
callq 0x8aa0
movq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
leaq 0x11a06(%rip), %rdx     # 0x22640
leaq 0x11a32(%rip), %rcx     # 0x22673
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x8810
movq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0x8150
leaq 0x117aa(%rip), %rdx     # 0x2240a
leaq 0x11a16(%rip), %rcx     # 0x2267d
movq %rax, %rdi
movq %r15, %rsi
callq 0x8810
movq 0x28(%rbx), %r14
callq 0x89f0
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl %ebp, %ecx
movl %ebp, %r8d
movl %ebp, %r9d
callq 0x8b00
movq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0x8150
movq 0x30(%rbx), %rsi
movq %rax, %rdi
movl %ebp, %edx
movl %ebp, %ecx
movl %ebp, %r8d
movl %ebp, %r9d
callq 0x8b00
movq 0x30(%rbx), %rdi
leaq 0x119bb(%rip), %rsi     # 0x22686
leaq -0x6be(%rip), %rdx      # 0x10614
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 0x82b0
movq %rax, %rbx
movl $0xb0, %esi
movq %r15, %rdi
jmp 0x10d04
movq %rax, %rbx
pushq $0x30
popq %rsi
movq %r14, %rdi
callq 0x8190
movq %rbx, %rdi
callq 0x87f0
nop