// File: /workspace/github_c_makefile_star2_O0/kaugm[P]mmwm/mmwm.c
// Function: setup_display
static void setup_display(void)
{
    desktops.head = desktops.tail = NULL;
    for (int d = 0; d < DESKTOPS; d++) {
        desktop *desk;
        if (!(desk = calloc(1, sizeof(desktop))))
            err(EXIT_FAILURE, "cannot allocate desktop");
        add_tail(&desktops, &desk->link);
        desk->monitors.master = desk;
        desk->num = d;

        for (int m = 0; m < MONITORS; m++) {
            monitor *moni;
            display *disp;
            if (!(moni = calloc(1, sizeof(monitor))))
                err(EXIT_FAILURE, "cannot allocate monitor");
            add_tail(&desk->monitors, &moni->link);
            moni->displays.master = moni;

/* TODO: multi monitor support */
            moni->num = m;
            moni->ww = screen->width_in_pixels;
            moni->wh = screen->height_in_pixels;
#ifndef EWMH_TASKBAR
            moni->wh -= PANEL_HEIGHT;
#endif /* EWMH_TASKBAR */

/* each monitor gets 1 default display. */
            if (!(disp = calloc(1, sizeof(display))))
                err(EXIT_FAILURE, "cannot allocate display");
            add_tail(&moni->displays, &disp->link);
            disp->clients.master = disp;

            /* disp->di.master_size = MASTER_SIZE; */
            disp->di.gaps = USELESSGAP;
            disp->di.mode = TILE;
            disp->di.showpanel = SHOW_PANEL;
            disp->di.invert = INVERT;
        }
    }
    current_desktop = (desktop *)get_head(&desktops);
    current_monitor = (monitor *)get_head(&current_desktop->monitors);
    current_display = (display *)get_head(&current_monitor->displays);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq $0x0, 0x769d(%rip) # 0xd810
movq $0x0, 0x768a(%rip) # 0xd808
movl $0x0, -0x4(%rbp)
cmpl $0xa, -0x4(%rbp)
jge 0x6303
movl $0x1, %edi
movl $0x38, %esi
callq 0x3300
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x61bb
movl $0x1, %edi
leaq 0x3ff7(%rip), %rsi      # 0xa1ab
movb $0x0, %al
callq 0x3400
movq -0x10(%rbp), %rsi
leaq 0x7642(%rip), %rdi      # 0xd808
callq 0x56a0
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jge 0x62f3
movl $0x1, %edi
movl $0x40, %esi
callq 0x3300
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x621e
movl $0x1, %edi
leaq 0x3fac(%rip), %rsi      # 0xa1c3
movb $0x0, %al
callq 0x3400
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rsi
callq 0x56a0
movq -0x20(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x30(%rax)
movq 0x7574(%rip), %rax      # 0xd7c0
movzwl 0x14(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x34(%rax)
movq 0x7562(%rip), %rax      # 0xd7c0
movzwl 0x16(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x20(%rbp), %rax
movl 0x38(%rax), %ecx
subl $0x0, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %edi
movl $0x70, %esi
callq 0x3300
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x62a2
movl $0x1, %edi
leaq 0x3f40(%rip), %rsi      # 0xa1db
movb $0x0, %al
callq 0x3400
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x28(%rbp), %rsi
callq 0x56a0
movq -0x28(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rax
movl $0x80, 0x64(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x5c(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x68(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x69(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x61e8
jmp 0x62f5
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x6185
leaq 0x74fe(%rip), %rdi      # 0xd808
callq 0x54c0
movq %rax, 0x74ea(%rip)      # 0xd800
movq 0x74e3(%rip), %rdi      # 0xd800
addq $0x18, %rdi
callq 0x54c0
movq %rax, 0x74ab(%rip)      # 0xd7d8
movq 0x74a4(%rip), %rdi      # 0xd7d8
addq $0x18, %rdi
callq 0x54c0
movq %rax, 0x748c(%rip)      # 0xd7d0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)