// File: /workspace/github_c_makefile_star2_O0/tkln[P]mcwm/mcwm.c
// Function: configwin
void configwin(xcb_window_t win, uint16_t mask, struct winconf wc)
{
    uint32_t values[7];
    int i = -1;
    
    if (mask & XCB_CONFIG_WINDOW_X)
    {
        mask |= XCB_CONFIG_WINDOW_X;
        i ++;
        values[i] = wc.x;
    }

    if (mask & XCB_CONFIG_WINDOW_Y)
    {
        mask |= XCB_CONFIG_WINDOW_Y;
        i ++;
        values[i] = wc.y;
    }

    if (mask & XCB_CONFIG_WINDOW_WIDTH)
    {
        mask |= XCB_CONFIG_WINDOW_WIDTH;
        i ++;
        values[i] = wc.width;
    }

    if (mask & XCB_CONFIG_WINDOW_HEIGHT)
    {
        mask |= XCB_CONFIG_WINDOW_HEIGHT;
        i ++;
        values[i] = wc.height;
    }

    if (mask & XCB_CONFIG_WINDOW_SIBLING)
    {
        mask |= XCB_CONFIG_WINDOW_SIBLING;
        i ++;
        values[i] = wc.sibling;     
    }

    if (mask & XCB_CONFIG_WINDOW_STACK_MODE)
    {
        mask |= XCB_CONFIG_WINDOW_STACK_MODE;
        i ++;
        values[i] = wc.stackmode;
    }

    if (-1 != i)
    {
        xcb_configure_window(conn, win, mask, values);
        xcb_flush(conn);
    }        
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
leaq 0x10(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movl %edi, -0x4(%rbp)
movw %ax, -0x6(%rbp)
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movzwl -0x6(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x9290
movq -0x40(%rbp), %rax
movzwl -0x6(%rbp), %ecx
orl $0x1, %ecx
movw %cx, -0x6(%rbp)
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x34(%rbp)
movswl (%rax), %ecx
movslq -0x34(%rbp), %rax
movl %ecx, -0x30(%rbp,%rax,4)
movzwl -0x6(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x92c0
movq -0x40(%rbp), %rax
movzwl -0x6(%rbp), %ecx
orl $0x2, %ecx
movw %cx, -0x6(%rbp)
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x34(%rbp)
movswl 0x2(%rax), %ecx
movslq -0x34(%rbp), %rax
movl %ecx, -0x30(%rbp,%rax,4)
movzwl -0x6(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x92f0
movq -0x40(%rbp), %rax
movzwl -0x6(%rbp), %ecx
orl $0x4, %ecx
movw %cx, -0x6(%rbp)
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x34(%rbp)
movzwl 0x4(%rax), %ecx
movslq -0x34(%rbp), %rax
movl %ecx, -0x30(%rbp,%rax,4)
movzwl -0x6(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x9320
movq -0x40(%rbp), %rax
movzwl -0x6(%rbp), %ecx
orl $0x8, %ecx
movw %cx, -0x6(%rbp)
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x34(%rbp)
movzwl 0x6(%rax), %ecx
movslq -0x34(%rbp), %rax
movl %ecx, -0x30(%rbp,%rax,4)
movzwl -0x6(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x934f
movq -0x40(%rbp), %rax
movzwl -0x6(%rbp), %ecx
orl $0x20, %ecx
movw %cx, -0x6(%rbp)
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x34(%rbp)
movl 0xc(%rax), %ecx
movslq -0x34(%rbp), %rax
movl %ecx, -0x30(%rbp,%rax,4)
movzwl -0x6(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x937f
movq -0x40(%rbp), %rax
movzwl -0x6(%rbp), %ecx
orl $0x40, %ecx
movw %cx, -0x6(%rbp)
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x34(%rbp)
movzbl 0x8(%rax), %ecx
movslq -0x34(%rbp), %rax
movl %ecx, -0x30(%rbp,%rax,4)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0x34(%rbp), %eax
je 0x93b2
movq 0x45e8(%rip), %rdi      # 0xd978
movl -0x4(%rbp), %esi
movw -0x6(%rbp), %ax
leaq -0x30(%rbp), %rcx
movzwl %ax, %edx
callq 0x3200
movl %eax, -0x38(%rbp)
movq 0x45cb(%rip), %rdi      # 0xd978
callq 0x3140
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)