LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Carton32[P]quectel-CM/quectel-qmi-proxy.c
// Function: cleanup_qmi_connection
static void cleanup_qmi_connection(int clientfd) {
    struct qlistnode *con_node, *qmi_node;
    
    qlist_for_each(con_node, &qmi_proxy_connection) {
        QMI_PROXY_CONNECTION *qmi_con = qnode_to_item(con_node, QMI_PROXY_CONNECTION, qnode);

        if (qmi_con->ClientFd == clientfd) {
            while (!qlist_empty(&qmi_con->client_qnode)) {
                QMI_PROXY_CLINET *qmi_client = qnode_to_item(qlist_head(&qmi_con->client_qnode), QMI_PROXY_CLINET, qnode);

                dprintf("xxx ClientFd=%d QMIType=%d ClientId=%d\n", qmi_con->ClientFd, qmi_client->QMIType, qmi_client->ClientId);

                qlist_remove(&qmi_client->qnode);
                free(qmi_client);
            }
           
            qlist_for_each(qmi_node, &qmi_proxy_ctl_msg) {
                QMI_PROXY_MSG *qmi_msg = qnode_to_item(qmi_node, QMI_PROXY_MSG, qnode);

                if (qmi_msg->ClientFd == qmi_con->ClientFd) {
                    qlist_remove(&qmi_msg->qnode);
                    free(qmi_msg);
                    break;
                 }
            }

            dprintf("--- ClientFd=%d\n", qmi_con->ClientFd);    
            close(qmi_con->ClientFd);
            qlist_remove(&qmi_con->qnode);
            free(qmi_con);
            break;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x3f0b(%rip), %rax      # 0x61f0
movq %rax, %rbx
movq (%rbx), %rbx
cmpq %rax, %rbx
je 0x23e2
cmpl %edi, 0x20(%rbx)
jne 0x22e8
leaq 0x10(%rbx), %rbp
movq 0x10(%rbx), %r14
cmpq %r14, %rbp
je 0x235f
leaq 0x104d(%rip), %r15      # 0x335a
leaq 0x2e3c(%rip), %r12      # 0x5150
movq 0x2cb5(%rip), %rax      # 0x4fd0
movq (%rax), %r13
callq 0x133c
movl 0x20(%rbx), %ecx
movzbl 0x10(%r14), %r8d
movzbl 0x11(%r14), %r9d
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1120
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq %r14, %rdi
callq 0x1030
movq 0x10(%rbx), %r14
cmpq %r14, %rbp
jne 0x2314
leaq 0x3e9a(%rip), %rax      # 0x6200
movq %rax, %rdi
movq (%rdi), %rdi
cmpq %rax, %rdi
je 0x238c
movl 0x10(%rdi), %ecx
cmpl 0x20(%rbx), %ecx
jne 0x2369
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
callq 0x1030
movq 0x2c3d(%rip), %rax      # 0x4fd0
movq (%rax), %r14
callq 0x133c
movl 0x20(%rbx), %ecx
leaq 0xfe0(%rip), %rsi       # 0x3385
leaq 0x2da4(%rip), %rdx      # 0x5150
movq %r14, %rdi
xorl %eax, %eax
callq 0x1120
movl 0x20(%rbx), %edi
callq 0x10e0
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Carton32[P]quectel-CM/quectel-qmi-proxy.c
// Function: dump_qmi
static void dump_qmi(PQCQMIMSG pQMI, int fd, const char flag)
{
    if (verbose_debug)
    {
        unsigned i;
        unsigned size = le16toh(pQMI->QMIHdr.Length) + 1;
        printf("%c %d %u: ", flag, fd, size);
        if (size > 16)
            size = 16;
        for (i = 0; i < size; i++)
            printf("%02x ", ((uint8_t *)pQMI)[i]);
        printf("\n");
    }
}

// Assembly:
cmpb $0x1, 0x2dd8(%rip)      # 0x51d0
jne 0x2462
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %eax
movq %rdi, %rbx
movzwl 0x1(%rdi), %ebp
incl %ebp
movzbl %dl, %esi
leaq 0xf96(%rip), %rdi       # 0x33ad
movl %eax, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10c0
cmpl $0x10, %ebp
movl $0x10, %r15d
cmovbl %ebp, %r15d
leaq 0xf82(%rip), %r14       # 0x33b8
xorl %r12d, %r12d
movzbl (%rbx,%r12), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10c0
incq %r12
cmpq %r12, %r15
jne 0x2439
movl $0xa, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1040
retq
// File: /workspace/github_c_makefile_star2_O3/Carton32[P]quectel-CM/quectel-qmi-proxy.c
// Function: send_qmi_to_client
static int send_qmi_to_client(PQCQMIMSG pQMI, int clientFd) {
    struct pollfd pollfds[]= {{clientFd, POLLOUT, 0}};
    ssize_t ret = 0;

    do {
        ret = poll(pollfds, sizeof(pollfds)/sizeof(pollfds[0]), 5000);
    } while (ret == -1 && errno == EINTR && qmi_proxy_quit == 0);

    if (pollfds[0].revents & POLLOUT) {
        ssize_t size = le16toh(pQMI->QMIHdr.Length) + 1;
        ret = write(clientFd, pQMI, size);
        dump_qmi(pQMI, clientFd, 'w');
    }

    return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq %rsp, %r14
movl %edi, (%r14)
movl $0x4, 0x4(%r14)
movl $0x1, %esi
movq %r14, %rdi
movl $0x1388, %edx           # imm = 0x1388
callq 0x1160
cmpl $-0x1, %eax
jne 0x24a1
callq 0x1060
cmpl $0x4, (%rax)
jne 0x24a1
testb $0x1, 0x2d35(%rip)      # 0x51d4
je 0x2477
testb $0x4, 0x6(%rsp)
je 0x24d2
movzwl 0x2d42(%rip), %edx      # 0x51f1
leaq 0x2d3a(%rip), %r14      # 0x51f0
incq %rdx
movl %ebx, %edi
movq %r14, %rsi
callq 0x10a0
movq %r14, %rdi
movl %ebx, %esi
movl $0x77, %edx
callq 0x23f1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Carton32[P]quectel-CM/quectel-qmi-proxy.c
// Function: send_qmi_to_cdc_wdm
static int send_qmi_to_cdc_wdm(PQCQMIMSG pQMI) {
    struct pollfd pollfds[]= {{cdc_wdm_fd, POLLOUT, 0}};
    ssize_t ret = 0;

    do {
        ret = poll(pollfds, sizeof(pollfds)/sizeof(pollfds[0]), 5000);
    } while (ret == -1 && errno == EINTR && qmi_proxy_quit == 0);

    if (pollfds[0].revents & POLLOUT) {
        ssize_t size = le16toh(pQMI->QMIHdr.Length) + 1;
        ret = write(cdc_wdm_fd, pQMI, size);
        dump_qmi(pQMI, cdc_wdm_fd, 'w');
    }

    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x2c44(%rip), %eax      # 0x5130
leaq 0x8(%rsp), %r15
movl %eax, (%r15)
movl $0x4, 0x4(%r15)
movl $0x1, %esi
movq %r15, %rdi
movl $0x1388, %edx           # imm = 0x1388
callq 0x1160
movl %eax, %r14d
cmpl $-0x1, %eax
jne 0x2529
callq 0x1060
cmpl $0x4, (%rax)
jne 0x2529
testb $0x1, 0x2cad(%rip)      # 0x51d4
je 0x24fc
testb $0x4, 0xe(%rsp)
je 0x255b
movzwl 0x1(%rbx), %edx
incq %rdx
movl 0x2bf3(%rip), %edi      # 0x5130
movq %rbx, %rsi
callq 0x10a0
movq %rax, %r14
movl 0x2be2(%rip), %esi      # 0x5130
movq %rbx, %rdi
movl $0x77, %edx
callq 0x23f1
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: topleft
int topleft(struct client *client, const union cb_arg arg)
{
    int16_t pointx;
    int16_t pointy;
    int16_t mon_x;
    int16_t mon_y;
    (void) client;
    (void) arg;
    
    if (NULL == focuswin)
    {
        return 0;
    }

    if (NULL == focuswin->monitor)
    {
        mon_x = 0;
        mon_y = 0;
    }
    else
    {
        mon_x = focuswin->monitor->x;
        mon_y = focuswin->monitor->y;        
    }
        
    raisewindow(focuswin->id);
    
    if (!getpointer(focuswin->id, &pointx, &pointy))
    {
        return 0;
    }

    focuswin->x = mon_x;
    focuswin->y = mon_y;
    movewindow(focuswin->id, focuswin->x, focuswin->y);
    xcb_warp_pointer(conn, XCB_NONE, focuswin->id, 0, 0, 0, 0,
                     pointx, pointy);
    xcb_flush(conn);
    return 0;
}

// Assembly:
movq 0x6cb5(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x3d36
pushq %rbp
pushq %rbx
pushq %rax
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x3caa
movzwl 0x10(%rcx), %ebx
movzwl 0x12(%rcx), %ebp
jmp 0x3cae
xorl %ebx, %ebx
xorl %ebp, %ebp
movl (%rax), %edi
callq 0x61ee
movq 0x6c84(%rip), %rax      # 0xa940
movl (%rax), %edi
leaq 0x6(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0x6556
testb %al, %al
je 0x3d30
movq 0x6c68(%rip), %rax      # 0xa940
movw %bx, 0x6(%rax)
movw %bp, 0x8(%rax)
movl (%rax), %edi
movzwl %bx, %esi
movzwl %bp, %edx
callq 0x629c
movq 0x6c84(%rip), %rdi      # 0xa978
movq 0x6c45(%rip), %rax      # 0xa940
movl (%rax), %edx
movswl 0x6(%rsp), %eax
movswl 0x4(%rsp), %r10d
subq $0x8, %rsp
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq $0x0
callq 0x3050
addq $0x20, %rsp
movq 0x6c4d(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x8, %rsp
popq %rbx
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: topright
static int topright(struct client *client, const union cb_arg arg)
{
    int16_t pointx;
    int16_t pointy;
    int16_t mon_x;    
    uint16_t mon_y;    
    uint16_t mon_width;
    (void) client;
    (void) arg;
    
    if (NULL == focuswin)
    {
        return 0;
    }

    if (NULL == focuswin->monitor)
    {
        mon_width = screen->width_in_pixels;
        mon_x = 0;
        mon_y = 0;
    }
    else
    {
        mon_width = focuswin->monitor->width;
        mon_x = focuswin->monitor->x;        
        mon_y = focuswin->monitor->y;
    }

    raisewindow(focuswin->id);
    
    if (!getpointer(focuswin->id, &pointx, &pointy))
    {
        return 0;
    }

    focuswin->x = mon_x + mon_width -
        (focuswin->width + conf.borderwidth * 2);    

    focuswin->y = mon_y;
    
    movewindow(focuswin->id, focuswin->x, focuswin->y);

    xcb_warp_pointer(conn, XCB_NONE, focuswin->id, 0, 0, 0, 0,
                     pointx, pointy);
    xcb_flush(conn);
    return 0;
}

// Assembly:
movq 0x6c00(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x3e10
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x3d64
movzwl 0x10(%rcx), %ebx
movzwl 0x12(%rcx), %ebp
jmp 0x3d6f
xorl %ebx, %ebx
movq 0x6bdb(%rip), %rcx      # 0xa948
xorl %ebp, %ebp
movzwl 0x14(%rcx), %r14d
movl (%rax), %edi
callq 0x61ee
movq 0x6bbe(%rip), %rax      # 0xa940
movl (%rax), %edi
leaq 0xe(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x6556
testb %al, %al
je 0x3e08
movq 0x6ba2(%rip), %rax      # 0xa940
movzwl 0xa(%rax), %ecx
movl 0x6ba8(%rip), %edx      # 0xa950
addl %r14d, %ebx
leal (%rcx,%rdx,2), %ecx
subl %ecx, %ebx
movw %bx, 0x6(%rax)
movw %bp, 0x8(%rax)
movl (%rax), %edi
movzwl %bx, %esi
movzwl %bp, %edx
callq 0x629c
movq 0x6bac(%rip), %rdi      # 0xa978
movq 0x6b6d(%rip), %rax      # 0xa940
movl (%rax), %edx
movswl 0xe(%rsp), %eax
movswl 0xc(%rsp), %r10d
subq $0x8, %rsp
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq $0x0
callq 0x3050
addq $0x20, %rsp
movq 0x6b75(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: botleft
static int botleft(struct client *client, const union cb_arg arg)
{
    int16_t pointx;
    int16_t pointy;
    int16_t mon_x;
    int16_t mon_y;
    uint16_t mon_height;
    (void) client;
    (void) arg;
    
    if (NULL == focuswin)
    {
        return 0;
    }

    if (NULL == focuswin->monitor)
    {
        mon_x = 0;
        mon_y = 0;
        mon_height = screen->height_in_pixels;
    }
    else
    {
        mon_x = focuswin->monitor->x;
        mon_y = focuswin->monitor->y;
        mon_height = focuswin->monitor->height;
    }
    
    raisewindow(focuswin->id);
    
    if (!getpointer(focuswin->id, &pointx, &pointy))
    {
        return 0;
    }

    focuswin->x = mon_x;
    focuswin->y = mon_y + mon_height - (focuswin->height + conf.borderwidth
                                        * 2);
    movewindow(focuswin->id, focuswin->x, focuswin->y);
    xcb_warp_pointer(conn, XCB_NONE, focuswin->id, 0, 0, 0, 0,
                     pointx, pointy);
    xcb_flush(conn);
    return 0;
}

// Assembly:
movq 0x6b26(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x3eea
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x3e3e
movzwl 0x10(%rcx), %ebx
movzwl 0x12(%rcx), %ebp
jmp 0x3e49
xorl %ebx, %ebx
movq 0x6b01(%rip), %rcx      # 0xa948
xorl %ebp, %ebp
movzwl 0x16(%rcx), %r14d
movl (%rax), %edi
callq 0x61ee
movq 0x6ae4(%rip), %rax      # 0xa940
movl (%rax), %edi
leaq 0xe(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x6556
testb %al, %al
je 0x3ee2
movq 0x6ac8(%rip), %rax      # 0xa940
movw %bx, 0x6(%rax)
movzwl 0xc(%rax), %ecx
movl 0x6aca(%rip), %edx      # 0xa950
addl %r14d, %ebp
leal (%rcx,%rdx,2), %ecx
subl %ecx, %ebp
movw %bp, 0x8(%rax)
movl (%rax), %edi
movzwl %bp, %edx
movzwl %bx, %esi
callq 0x629c
movq 0x6ad2(%rip), %rdi      # 0xa978
movq 0x6a93(%rip), %rax      # 0xa940
movl (%rax), %edx
movswl 0xe(%rsp), %eax
movswl 0xc(%rsp), %r10d
subq $0x8, %rsp
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq $0x0
callq 0x3050
addq $0x20, %rsp
movq 0x6a9b(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: botright
static int botright(struct client *client, const union cb_arg arg)
{
    int16_t pointx;
    int16_t pointy;
    int16_t mon_x;
    int16_t mon_y;
    uint16_t mon_width;
    uint16_t mon_height;
    (void) client;
    (void) arg;

    if (NULL == focuswin)
    {
        return 0;
    }

    if (NULL == focuswin->monitor)
    {
        mon_x = 0;
        mon_y = 0;
        mon_width = screen->width_in_pixels;;        
        mon_height = screen->height_in_pixels;
    }
    else
    {
        mon_x = focuswin->monitor->x;
        mon_y = focuswin->monitor->y;
        mon_width = focuswin->monitor->width;
        mon_height = focuswin->monitor->height;
    }

    raisewindow(focuswin->id);
    
    if (!getpointer(focuswin->id, &pointx, &pointy))
    {
        return 0;
    }

    focuswin->x = mon_x + mon_width - (focuswin->width + conf.borderwidth * 2);
    focuswin->y =  mon_y + mon_height - (focuswin->height + conf.borderwidth
                                         * 2);
    movewindow(focuswin->id, focuswin->x, focuswin->y);
    xcb_warp_pointer(conn, XCB_NONE, focuswin->id, 0, 0, 0, 0,
                     pointx, pointy);
    xcb_flush(conn);
    return 0;
}

// Assembly:
movq 0x6a4c(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x3fd4
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x3f17
movzwl 0x10(%rcx), %ebx
movzwl 0x12(%rcx), %ebp
jmp 0x3f22
xorl %ebx, %ebx
movq 0x6a28(%rip), %rcx      # 0xa948
xorl %ebp, %ebp
movzwl 0x16(%rcx), %r14d
movzwl 0x14(%rcx), %r15d
movl (%rax), %edi
callq 0x61ee
movq 0x6a06(%rip), %rax      # 0xa940
movl (%rax), %edi
leaq 0x6(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0x6556
testb %al, %al
je 0x3fca
movq 0x69ea(%rip), %rax      # 0xa940
movzwl 0xa(%rax), %ecx
movl 0x69f0(%rip), %edx      # 0xa950
addl %edx, %edx
addl %r15d, %ebx
subl %ecx, %ebx
subl %edx, %ebx
movw %bx, 0x6(%rax)
addl %r14d, %ebp
subl %edx, %ebp
subw 0xc(%rax), %bp
movw %bp, 0x8(%rax)
movl (%rax), %edi
movzwl %bx, %esi
movzwl %bp, %edx
callq 0x629c
movq 0x69ea(%rip), %rdi      # 0xa978
movq 0x69ab(%rip), %rax      # 0xa940
movl (%rax), %edx
movswl 0x6(%rsp), %eax
movswl 0x4(%rsp), %r10d
subq $0x8, %rsp
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq $0x0
callq 0x3050
addq $0x20, %rsp
movq 0x69b3(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: deletewin
int deletewin(struct client *client, const union cb_arg arg)
{
    xcb_get_property_cookie_t cookie;
    xcb_icccm_get_wm_protocols_reply_t protocols;
    bool use_delete = false;
    uint32_t i;
    (void) client;
    (void) arg;

    if (NULL == focuswin)
    {
        return 0;
    }

    /* Check if WM_DELETE is supported.  */
    cookie = xcb_icccm_get_wm_protocols_unchecked(conn, focuswin->id,
                                                  wm_protocols);
    if (xcb_icccm_get_wm_protocols_reply(conn, cookie, &protocols, NULL) == 1)
    {
        for (i = 0; i < protocols.atoms_len; i++)
        {
            if (protocols.atoms[i] == wm_delete_window)
            {
                 use_delete = true;
            }
        }
    }

    xcb_icccm_get_wm_protocols_reply_wipe(&protocols);

    if (use_delete)
    {
        xcb_client_message_event_t ev = {
          .response_type = XCB_CLIENT_MESSAGE,
          .format = 32,
          .sequence = 0,
          .window = focuswin->id,
          .type = wm_protocols,
          .data.data32 = { wm_delete_window, XCB_CURRENT_TIME }
        };

        xcb_send_event(conn, false, focuswin->id,
                       XCB_EVENT_MASK_NO_EVENT, (char *) &ev);
    }
    else
    {
        xcb_kill_client(conn, focuswin->id);
    }

    xcb_flush(conn);    
    return 0;
}

// Assembly:
movq 0x6962(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x40cd
pushq %rbx
subq $0x40, %rsp
movq 0x6985(%rip), %rdi      # 0xa978
movl (%rax), %esi
movl 0x6995(%rip), %edx      # 0xa990
callq 0x3460
movq 0x6971(%rip), %rdi      # 0xa978
leaq 0x8(%rsp), %rdx
movl %eax, %esi
xorl %ecx, %ecx
callq 0x3110
cmpb $0x1, %al
jne 0x409d
movl 0x8(%rsp), %eax
testq %rax, %rax
je 0x409d
movq 0x10(%rsp), %rcx
movl 0x6953(%rip), %edx      # 0xa984
xorl %esi, %esi
xorl %ebx, %ebx
cmpl %edx, (%rcx,%rsi,4)
sete %dil
orb %dil, %bl
incq %rsi
cmpq %rsi, %rax
jne 0x4035
leaq 0x8(%rsp), %rdi
callq 0x30a0
testb $0x1, %bl
je 0x40a7
leaq 0x20(%rsp), %r8
movl $0x2021, (%r8)          # imm = 0x2021
movq 0x68d7(%rip), %rax      # 0xa940
movl (%rax), %edx
movl %edx, 0x4(%r8)
movl 0x691b(%rip), %eax      # 0xa990
movl %eax, 0x8(%r8)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r8)
movl 0x68fd(%rip), %eax      # 0xa984
movl %eax, 0xc(%r8)
movq 0x68e6(%rip), %rdi      # 0xa978
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x3450
jmp 0x40bc
leaq 0x8(%rsp), %rdi
callq 0x30a0
movq 0x68ca(%rip), %rdi      # 0xa978
movq 0x688b(%rip), %rax      # 0xa940
movl (%rax), %esi
callq 0x3530
movq 0x68b5(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x40, %rsp
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: prevscreen
int prevscreen(struct client *client, const union cb_arg arg)
{
    struct item *item;
    (void) client;
    (void) arg;
    
    if (NULL == focuswin || NULL == focuswin->monitor)
    {
        return 0;
    }

    item = focuswin->monitor->item->prev;

    if (NULL == item)
    {
        return 0;
    }
    
    focuswin->monitor = item->data;

    raisewindow(focuswin->id);    
    fitonscreen(focuswin);
    movelim(focuswin);

    xcb_warp_pointer(conn, XCB_NONE, focuswin->id, 0, 0, 0, 0,
                     0, 0);
    xcb_flush(conn);    
    return 0;
}

// Assembly:
movq 0x6869(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x4155
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x4155
movq 0x18(%rcx), %rcx
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0x4155
pushq %rax
movq (%rcx), %rcx
movq %rcx, 0x38(%rax)
movl (%rax), %edi
callq 0x61ee
movq 0x6838(%rip), %rdi      # 0xa940
callq 0x42d3
movq 0x682c(%rip), %rdi      # 0xa940
callq 0x65ab
movq 0x6858(%rip), %rdi      # 0xa978
movq 0x6819(%rip), %rax      # 0xa940
movl (%rax), %edx
subq $0x8, %rsp
xorl %eax, %eax
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
pushq %rax
callq 0x3050
addq $0x20, %rsp
movq 0x682c(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x8, %rsp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: nextscreen
int nextscreen(struct client *client, const union cb_arg arg)
{
    struct item *item;
    (void) client;
    (void) arg;
    
    if (NULL == focuswin || NULL == focuswin->monitor)
    {
        return 0;
    }

    item = focuswin->monitor->item->next;

    if (NULL == item)
    {
        return 0;
    }
    
    focuswin->monitor = item->data;

    raisewindow(focuswin->id);    
    fitonscreen(focuswin);
    movelim(focuswin);

    xcb_warp_pointer(conn, XCB_NONE, focuswin->id, 0, 0, 0, 0,
                     0, 0);
    xcb_flush(conn);    
    return 0;
}

// Assembly:
movq 0x67e1(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x41dd
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x41dd
movq 0x18(%rcx), %rcx
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
je 0x41dd
pushq %rax
movq (%rcx), %rcx
movq %rcx, 0x38(%rax)
movl (%rax), %edi
callq 0x61ee
movq 0x67b0(%rip), %rdi      # 0xa940
callq 0x42d3
movq 0x67a4(%rip), %rdi      # 0xa940
callq 0x65ab
movq 0x67d0(%rip), %rdi      # 0xa978
movq 0x6791(%rip), %rax      # 0xa940
movl (%rax), %edx
subq $0x8, %rsp
xorl %eax, %eax
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
pushq %rax
callq 0x3050
addq $0x20, %rsp
movq 0x67a4(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x8, %rsp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: iconify
int iconify(struct client *client, const union cb_arg arg)
{
    (void) arg;
    if (conf.allowicons)
    {
        hide(client);
        return 0;
    }
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpb $0x1, 0x677f(%rip)      # 0xa974
jne 0x424d
movq %rdi, %r14
movaps 0x2edf(%rip), %xmm0     # 0x70e0
movq %rsp, %r15
movaps %xmm0, (%r15)
movq 0x6769(%rip), %rdi      # 0xa978
movl (%r14), %esi
callq 0x30d0
movq 0x675a(%rip), %rdi      # 0xa978
movl (%r14), %edx
movl 0x6765(%rip), %ecx      # 0xa98c
xorl %ebx, %ebx
xorl %esi, %esi
movl %ecx, %r8d
movl $0x20, %r9d
pushq %r15
pushq $0x2
callq 0x3520
addq $0x10, %rsp
movq 0x6730(%rip), %rdi      # 0xa978
callq 0x3150
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: printhelp
void printhelp(void)
{
    printf("mcwm: Usage: mcwm [-b] [-s snapmargin] [-t terminal-program] "
           "[-f colour] [-u colour] [-x colour] \n");
    printf("  -b means draw no borders\n");
    printf("  -s snapmargin in pixels\n");
    printf("  -t urxvt will start urxvt when MODKEY + Return is pressed\n");
    printf("  -f colour sets colour for focused window borders of focused "
           "to a named color.\n");
    printf("  -u colour sets colour for unfocused window borders.\n");
    printf("  -x color sets colour for fixed window borders.\n");    
}

// Assembly:
pushq %rax
leaq 0x27a6(%rip), %rdi      # 0x73f3
callq 0x30c0
leaq 0x27fc(%rip), %rdi      # 0x7455
callq 0x30c0
leaq 0x280b(%rip), %rdi      # 0x7470
callq 0x30c0
leaq 0x2819(%rip), %rdi      # 0x748a
callq 0x30c0
leaq 0x2849(%rip), %rdi      # 0x74c6
callq 0x30c0
leaq 0x288d(%rip), %rdi      # 0x7516
callq 0x30c0
leaq 0x28b7(%rip), %rdi      # 0x754c
popq %rax
jmp 0x30c0
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: getcolor
uint32_t getcolor(const char *colstr)
{
    xcb_alloc_named_color_reply_t *col_reply;    
    xcb_colormap_t colormap; 
    xcb_generic_error_t *error;
    xcb_alloc_named_color_cookie_t colcookie;

    colormap = screen->default_colormap;
    colcookie = xcb_alloc_named_color(conn, colormap, strlen(colstr), colstr);
    col_reply = xcb_alloc_named_color_reply(conn, colcookie, &error);
    if (NULL != error)
    {
        fprintf(stderr, "mcwm: Couldn't get pixel value for colour %s. "
                "Exiting.\n", colstr);

        xcb_disconnect(conn);
        exit(1);
    }

    return col_reply->pixel;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x5c9b(%rip), %rax      # 0xa948
movl 0x4(%rax), %ebp
movq 0x5cc1(%rip), %r14      # 0xa978
callq 0x3140
movzwl %ax, %edx
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rcx
callq 0x3330
movq 0x5ca5(%rip), %rdi      # 0xa978
leaq 0x8(%rsp), %r14
movl %eax, %esi
movq %r14, %rdx
callq 0x33a0
cmpq $0x0, (%r14)
jne 0x4cf4
movl 0x8(%rax), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x35b0
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: getatom
xcb_atom_t getatom(char *atom_name)
{
    xcb_intern_atom_cookie_t atom_cookie;
    xcb_atom_t atom;
    xcb_intern_atom_reply_t *rep;
    
    atom_cookie = xcb_intern_atom(conn, 0, strlen(atom_name), atom_name);
    rep = xcb_intern_atom_reply(conn, atom_cookie, NULL);
    if (NULL != rep)
    {
        atom = rep->atom;
        free(rep);
        return atom;
    }

    /*
     * XXX Note that we return 0 as an atom if anything goes wrong.
     * Might become interesting.
     */
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x5c6d(%rip), %r15      # 0xa978
callq 0x3140
movzwl %ax, %edx
xorl %ebx, %ebx
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x31c0
movq 0x5c4f(%rip), %rdi      # 0xa978
movl %eax, %esi
xorl %edx, %edx
callq 0x33f0
testq %rax, %rax
je 0x4d42
movl 0x8(%rax), %ebx
movq %rax, %rdi
callq 0x3040
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: cleanup
void cleanup(int code)
{
    xcb_set_input_focus(conn, XCB_NONE,
                        XCB_INPUT_FOCUS_POINTER_ROOT,
                        XCB_CURRENT_TIME);
    xcb_flush(conn);
    xcb_disconnect(conn);    
    exit(code);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movq 0x4a1b(%rip), %rdi      # 0xa978
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x34d0
movq 0x4a06(%rip), %rdi      # 0xa978
callq 0x3150
movq 0x49fa(%rip), %rdi      # 0xa978
callq 0x3430
movl %ebx, %edi
callq 0x3500
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: setunfocus
void setunfocus(xcb_drawable_t win)
{
    uint32_t values[1];

    if (NULL == focuswin)
    {
        return;
    }
    
    if (focuswin->id == screen->root)
    {
        return;
    }

    /* Set new border colour. */
    values[0] = conf.unfocuscol;
    xcb_change_window_attributes(conn, win, XCB_CW_BORDER_PIXEL, values);

    xcb_flush(conn);
}

// Assembly:
movq 0x4901(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x6082
movl (%rax), %eax
movq 0x48fb(%rip), %rcx      # 0xa948
cmpl (%rcx), %eax
je 0x6082
pushq %rax
movl %edi, %esi
movl 0x4912(%rip), %eax      # 0xa96c
leaq 0x4(%rsp), %rcx
movl %eax, (%rcx)
movq 0x4910(%rip), %rdi      # 0xa978
movl $0x8, %edx
callq 0x30f0
movq 0x48ff(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: raisewindow
void raisewindow(xcb_drawable_t win)
{
    uint32_t values[] = { XCB_STACK_MODE_ABOVE };

    if (screen->root == win || 0 == win)
    {
        return;
    }
    
    xcb_configure_window(conn, win,
                         XCB_CONFIG_WINDOW_STACK_MODE,
                         values);
    xcb_flush(conn);
}

// Assembly:
pushq %rax
movl $0x0, 0x4(%rsp)
testl %edi, %edi
je 0x622a
movl %edi, %esi
movq 0x4744(%rip), %rax      # 0xa948
cmpl %edi, (%rax)
je 0x622a
movq 0x4769(%rip), %rdi      # 0xa978
leaq 0x4(%rsp), %rcx
movl $0x40, %edx
callq 0x3200
movq 0x4753(%rip), %rdi      # 0xa978
callq 0x3150
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: addtoworkspace
void addtoworkspace(struct client *client, uint32_t ws)
{
    struct item *item;
    
    item = additem(&wslist[ws]);
    if (NULL == item)
    {
        PDEBUG("addtoworkspace: Out of memory.\n");
        return;
    }

    /* Remember our place in the workspace window list. */
    client->wsitem[ws] = item;

    /* Remember the data. */
    item->data = client;

    /*
     * Set window hint property so we can survive a crash.
     * 
     * Fixed windows have their own special WM hint. We don't want to
     * mess with that.
     */
    if (!client->fixed)
    {
        setwmdesktop(client->id, ws);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r15d
leaq 0x469c(%rip), %rax      # 0xa8e0
leaq (%rax,%r15,8), %rdi
callq 0x6d90
testq %rax, %rax
je 0x6292
movq %rax, 0x48(%r14,%r15,8)
movq %r14, (%rax)
cmpb $0x0, 0x32(%r14)
jne 0x6292
movl (%r14), %edx
leaq 0xc(%rsp), %rax
movl %ebx, (%rax)
movq 0x4706(%rip), %rdi      # 0xa978
movl 0x4708(%rip), %ecx      # 0xa980
xorl %esi, %esi
movl $0x6, %r8d
movl $0x20, %r9d
pushq %rax
pushq $0x1
callq 0x3520
addq $0x10, %rsp
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: movewindow
void movewindow(xcb_drawable_t win, uint16_t x, uint16_t y)
{
    uint32_t values[2];

    if (screen->root == win || 0 == win)
    {
        /* Can't move root. */
        return;
    }
    
    values[0] = x;
    values[1] = y;

    xcb_configure_window(conn, win, XCB_CONFIG_WINDOW_X
                         | XCB_CONFIG_WINDOW_Y, values);
    
    xcb_flush(conn);
}

// Assembly:
testl %edi, %edi
je 0x62df
movl %edi, %eax
movq 0x469f(%rip), %rcx      # 0xa948
cmpl %edi, (%rcx)
je 0x62df
pushq %rax
movzwl %si, %esi
movq %rsp, %rcx
movl %esi, (%rcx)
movzwl %dx, %edx
movl %edx, 0x4(%rcx)
movq 0x46b5(%rip), %rdi      # 0xa978
movl %eax, %esi
movl $0x3, %edx
callq 0x3200
movq 0x46a2(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: resize
void resize(xcb_drawable_t win, uint16_t width, uint16_t height)
{
    uint32_t values[2];

    if (screen->root == win || 0 == win)
    {
        /* Can't resize root. */
        return;
    }

    PDEBUG("Resizing to %d x %d.\n", width, height);
    
    values[0] = width;
    values[1] = height;
                                        
    xcb_configure_window(conn, win,
                         XCB_CONFIG_WINDOW_WIDTH
                         | XCB_CONFIG_WINDOW_HEIGHT, values);
    xcb_flush(conn);
}

// Assembly:
testl %edi, %edi
je 0x6323
movl %edi, %eax
movq 0x465b(%rip), %rcx      # 0xa948
cmpl %edi, (%rcx)
je 0x6323
pushq %rax
movzwl %si, %esi
movq %rsp, %rcx
movl %esi, (%rcx)
movzwl %dx, %edx
movl %edx, 0x4(%rcx)
movq 0x4671(%rip), %rdi      # 0xa978
movl %eax, %esi
movl $0xc, %edx
callq 0x3200
movq 0x465e(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: resizelim
void resizelim(struct client *client)
{
    int16_t mon_x;
    int16_t mon_y;
    uint16_t mon_width;
    uint16_t mon_height;
    
    if (NULL == client->monitor)
    {
        mon_x = 0;
        mon_y = 0;
        mon_width = screen->width_in_pixels;
        mon_height = screen->height_in_pixels;
    }
    else
    {
        mon_x = client->monitor->x;
        mon_y = client->monitor->y;
        mon_width = client->monitor->width;
        mon_height = client->monitor->height;        
    }
    
    /* Is it smaller than it wants to  be? */
    if (0 != client->min_height && client->height < client->min_height)
    {
        client->height = client->min_height;
    }

    if (0 != client->min_width && client->width < client->min_width)
    {
        client->width = client->min_width;
    }

    if (client->x + client->width + conf.borderwidth * 2 > mon_x + mon_width)
    {
        client->width = mon_width - ((client->x - mon_x) + conf.borderwidth
                                     * 2);
    }
    
    if (client->y + client->height + conf.borderwidth * 2 > mon_y + mon_height)
    {
        client->height = mon_height - ((client->y - mon_y) + conf.borderwidth
                                       * 2);
    }
    
    resize(client->id, client->width, client->height);
}

// Assembly:
movq 0x38(%rdi), %rsi
testq %rsi, %rsi
je 0x6494
movswl 0x10(%rsi), %edx
movswl 0x12(%rsi), %eax
jmp 0x649f
xorl %edx, %edx
movq 0x44ab(%rip), %rsi      # 0xa948
xorl %eax, %eax
movzwl 0x16(%rsi), %ecx
movzwl 0x14(%rsi), %r8d
movzwl 0x18(%rdi), %esi
testw %si, %si
je 0x64bb
cmpw %si, 0xc(%rdi)
jae 0x64bb
movw %si, 0xc(%rdi)
movzwl 0xa(%rdi), %esi
movzwl 0x16(%rdi), %r9d
testw %r9w, %r9w
setne %r10b
cmpw %r9w, %si
setb %r11b
andb %r10b, %r11b
cmpb $0x1, %r11b
jne 0x64e5
movw %r9w, 0xa(%rdi)
movl %r9d, %esi
pushq %rbx
movswl 0x6(%rdi), %r10d
movzwl %si, %r9d
addl %r10d, %r9d
movl 0x4457(%rip), %r11d     # 0xa950
leal (%r9,%r11,2), %ebx
movl %r11d, %r9d
addl %r11d, %r9d
leal (%rdx,%r8), %r11d
cmpl %r11d, %ebx
popq %rbx
jle 0x651e
subl %edx, %r10d
addl %r9d, %r10d
subl %r10d, %r8d
movw %r8w, 0xa(%rdi)
movl %r8d, %esi
movswl 0x8(%rdi), %edx
movzwl 0xc(%rdi), %r8d
movl %r8d, %r10d
addl %edx, %r10d
addl %r9d, %r10d
leal (%rax,%rcx), %r11d
cmpl %r11d, %r10d
jle 0x6548
subl %eax, %r9d
addl %r9d, %edx
subl %edx, %ecx
movw %cx, 0xc(%rdi)
movl %ecx, %r8d
movl (%rdi), %edi
movzwl %si, %esi
movzwl %r8w, %edx
jmp 0x62e0
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: getpointer
bool getpointer(xcb_drawable_t win, int16_t *x, int16_t *y)
{
    xcb_query_pointer_reply_t *pointer;
    
    pointer
        = xcb_query_pointer_reply(conn, xcb_query_pointer(conn, win), 0);
    if (NULL == pointer)
    {
        return false;
    }

    *x = pointer->win_x;
    *y = pointer->win_y;

    free(pointer);

    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %esi
movq 0x440e(%rip), %r15      # 0xa978
movq %r15, %rdi
callq 0x3290
movq %r15, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x32b0
movq %rax, %r15
testq %rax, %rax
je 0x659f
movzwl 0x14(%r15), %eax
movw %ax, (%r14)
movzwl 0x16(%r15), %eax
movw %ax, (%rbx)
movq %r15, %rdi
callq 0x3040
testq %r15, %r15
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: movelim
void movelim(struct client *client)
{
    int16_t mon_x;
    int16_t mon_y;
    uint16_t mon_width;
    uint16_t mon_height;
    
    if (NULL == client->monitor)
    {
        mon_x = 0;
        mon_y = 0;
        mon_width = screen->width_in_pixels;
        mon_height = screen->height_in_pixels;
    }
    else
    {
        mon_x = client->monitor->x;
        mon_y = client->monitor->y;
        mon_width = client->monitor->width;
        mon_height = client->monitor->height;        
    }

    /* Is it outside the physical monitor? */
    if (client->x < mon_x)
    {
        client->x = mon_x;
    }
    if (client->y < mon_y)
    {
        client->y = mon_y;
    }

    if (client->x + client->width > mon_x + mon_width - conf.borderwidth * 2)
    {
        client->x = (mon_x + mon_width - conf.borderwidth * 2) - client->width;
    }

    if (client->y + client->height > mon_y + mon_height - conf.borderwidth * 2)
    {
        client->y = (mon_y + mon_height - conf.borderwidth * 2)
            - client->height;
    }    

    movewindow(client->id, client->x, client->y);
}

// Assembly:
movq 0x38(%rdi), %rcx
testq %rcx, %rcx
je 0x65bf
movzwl 0x10(%rcx), %edx
movzwl 0x12(%rcx), %r8d
jmp 0x65cb
movq 0x4382(%rip), %rcx      # 0xa948
xorl %edx, %edx
xorl %r8d, %r8d
movzwl 0x16(%rcx), %eax
movzwl 0x14(%rcx), %esi
movzwl 0x6(%rdi), %ecx
cmpw %dx, %cx
jge 0x65e2
movw %dx, 0x6(%rdi)
movl %edx, %ecx
movswl %dx, %r9d
movzwl 0x8(%rdi), %edx
cmpw %r8w, %dx
jge 0x65f8
movw %r8w, 0x8(%rdi)
movl %r8d, %edx
movswl %r8w, %r8d
movswl %cx, %r11d
movzwl 0xa(%rdi), %r10d
addl %r10d, %r11d
addl %r9d, %esi
movl 0x433e(%rip), %r9d      # 0xa950
addl %r9d, %r9d
subl %r9d, %esi
negl %r9d
cmpl %esi, %r11d
jle 0x6629
subl %r10d, %esi
movw %si, 0x6(%rdi)
movl %esi, %ecx
movswl %dx, %r10d
movzwl 0xc(%rdi), %esi
addl %esi, %r10d
addl %r8d, %eax
addl %r9d, %eax
cmpl %eax, %r10d
jle 0x6647
subl %esi, %eax
movw %ax, 0x8(%rdi)
movl %eax, %edx
movl (%rdi), %edi
movzwl %cx, %esi
movzwl %dx, %edx
jmp 0x629c
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: unmax
void unmax(struct client *client)
{
    uint32_t values[5];
    uint32_t mask = 0;

    if (NULL == client)
    {
        PDEBUG("unmax: client was NULL!\n");
        return;
    }

    client->x = client->origsize.x;
    client->y = client->origsize.y;
    client->width = client->origsize.width;
    client->height = client->origsize.height;
    
    /* Restore geometry. */
    if (client->maxed)
    {
        values[0] = client->x;
        values[1] = client->y;
        values[2] = client->width;
        values[3] = client->height;

        /* Set borders again. */
        values[4] = conf.borderwidth;
        
        mask =
            XCB_CONFIG_WINDOW_X
            | XCB_CONFIG_WINDOW_Y
            | XCB_CONFIG_WINDOW_WIDTH
            | XCB_CONFIG_WINDOW_HEIGHT
            | XCB_CONFIG_WINDOW_BORDER_WIDTH;
    }
    else
    {
        values[0] = client->y;
        values[1] = client->width;
        values[2] = client->height;

        mask = XCB_CONFIG_WINDOW_Y
            | XCB_CONFIG_WINDOW_WIDTH
            | XCB_CONFIG_WINDOW_HEIGHT;
    }

    xcb_configure_window(conn, client->id, mask, values);

    /* Warp pointer to window or we might lose it. */
    xcb_warp_pointer(conn, XCB_NONE, client->id, 0, 0, 0, 0,
                     client->width / 2, client->height / 2);

    xcb_flush(conn);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0xe(%rdi), %rax
movq %rax, %xmm0
movq %rax, 0x6(%rdi)
cmpb $0x1, 0x31(%rdi)
jne 0x6697
pextrw $0x1, %xmm0, %eax
pextrw $0x3, %xmm0, %ecx
cwtl
movl %ecx, 0xc(%rsp)
movl 0x42cc(%rip), %ecx      # 0xa950
movl %ecx, 0x10(%rsp)
movd %xmm0, %ecx
pextrw $0x2, %xmm0, %esi
movw $0x1f, %dx
jmp 0x66aa
pextrw $0x2, %xmm0, %eax
pextrw $0x1, %xmm0, %ecx
pextrw $0x3, %xmm0, %esi
movw $0xe, %dx
movzwl %si, %esi
movswl %cx, %edi
movq %rsp, %rcx
movl %edi, (%rcx)
movl %eax, 0x4(%rcx)
movl %esi, 0x8(%rcx)
movq 0x42b6(%rip), %rdi      # 0xa978
movl (%rbx), %esi
movzwl %dx, %edx
callq 0x3200
movq 0x42a5(%rip), %rdi      # 0xa978
movl (%rbx), %edx
movzwl 0xa(%rbx), %eax
shrl %eax
movzwl 0xc(%rbx), %r10d
shrl %r10d
subq $0x8, %rsp
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq $0x0
callq 0x3050
addq $0x20, %rsp
movq 0x4272(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: getrandr
void getrandr(void)
{
    xcb_randr_get_screen_resources_current_cookie_t rcookie;
    xcb_randr_get_screen_resources_current_reply_t *res;
    xcb_randr_output_t *outputs;
    int len;    
    xcb_timestamp_t timestamp;
    
    rcookie = xcb_randr_get_screen_resources_current(conn, screen->root);
    res = xcb_randr_get_screen_resources_current_reply(conn, rcookie, NULL);
    if (NULL == res)
    {
        printf("No RANDR extension available.\n");
        return;
    }
    timestamp = res->config_timestamp;

    len = xcb_randr_get_screen_resources_current_outputs_length(res);
    outputs = xcb_randr_get_screen_resources_current_outputs(res);

    PDEBUG("Found %d outputs.\n", len);
    
    /* Request information for all outputs. */
    getoutputs(outputs, len, timestamp);

    free(res);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x425c(%rip), %rdi      # 0xa978
movq 0x4225(%rip), %rax      # 0xa948
movl (%rax), %esi
callq 0x3220
movq 0x4247(%rip), %rdi      # 0xa978
movl %eax, %esi
xorl %edx, %edx
callq 0x3370
testq %rax, %rax
je 0x6771
movq %rax, %rbx
movl 0xc(%rax), %ebp
movq %rax, %rdi
callq 0x3550
movl %eax, %r14d
movq %rbx, %rdi
callq 0x3230
movq %rax, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6781
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3040
leaq 0xe05(%rip), %rdi       # 0x757d
popq %rbx
popq %r14
popq %rbp
jmp 0x30c0
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/mcwm.c
// Function: finishtabbing
void finishtabbing(void)
{
    mode = 0;
    
    if (NULL != lastfocuswin)
    {
        movetohead(&wslist[curws], lastfocuswin->wsitem[curws]);
        lastfocuswin = NULL;             
    }
                
    movetohead(&wslist[curws], focuswin->wsitem[curws]);
}

// Assembly:
pushq %rax
movl $0x0, 0x3bf3(%rip)      # 0xa8d8
movq 0x3cb4(%rip), %rax      # 0xa9a0
testq %rax, %rax
je 0x6d17
movl 0x3bc9(%rip), %ecx      # 0xa8c0
leaq 0x3be2(%rip), %rdx      # 0xa8e0
leaq (%rdx,%rcx,8), %rdi
movq 0x48(%rax,%rcx,8), %rsi
callq 0x6d3c
movq $0x0, 0x3c89(%rip) # 0xa9a0
movl 0x3ba3(%rip), %eax      # 0xa8c0
leaq 0x3bbc(%rip), %rcx      # 0xa8e0
leaq (%rcx,%rax,8), %rdi
movq 0x3c11(%rip), %rcx      # 0xa940
movq 0x48(%rcx,%rax,8), %rsi
popq %rax
jmp 0x6d3c
nop
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/list.c
// Function: freeitem
void freeitem(struct item **list, int *stored,
              struct item *item)
{
    if (NULL == list || NULL == *list || NULL == item)
    {
        return;
    }
    
    if (NULL != item->data)
    {
        free(item->data);
        item->data = NULL;
    }

    delitem(list, item);

    if (NULL != stored)
    {
        (*stored) --;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x6e48
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
testq %rdx, %rdx
je 0x6e43
movq %rdi, %r15
cmpq $0x0, (%rdi)
je 0x6e43
movq %rsi, %rbx
movq (%r14), %rdi
testq %rdi, %rdi
je 0x6e31
callq 0x3040
movq $0x0, (%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x6dc0
testq %rbx, %rbx
je 0x6e43
decl (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tkln[P]mcwm/list.c
// Function: delallitems
void delallitems(struct item **list, int *stored)
{
    struct item *item;
    struct item *next;
    
    for (item = *list; item != NULL; item = next)
    {
        next = item->next;
        free(item->data);
        delitem(list, item);
    }

    if (NULL != stored)
    {
        (*stored) = 0;
    }    
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x6e7e
movq %rdi, %r14
movq (%r15), %rdi
movq 0x10(%r15), %r12
callq 0x3040
movq %r14, %rdi
movq %r15, %rsi
callq 0x6dc0
movq %r12, %r15
testq %r12, %r12
jne 0x6e5f
testq %rbx, %rbx
je 0x6e89
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/list.c
// Function: SH_List__init
SH_List*
SH_List__init(int* err) {
	SH_List* obj;

	__cascade(err, (SH_List*)0);

	obj = (SH_List*)malloc(sizeof(SH_List));
	if ((SH_List*)0 == obj) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (SH_List*)0;
	}

	obj->count = 0;

	__clear(err);
	return obj;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x119c
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jne 0x11be
movl $0x2008, %edi           # imm = 0x2008
callq 0x1070
testq %rax, %rax
je 0x11b8
movq $0x0, 0x2000(%rax)
movl $0x0, (%rbx)
jmp 0x11c0
movl $0x2008, %edi           # imm = 0x2008
callq 0x1070
testq %rax, %rax
je 0x11be
movq $0x0, 0x2000(%rax)
jmp 0x11c0
movl $0x80000001, (%rbx)     # imm = 0x80000001
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/list.c
// Function: SH_List__destroy
void
SH_List__destroy(SH_List* obj, sh_bool_t recursive, int* err) {
	int local_err;
	int final_err = SH_E_NO_ERROR;
	size_t i;
	__cascade(err,);
	if (recursive) {
		for (i = 0; i < obj->count; i++) {
			local_err = SH_E_NO_ERROR;
			SH_Item__destroy(obj->_list[i], recursive, &local_err);
			if (final_err == SH_E_NO_ERROR && local_err != SH_E_NO_ERROR) {
				final_err = local_err;
			}
		}
		free(obj);
		__raise(err, final_err);
	} else {
		free(obj);
		__clear(err);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x11f2
cmpl $0x0, (%rbx)
jne 0x1258
testb %sil, %sil
jne 0x11f7
movq %r14, %rdi
callq 0x1030
movl $0x0, (%rbx)
jmp 0x1258
testb %sil, %sil
je 0x1267
cmpq $0x0, 0x2000(%r14)
je 0x1245
xorl %r13d, %r13d
movzbl %sil, %ebp
leaq 0x4(%rsp), %r15
xorl %r12d, %r12d
movl $0x0, 0x4(%rsp)
movq (%r14,%r13,8), %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x1040
movl 0x4(%rsp), %eax
testl %eax, %eax
cmovel %r12d, %eax
testl %r12d, %r12d
cmovel %eax, %r12d
incq %r13
cmpq 0x2000(%r14), %r13
jb 0x1210
jmp 0x1248
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x1030
testq %rbx, %rbx
je 0x1258
movl %r12d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/list.c
// Function: SH_List__add
void
SH_List__add(SH_List* obj, SH_Item* item, int* err) {
	__cascade(err,);
	if (obj->count >= SH_LIST_CAPACITY) {
		__raise(err, SH_E_LIST_OVERFLOW);
		return;
	}
	obj->_list[obj->count++] = item;
	__clear(err);
}

// Assembly:
testq %rdx, %rdx
je 0x1288
cmpl $0x0, (%rdx)
je 0x12a7
retq
movq 0x2000(%rdi), %rax
cmpq $0x3ff, %rax            # imm = 0x3FF
ja 0x1287
leaq 0x1(%rax), %rcx
movq %rcx, 0x2000(%rdi)
movq %rsi, (%rdi,%rax,8)
retq
movq 0x2000(%rdi), %rax
cmpq $0x400, %rax            # imm = 0x400
jb 0x12bd
movl $0x300001, (%rdx)       # imm = 0x300001
retq
leaq 0x1(%rax), %rcx
movq %rcx, 0x2000(%rdi)
movq %rsi, (%rdi,%rax,8)
movl $0x0, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/list.c
// Function: _SH_List__to_s_item
void
__SH_List__to_s_item(SH_Item* obj, void* ptr, int* err) {
	__sh_list__string* str;

	sh_char_t* s;

	int local_err = SH_E_NO_ERROR;

	__cascade(err,);

	str = (__sh_list__string*)ptr;

	s = SH_Item__to_s(obj, &local_err);
	if (local_err) {
		__raise(err, local_err);
		return;
	}

	str->a[str->n ++] = s; str->length += strlen((const char*)s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl $0x0, 0xc(%rsp)
testq %rdx, %rdx
je 0x13c6
movq %rdx, %r14
cmpl $0x0, (%rdx)
jne 0x13f5
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0x1090
movl (%r15), %ecx
testl %ecx, %ecx
je 0x13d9
movl %ecx, (%r14)
jmp 0x13f5
leaq 0xc(%rsp), %r14
movq %r14, %rsi
callq 0x1090
cmpl $0x0, (%r14)
jne 0x13f5
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movq %rax, 0x10(%rbx,%rcx,8)
movq %rax, %rdi
callq 0x1050
addq %rax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/list.c
// Function: SH_List__to_s
sh_char_t*
SH_List__to_s(SH_List* obj, int* err) {
	sh_char_t* tmp_s;
	sh_char_t* s;
	sh_char_t* ptr;

	size_t i;
	size_t n;
	size_t total;

	__sh_list__string str;
	str.length = (size_t)0;
	str.n = (size_t)0;

	SH_List__each(obj, &__SH_List__to_s_item, (void*)(&str), err);
	if (__catch(err)) {
		for (i = 0; i < str.n; i++) {
			free(str.a[i]);
		}
		__cascade(err, (sh_char_t*)0);
	}

	total = 0;
	total += str.length;
	if (str.n > 1)
		total += (str.n - 1) * 2; /* ', ' between items */
	total += 1; /* NULL */

	s = (sh_char_t*)malloc(sizeof(sh_char_t) * total);
	if ((sh_char_t*)0 == s) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (sh_char_t*)0;
	}

	ptr = s;

	for (i = 0; i < str.n; i++) {
		if (i > 0) {
			*ptr = ',';
			ptr ++;

			*ptr = ' ';
			ptr ++;
		}

		tmp_s = str.a[i];
		n = strlen((const char*)tmp_s);
		memcpy((void*)ptr, (const void*)tmp_s, n);
		free(str.a[i]);
		ptr += n;
	}

	*ptr = SH_CHAR_C(0);

	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2010, %rsp           # imm = 0x2010
movq %rsi, %r14
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movq 0x2bb6(%rip), %rsi      # 0x3fd8
movq %r14, %rcx
callq 0x1080
testq %r14, %r14
je 0x1468
cmpl $0x0, (%r14)
movq 0x8(%rsp), %r15
je 0x146d
testq %r15, %r15
je 0x14f8
xorl %ebx, %ebx
movq 0x10(%rsp,%rbx,8), %rdi
callq 0x1030
incq %rbx
movq 0x8(%rsp), %r15
cmpq %r15, %rbx
jb 0x1445
cmpl $0x0, (%r14)
jne 0x14f8
jmp 0x146d
movq 0x8(%rsp), %r15
movq (%rsp), %rax
xorl %ecx, %ecx
cmpq $0x2, %r15
leaq -0x2(%r15,%r15), %rdx
cmovaeq %rdx, %rcx
leaq (%rax,%rcx), %rdi
incq %rdi
callq 0x1070
testq %rax, %rax
je 0x14ec
movq %rax, %rbx
movq %rax, %r14
testq %r15, %r15
je 0x14e6
xorl %r13d, %r13d
movq %rbx, %r14
testq %r13, %r13
je 0x14b1
movw $0x202c, (%r14)         # imm = 0x202C
addq $0x2, %r14
movq 0x10(%rsp,%r13,8), %r15
movq %r15, %rdi
callq 0x1050
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1060
movq 0x10(%rsp,%r13,8), %rdi
callq 0x1030
addq %r12, %r14
incq %r13
cmpq 0x8(%rsp), %r13
jb 0x14a2
movb $0x0, (%r14)
jmp 0x14fa
testq %r14, %r14
je 0x14f8
movl $0x80000001, (%r14)     # imm = 0x80000001
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x2010, %rsp           # imm = 0x2010
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq