// File: /workspace/github_c_makefile_star2_O0/kaugm[P]mmwm/mmwm.c
// Function: stack
void stack(int hh, int cy)
{
    client *c = NULL, *t = NULL; bool b = M_MODE;
    int n = 0, d = 0, z = b ? M_WW : hh,
        ma = M_WW * MASTER_SIZE + M_MASTER_SIZE;

    /* count stack windows and grab first non-floating, non-maximize window */
    for (t = M_HEAD; t; t = M_GETNEXT(t)) {
        if (!ISFMFTM(t)) {
            if (c)
                ++n;
            else
                c = t;
        }
    }

    /*
     * if there is only one window, it should cover the available screen space
     * if there is only one stack window (n == 1) then we don't care about
     * growth if more than one stack windows (n > 1) on screen then adjustments
     * may be needed
     *   - d is the num of pixels than remain when spliting
     *   the available width/height to the number of windows
     *   - z is the clients' height/width
     *
     *      ----------  -.    --------------------.
     *      |   |----| --|--> growth               `}--> first client will get
     *      |   |    |   |                          |    (z+d) height/width
     *      |   |----|   }--> screen height - hh  --'
     *      |   |    | }-|--> client height - z
     *      ----------  -'
     *
     *     ->  piece of art by c00kiemon5ter o.O om nom nom nom nom
     *
     *     what we do is, remove the growth from the screen height   : (z -
     *     growth) and then divide that space with the windows on the stack  :
     *     (z - growth)/n so all windows have equal height/width (z)
     *     : growth is left out and will later be added to the first's client
     *     height/width before that, there will be cases when the num of
     *     windows is not perfectly divided with then available screen
     *     height/width (ie 100px scr. height, and 3 windows) so we get that
     *     remaining space and merge growth to it (d) : (z - growth) % n +
     *     growth finally we know each client's height, and how many pixels
     *     should be added to the first stack window so that it satisfies
     *     growth, and doesn't create gaps
     *     on the bottom of the screen.
     */
    if (!c) {
        return;
    } else if (!n) {
        int borders = client_borders(c);
        xcb_move_resize(dis, c->win, M_GAPS, cy + M_GAPS,
                        M_WW - 2 * (borders + M_GAPS),
                        hh - 2 * (borders + M_GAPS), &c->position_info);
        return;
    } else if (n > 1) {
        d = (z - M_GROWTH) % n + M_GROWTH; z = (z - M_GROWTH) / n;
    }

    /* tile the first non-floating, non-maximize window to cover the master area */
    int borders = client_borders(c);
    if (b)
        xcb_move_resize(dis, c->win, M_GAPS,
                        M_INVERT ? (cy + hh - ma + M_GAPS) : (cy + M_GAPS),
                        M_WW - 2 * (borders + M_GAPS),
                        ma - 2 * (borders + M_GAPS), &c->position_info);
    else
        xcb_move_resize(dis, c->win, M_INVERT ? (M_WW - ma + M_GAPS) : M_GAPS,
                        cy + M_GAPS,
                        ma - 2 * (borders + M_GAPS),
                        hh - 2 * (borders + M_GAPS), &c->position_info);

    /* tile the next non-floating, non-maximize (first) stack window with growth|d */
    for (c = M_GETNEXT(c); c && ISFMFTM(c); c = M_GETNEXT(c));
    borders = client_borders(c);
    int cx = b ? 0 : (M_INVERT ? M_GAPS : ma),
        cw = (b ? hh : M_WW) - 2 * borders - ma - M_GAPS,
        ch = z - 2 * borders - M_GAPS;
    if (b)
        xcb_move_resize(dis, c->win, cx += M_GAPS, cy += M_INVERT ? M_GAPS : ma,
                        ch - M_GAPS + d, cw, &c->position_info);
    else
        xcb_move_resize(dis, c->win, cx, cy += M_GAPS, cw, ch - M_GAPS + d, &c->position_info);

    /* tile the rest of the non-floating, non-maximize stack windows */
    for (b ? (cx += z + d - M_GAPS) : (cy += z + d - M_GAPS),
         c = M_GETNEXT(c); c; c = M_GETNEXT(c)) {
        if (ISFMFTM(c))
            continue;
        if (b) {
            xcb_move_resize(dis, c->win, cx, cy, ch, cw, &c->position_info); cx += z;
        } else {
            xcb_move_resize(dis, c->win, cx, cy, cw, ch, &c->position_info); cy += z;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq 0x7e08(%rip), %rax      # 0xd7d0
cmpl $0x0, 0x5c(%rax)
setne %al
andb $0x1, %al
movb %al, -0x19(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
testb $0x1, -0x19(%rbp)
je 0x59f7
movq 0x7de9(%rip), %rax      # 0xd7d8
movl 0x34(%rax), %eax
movl %eax, -0x44(%rbp)
jmp 0x59fd
movl -0x4(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x28(%rbp)
movq 0x7dce(%rip), %rax      # 0xd7d8
cvtsi2sdl 0x34(%rax), %xmm0
movq 0x7dba(%rip), %rax      # 0xd7d0
movss 0x58(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x45e1(%rip), %xmm2     # 0xa008
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x2c(%rbp)
movq 0x7d93(%rip), %rax      # 0xd7d0
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5ac1
movq -0x18(%rbp), %rax
testb $0x1, 0x1b(%rax)
jne 0x5ab0
movq -0x18(%rbp), %rax
testb $0x1, 0x1c(%rax)
jne 0x5ab0
movq -0x18(%rbp), %rax
testb $0x1, 0x1a(%rax)
jne 0x5ab0
movq -0x18(%rbp), %rax
testb $0x1, 0x19(%rax)
jne 0x5ab0
movq -0x18(%rbp), %rax
testb $0x1, 0x1d(%rax)
jne 0x5ab0
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
movq 0x7d2c(%rip), %rcx      # 0xd7b8
cmpl 0x104(%rcx), %eax
jne 0x5ab0
cmpq $0x0, -0x10(%rbp)
je 0x5aa6
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x5aae
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x5ab0
jmp 0x5ab2
movq -0x18(%rbp), %rdi
callq 0x5490
movq %rax, -0x18(%rbp)
jmp 0x5a45
cmpq $0x0, -0x10(%rbp)
jne 0x5acd
jmp 0x6032
cmpl $0x0, -0x20(%rbp)
jne 0x5b4f
movq -0x10(%rbp), %rdi
callq 0x57c0
movl %eax, -0x30(%rbp)
movq 0x7cba(%rip), %rdi      # 0xd7a0
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
movq 0x7cdc(%rip), %rax      # 0xd7d0
movl 0x64(%rax), %edx
movl -0x8(%rbp), %ecx
movq 0x7ccf(%rip), %rax      # 0xd7d0
addl 0x64(%rax), %ecx
movq 0x7ccd(%rip), %rax      # 0xd7d8
movl 0x34(%rax), %r8d
movl -0x30(%rbp), %eax
movq 0x7cb7(%rip), %r9       # 0xd7d0
addl 0x64(%r9), %eax
shll %eax
subl %eax, %r8d
movl -0x4(%rbp), %r9d
movl -0x30(%rbp), %eax
movq 0x7ca0(%rip), %r10      # 0xd7d0
addl 0x64(%r10), %eax
shll %eax
subl %eax, %r9d
movq -0x10(%rbp), %rax
addq $0x30, %rax
movq %rax, (%rsp)
callq 0x3cd0
jmp 0x6032
cmpl $0x1, -0x20(%rbp)
jle 0x5b87
movl -0x28(%rbp), %eax
movq 0x7c71(%rip), %rcx      # 0xd7d0
subl 0x60(%rcx), %eax
cltd
idivl -0x20(%rbp)
movq 0x7c63(%rip), %rax      # 0xd7d0
addl 0x60(%rax), %edx
movl %edx, -0x24(%rbp)
movl -0x28(%rbp), %eax
movq 0x7c53(%rip), %rcx      # 0xd7d0
subl 0x60(%rcx), %eax
cltd
idivl -0x20(%rbp)
movl %eax, -0x28(%rbp)
jmp 0x5b89
jmp 0x5b8b
movq -0x10(%rbp), %rdi
callq 0x57c0
movl %eax, -0x34(%rbp)
testb $0x1, -0x19(%rbp)
je 0x5c50
movq 0x7bf8(%rip), %rax      # 0xd7a0
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x4c(%rbp)
movq 0x7c13(%rip), %rax      # 0xd7d0
movl 0x64(%rax), %eax
movl %eax, -0x48(%rbp)
movq 0x7c06(%rip), %rax      # 0xd7d0
testb $0x1, 0x69(%rax)
je 0x5be8
movl -0x8(%rbp), %eax
addl -0x4(%rbp), %eax
subl -0x2c(%rbp), %eax
movq 0x7bf0(%rip), %rcx      # 0xd7d0
addl 0x64(%rcx), %eax
movl %eax, -0x5c(%rbp)
jmp 0x5bf8
movl -0x8(%rbp), %eax
movq 0x7bde(%rip), %rcx      # 0xd7d0
addl 0x64(%rcx), %eax
movl %eax, -0x5c(%rbp)
movl -0x48(%rbp), %edx
movl -0x4c(%rbp), %esi
movq -0x58(%rbp), %rdi
movl -0x5c(%rbp), %ecx
movq 0x7bcc(%rip), %rax      # 0xd7d8
movl 0x34(%rax), %r8d
movl -0x34(%rbp), %eax
movq 0x7bb6(%rip), %r9       # 0xd7d0
addl 0x64(%r9), %eax
shll %eax
subl %eax, %r8d
movl -0x2c(%rbp), %r9d
movl -0x34(%rbp), %eax
movq 0x7b9f(%rip), %r10      # 0xd7d0
addl 0x64(%r10), %eax
shll %eax
subl %eax, %r9d
movq -0x10(%rbp), %rax
addq $0x30, %rax
movq %rax, (%rsp)
callq 0x3cd0
jmp 0x5cf1
movq 0x7b49(%rip), %rax      # 0xd7a0
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x60(%rbp)
movq 0x7b64(%rip), %rax      # 0xd7d0
testb $0x1, 0x69(%rax)
je 0x5c8e
movq 0x7b5f(%rip), %rax      # 0xd7d8
movl 0x34(%rax), %eax
subl -0x2c(%rbp), %eax
movq 0x7b4a(%rip), %rcx      # 0xd7d0
addl 0x64(%rcx), %eax
movl %eax, -0x6c(%rbp)
jmp 0x5c9b
movq 0x7b3b(%rip), %rax      # 0xd7d0
movl 0x64(%rax), %eax
movl %eax, -0x6c(%rbp)
movl -0x60(%rbp), %esi
movq -0x68(%rbp), %rdi
movl -0x6c(%rbp), %edx
movl -0x8(%rbp), %ecx
movq 0x7b21(%rip), %rax      # 0xd7d0
addl 0x64(%rax), %ecx
movl -0x2c(%rbp), %r8d
movl -0x34(%rbp), %eax
movq 0x7b10(%rip), %r9       # 0xd7d0
addl 0x64(%r9), %eax
shll %eax
subl %eax, %r8d
movl -0x4(%rbp), %r9d
movl -0x34(%rbp), %eax
movq 0x7af9(%rip), %r10      # 0xd7d0
addl 0x64(%r10), %eax
shll %eax
subl %eax, %r9d
movq -0x10(%rbp), %rax
addq $0x30, %rax
movq %rax, (%rsp)
callq 0x3cd0
movq -0x10(%rbp), %rdi
callq 0x5490
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x6d(%rbp)
je 0x5d75
movq -0x10(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x1b(%rcx)
movb %al, -0x6e(%rbp)
jne 0x5d6f
movq -0x10(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x1c(%rcx)
movb %al, -0x6e(%rbp)
jne 0x5d6f
movq -0x10(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x1a(%rcx)
movb %al, -0x6e(%rbp)
jne 0x5d6f
movq -0x10(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x19(%rcx)
movb %al, -0x6e(%rbp)
jne 0x5d6f
movq -0x10(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x1d(%rcx)
movb %al, -0x6e(%rbp)
jne 0x5d6f
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movq 0x7a55(%rip), %rcx      # 0xd7b8
cmpl 0x104(%rcx), %eax
setne %al
movb %al, -0x6e(%rbp)
movb -0x6e(%rbp), %al
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0x5d7e
jmp 0x5d92
jmp 0x5d80
movq -0x10(%rbp), %rdi
callq 0x5490
movq %rax, -0x10(%rbp)
jmp 0x5cfe
movq -0x10(%rbp), %rdi
callq 0x57c0
movl %eax, -0x34(%rbp)
testb $0x1, -0x19(%rbp)
je 0x5dab
xorl %eax, %eax
movl %eax, -0x74(%rbp)
jmp 0x5dd3
movq 0x7a1e(%rip), %rax      # 0xd7d0
testb $0x1, 0x69(%rax)
je 0x5dc7
movq 0x7a11(%rip), %rax      # 0xd7d0
movl 0x64(%rax), %eax
movl %eax, -0x78(%rbp)
jmp 0x5dcd
movl -0x2c(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x38(%rbp)
testb $0x1, -0x19(%rbp)
je 0x5de7
movl -0x4(%rbp), %eax
movl %eax, -0x7c(%rbp)
jmp 0x5df4
movq 0x79ea(%rip), %rax      # 0xd7d8
movl 0x34(%rax), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movl -0x34(%rbp), %ecx
shll %ecx
subl %ecx, %eax
subl -0x2c(%rbp), %eax
movq 0x79c8(%rip), %rcx      # 0xd7d0
subl 0x64(%rcx), %eax
movl %eax, -0x3c(%rbp)
movl -0x28(%rbp), %eax
movl -0x34(%rbp), %ecx
shll %ecx
subl %ecx, %eax
movq 0x79b1(%rip), %rcx      # 0xd7d0
subl 0x64(%rcx), %eax
movl %eax, -0x40(%rbp)
testb $0x1, -0x19(%rbp)
je 0x5ecb
movq 0x796a(%rip), %rax      # 0xd7a0
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x84(%rbp)
movq 0x797f(%rip), %rax      # 0xd7d0
movl 0x64(%rax), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x80(%rbp)
movl %eax, -0x38(%rbp)
movq 0x796c(%rip), %rax      # 0xd7d0
testb $0x1, 0x69(%rax)
je 0x5e7c
movq 0x795f(%rip), %rax      # 0xd7d0
movl 0x64(%rax), %eax
movl %eax, -0x94(%rbp)
jmp 0x5e85
movl -0x2c(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x80(%rbp), %edx
movl -0x84(%rbp), %esi
movq -0x90(%rbp), %rdi
movl -0x94(%rbp), %ecx
addl -0x8(%rbp), %ecx
movl %ecx, -0x8(%rbp)
movl -0x40(%rbp), %r8d
movq 0x7924(%rip), %rax      # 0xd7d0
subl 0x64(%rax), %r8d
addl -0x24(%rbp), %r8d
movl -0x3c(%rbp), %r9d
movq -0x10(%rbp), %rax
addq $0x30, %rax
movq %rax, (%rsp)
callq 0x3cd0
jmp 0x5f14
movq 0x78ce(%rip), %rdi      # 0xd7a0
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
movl -0x38(%rbp), %edx
movq 0x78ed(%rip), %rax      # 0xd7d0
movl 0x64(%rax), %ecx
addl -0x8(%rbp), %ecx
movl %ecx, -0x8(%rbp)
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movq 0x78d5(%rip), %rax      # 0xd7d0
subl 0x64(%rax), %r9d
addl -0x24(%rbp), %r9d
movq -0x10(%rbp), %rax
addq $0x30, %rax
movq %rax, (%rsp)
callq 0x3cd0
testb $0x1, -0x19(%rbp)
je 0x5f32
movl -0x28(%rbp), %eax
addl -0x24(%rbp), %eax
movq 0x78a9(%rip), %rcx      # 0xd7d0
subl 0x64(%rcx), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x5f48
movl -0x28(%rbp), %eax
addl -0x24(%rbp), %eax
movq 0x7891(%rip), %rcx      # 0xd7d0
subl 0x64(%rcx), %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5490
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6032
movq -0x10(%rbp), %rax
testb $0x1, 0x1b(%rax)
jne 0x5fa8
movq -0x10(%rbp), %rax
testb $0x1, 0x1c(%rax)
jne 0x5fa8
movq -0x10(%rbp), %rax
testb $0x1, 0x1a(%rax)
jne 0x5fa8
movq -0x10(%rbp), %rax
testb $0x1, 0x19(%rax)
jne 0x5fa8
movq -0x10(%rbp), %rax
testb $0x1, 0x1d(%rax)
jne 0x5fa8
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movq 0x7818(%rip), %rcx      # 0xd7b8
cmpl 0x104(%rcx), %eax
je 0x5faa
jmp 0x6020
testb $0x1, -0x19(%rbp)
je 0x5fe8
movq 0x77e9(%rip), %rdi      # 0xd7a0
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
movl -0x38(%rbp), %edx
movl -0x8(%rbp), %ecx
movl -0x40(%rbp), %r8d
movl -0x3c(%rbp), %r9d
movq -0x10(%rbp), %rax
addq $0x30, %rax
movq %rax, (%rsp)
callq 0x3cd0
movl -0x28(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x601e
movq 0x77b1(%rip), %rdi      # 0xd7a0
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
movl -0x38(%rbp), %edx
movl -0x8(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movq -0x10(%rbp), %rax
addq $0x30, %rax
movq %rax, (%rsp)
callq 0x3cd0
movl -0x28(%rbp), %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
jmp 0x6020
movq -0x10(%rbp), %rdi
callq 0x5490
movq %rax, -0x10(%rbp)
jmp 0x5f55
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)