// File: /workspace/github_c_makefile_star2_O0/kaugm[P]mmwm/mmwm.c
// Function: adjust_gaps
void adjust_gaps()
{
    int gaps = M_GAPS;
    int n = 0;
	client *c = NULL, *t = NULL;

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

    if (gaps > 0) {
        if (n < 1) {
            borders -= BORDER_WIDTH;
        }
        gaps -= USELESSGAP;
    }
    else {
        gaps = USELESSGAP;
        borders = BORDER_WIDTH;
    }


    /*if (arg->i > 0 || gaps >= -arg->i)
        gaps += arg->i;
    else
        return;*/

    if (GLOBALGAPS) {
        desktop *desk;
        for (desk = (desktop *)get_head(&desktops); desk; desk = (desktop *)get_next(&desk->link)) {
            monitor *moni;
            for (moni = (monitor *)get_head(&desk->monitors); moni; moni = (monitor *)get_next(&moni->link)) {
                display *disp;
                for (disp = (display *)get_head(&moni->displays); disp; disp = (display *)get_next(&disp->link)) {
                    disp->di.gaps = gaps;
                }
            }
        }
    }
    else
        M_GAPS = gaps;

    tile();
    update_current(M_CURRENT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x5351(%rip), %rax      # 0xd7d0
movl 0x64(%rax), %eax
movl %eax, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq 0x532d(%rip), %rax      # 0xd7d0
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x851d
movq -0x18(%rbp), %rax
testb $0x1, 0x1b(%rax)
jne 0x850c
movq -0x18(%rbp), %rax
testb $0x1, 0x1c(%rax)
jne 0x850c
movq -0x18(%rbp), %rax
testb $0x1, 0x19(%rax)
jne 0x850c
movq -0x18(%rbp), %rax
testb $0x1, 0x1d(%rax)
jne 0x850c
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
movq 0x52d0(%rip), %rcx      # 0xd7b8
cmpl 0x104(%rcx), %eax
jne 0x850c
cmpq $0x0, -0x10(%rbp)
je 0x8502
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x850a
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x850c
jmp 0x850e
movq -0x18(%rbp), %rdi
callq 0x5490
movq %rax, -0x18(%rbp)
jmp 0x84ab
cmpl $0x0, -0x4(%rbp)
jle 0x8545
cmpl $0x1, -0x8(%rbp)
jge 0x8538
movl 0x5311(%rip), %eax      # 0xd840
subl $0x0, %eax
movl %eax, 0x5308(%rip)      # 0xd840
movl -0x4(%rbp), %eax
subl $0x80, %eax
movl %eax, -0x4(%rbp)
jmp 0x8556
movl $0x80, -0x4(%rbp)
movl $0x0, 0x52ea(%rip)      # 0xd840
leaq 0x52ab(%rip), %rdi      # 0xd808
callq 0x54c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x85d8
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
callq 0x54c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x85c7
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
callq 0x54c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x85b6
movl -0x4(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x30(%rbp), %rdi
callq 0x5490
movq %rax, -0x30(%rbp)
jmp 0x8596
jmp 0x85b8
movq -0x28(%rbp), %rdi
callq 0x5490
movq %rax, -0x28(%rbp)
jmp 0x857e
jmp 0x85c9
movq -0x20(%rbp), %rdi
callq 0x5490
movq %rax, -0x20(%rbp)
jmp 0x8566
callq 0x57f0
movq 0x51ec(%rip), %rax      # 0xd7d0
movq 0x30(%rax), %rdi
callq 0x4010
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)