LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/quectel-qmi-proxy.c
// Function: get_time
const char * get_time(void) {
    static char time_buf[128];
    struct timeval  tv;
    time_t time;
    suseconds_t millitm;
    struct tm *ti;

    gettimeofday (&tv, NULL);

    time= tv.tv_sec;
    millitm = (tv.tv_usec + 500) / 1000;

    if (millitm == 1000) {
        ++time;
        millitm = 0;
    }

    ti = localtime(&time);
    sprintf(time_buf, "[%02d-%02d_%02d:%02d:%02d:%03d]", ti->tm_mon+1, ti->tm_mday, ti->tm_hour, ti->tm_min, ti->tm_sec, (int)millitm);
    return time_buf;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10d0
movq (%rbx), %rcx
movq 0x8(%rbx), %rsi
movq %rcx, (%rsp)
leaq 0x1f4(%rsi), %rax
movl $0x3e8, %edi            # imm = 0x3E8
cqto
idivq %rdi
addq $-0xf404c, %rsi         # imm = 0xFFF0BFB4
cmpq $0x3e7, %rsi            # imm = 0x3E7
ja 0x1389
incq %rcx
movq %rcx, (%rsp)
xorl %ebx, %ebx
jmp 0x138c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1050
movl 0x10(%rax), %edx
incl %edx
movl 0xc(%rax), %ecx
movl 0x8(%rax), %r8d
movl (%rax), %r10d
movl 0x4(%rax), %r9d
leaq 0x3da2(%rip), %r14      # 0x5150
leaq 0x1c4f(%rip), %rsi      # 0x3004
movq %r14, %rdi
xorl %eax, %eax
pushq %rbx
pushq %r10
callq 0x11e0
popq %rcx
popq %rdx
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3f82(%rip), %rax      # 0x61f0
movq %rax, %rbx
movq (%rbx), %rbx
cmpq %rax, %rbx
je 0x22e1
cmpl %edi, 0x20(%rbx)
jne 0x2271
leaq 0x10(%rbx), %rbp
leaq 0x10d1(%rip), %r14      # 0x335a
leaq 0x2ec0(%rip), %r15      # 0x5150
movq (%rbp), %r12
cmpq %r12, %rbp
je 0x22f0
movq 0x2d30(%rip), %rax      # 0x4fd0
movq (%rax), %r13
callq 0x133c
movl 0x20(%rbx), %ecx
movzbl 0x10(%r12), %r8d
movzbl 0x11(%r12), %r9d
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1120
movq (%r12), %rax
movq 0x8(%r12), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq %r12, %rdi
callq 0x1030
jmp 0x2290
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3f09(%rip), %rax      # 0x6200
movq %rax, %rdi
movq (%rdi), %rdi
cmpq %rax, %rdi
je 0x231d
movl 0x10(%rdi), %ecx
cmpl 0x20(%rbx), %ecx
jne 0x22fa
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
callq 0x1030
movq 0x2cac(%rip), %rax      # 0x4fd0
movq (%rax), %r14
callq 0x133c
movl 0x20(%rbx), %ecx
leaq 0x104f(%rip), %rsi      # 0x3385
leaq 0x2e13(%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
// File: /workspace/github_c_makefile_star2_O2/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, 0x2e56(%rip)      # 0x51d0
jne 0x23d2
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 0x1014(%rip), %rdi      # 0x33ad
movl %eax, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10c0
cmpl $0x10, %ebp
pushq $0x10
popq %r15
cmovbl %ebp, %r15d
leaq 0x1002(%rip), %r14      # 0x33b8
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x23d3
movzbl (%rbx,%r12), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10c0
incq %r12
jmp 0x23b9
retq
pushq $0xa
popq %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x8(%rsp), %r14
movl %edi, (%r14)
movl $0x4, 0x4(%r14)
pushq $0x1
popq %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0x1388, %edx           # imm = 0x1388
callq 0x1160
cmpl $-0x1, %eax
jne 0x242a
callq 0x1060
cmpl $0x4, (%rax)
jne 0x242a
testb $0x1, 0x2dac(%rip)      # 0x51d4
je 0x2402
testb $0x4, 0xe(%rsp)
je 0x2459
movzwl 0x2db9(%rip), %edx      # 0x51f1
leaq 0x2db1(%rip), %r14      # 0x51f0
incq %rdx
movl %ebx, %edi
movq %r14, %rsi
callq 0x10a0
pushq $0x77
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x2373
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x2cbc(%rip), %eax      # 0x5130
movq %rsp, %r15
movl %eax, (%r15)
movl $0x4, 0x4(%r15)
pushq $0x1
popq %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0x1388, %edx           # imm = 0x1388
callq 0x1160
movl %eax, %r14d
cmpl $-0x1, %eax
jne 0x24b1
callq 0x1060
cmpl $0x4, (%rax)
jne 0x24b1
testb $0x1, 0x2d25(%rip)      # 0x51d4
je 0x2486
testb $0x4, 0x6(%rsp)
je 0x24e1
movzwl 0x1(%rbx), %edx
incq %rdx
movl 0x2c6b(%rip), %edi      # 0x5130
movq %rbx, %rsi
callq 0x10a0
movq %rax, %r14
movl 0x2c5a(%rip), %esi      # 0x5130
pushq $0x77
popq %rdx
movq %rbx, %rdi
callq 0x2373
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/test_multithread.c
// Function: addq
THREAD_FN addq( void * data ) {
	struct lfq_ctx * ctx = data;
	int ret = 0;
	long added;
	for (added = 0 ; added < 500000 ; added++) {
		struct user_data * p = malloc(sizeof(struct user_data));
		p->data=SOMEID;
		if ( ( ret = lfq_enqueue(ctx,p) ) != 0 ) {
			printf("lfq_enqueue failed, reason:%s\n", strerror(-ret));
			ATOMIC_ADD64(&cn_added, added);
			ATOMIC_SUB(&cn_producer, 1);
			return 0;
		}
	}
	ATOMIC_ADD64(&cn_added, added);
	ATOMIC_SUB(&cn_producer, 1);
	printf("Producer thread [%lu] exited! Still %d running...\n",THREAD_ID(), cn_producer);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
pushq $0x8
popq %r14
cmpq $0x7a120, %r15          # imm = 0x7A120
je 0x1227
movq %r14, %rdi
callq 0x1090
movq $0x27ce0af9, (%rax)     # imm = 0x27CE0AF9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x16dd
testl %eax, %eax
jne 0x1258
incq %r15
jmp 0x11fb
lock
addq $0x7a120, 0x2e5d(%rip) # imm = 0x7A120
lock
decl 0x2e6a(%rip)            # 0x40a4
callq 0x10b0
movl 0x2e5f(%rip), %edx      # 0x40a4
leaq 0xdd7(%rip), %rdi       # 0x2023
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
jmp 0x1281
negl %eax
movl %eax, %edi
callq 0x10e0
leaq 0xd9c(%rip), %rdi       # 0x2004
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
lock
addq %r15, 0x2e16(%rip)      # 0x4090
lock
decl 0x2e23(%rip)            # 0x40a4
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/test_multithread.c
// Function: delq
THREAD_FN delq(void * data) {
	struct lfq_ctx * ctx = data;
	struct user_data * p;
	int tid = ATOMIC_ADD(&cn_t, 1);

	long deleted = 0;
	while(1) {
		p = lfq_dequeue_tid(ctx, tid);
		if (p) {
			if (p->data!=SOMEID){
				printf("data wrong!!\n");
				exit(1);
			}

			free(p);
			deleted++;
		} else {
			if (ctx->count || cn_producer)
				THREAD_YIELD(); // queue is empty, release CPU slice
			else
				break; // queue is empty and no more producers
		}
	}

	ATOMIC_ADD64(&cn_deled, deleted);

	// p = lfq_dequeue_tid(ctx, tid);
	printf("Consumer thread [%lu] exited %d\n",THREAD_ID(),cn_producer);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
pushq $0x1
popq %rbx
lock
xaddl %ebx, 0x2e07(%rip)      # 0x40a0
movq %rdi, %r14
incl %ebx
xorl %r15d, %r15d
movq %r14, %rdi
movl %ebx, %esi
callq 0x171d
testq %rax, %rax
jne 0x12c7
cmpl $0x0, 0x8(%r14)
jne 0x12c0
cmpl $0x0, 0x2de6(%rip)      # 0x40a4
je 0x12dd
callq 0x1070
jmp 0x12a1
cmpq $0x27ce0af9, (%rax)     # imm = 0x27CE0AF9
jne 0x1309
movq %rax, %rdi
callq 0x1030
incq %r15
jmp 0x12a1
lock
addq %r15, 0x2db3(%rip)      # 0x4098
callq 0x10b0
movl 0x2db4(%rip), %edx      # 0x40a4
leaq 0xd5f(%rip), %rdi       # 0x2056
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xdac(%rip), %rdi       # 0x20bc
callq 0x1050
pushq $0x1
popq %rdi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/test_multithread.c
// Function: main
int main() {
	struct lfq_ctx ctx;
	int i = 0;
	lfq_init(&ctx, MAX_CONSUMER);
	THREAD_TOKEN thread_d[MAX_CONSUMER];
	THREAD_TOKEN thread_a[MAX_PRODUCER];
	
	ATOMIC_ADD(&cn_producer, 1);
	for ( i = 0 ; i < MAX_CONSUMER ; i++ ) {
#if defined __GNUC__ || defined __CYGWIN__ || defined __MINGW32__
		pthread_create(&thread_d[i], NULL, delq, (void*)&ctx);
#else
#pragma warning(disable:4133)
		thread_d[i] = CreateThread(NULL, 0, delq, &ctx, 0, 0);
#endif
	}
	
	for ( i = 0 ; i < MAX_PRODUCER ; i++ ){
		ATOMIC_ADD(&cn_producer, 1);
#if defined __GNUC__ || defined __CYGWIN__ || defined __MINGW32__
		pthread_create(&thread_a[i], NULL, addq, (void*)&ctx);
#else
#pragma warning(disable:4133)
		thread_a[i] = CreateThread(NULL, 0, addq, &ctx, 0, 0);
#endif
		
	}
	
	ATOMIC_SUB(&cn_producer, 1);
	
	for (i = 0; i < MAX_PRODUCER; i++)
		THREAD_WAIT(thread_a[i]);
	
	for ( i = 0 ; i < MAX_CONSUMER ; i++ )
		THREAD_WAIT(thread_d[i]);

	long freecount = lfg_count_freelist(&ctx);
	int clean = lfq_clean(&ctx);

	printf("Total push %"PRId64" elements, pop %"PRId64" elements. freelist=%ld, clean = %d\n", cn_added, cn_deled, freecount, clean);
	if ( cn_added == cn_deled )
		printf("Test PASS!!\n");
	else
		printf("Test Failed!!\n");

	return (cn_added != cn_deled);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
andq $-0x40, %rsp
subq $0x480, %rsp            # imm = 0x480
leaq 0x80(%rsp), %rbx
pushq $0x64
popq %rsi
movq %rbx, %rdi
callq 0x1474
lock
incl 0x2d59(%rip)            # 0x40a4
xorl %r15d, %r15d
leaq -0xcc(%rip), %r14       # 0x1289
cmpq $0x320, %r15            # imm = 0x320
je 0x137c
leaq (%rsp,%r15), %rdi
addq $0x130, %rdi            # imm = 0x130
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x10a0
addq $0x8, %r15
jmp 0x1355
xorl %r15d, %r15d
leaq -0x19a(%rip), %rbx      # 0x11ec
leaq 0x80(%rsp), %r14
cmpq $0x50, %r15
je 0x13b6
lock
incl 0x2d09(%rip)            # 0x40a4
leaq (%rsp,%r15), %rdi
addq $0x30, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x10a0
addq $0x8, %r15
jmp 0x138e
lock
decl 0x2ce7(%rip)            # 0x40a4
xorl %ebx, %ebx
cmpq $0xa, %rbx
je 0x13d6
movq 0x30(%rsp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x10d0
incq %rbx
jmp 0x13bf
xorl %ebx, %ebx
cmpq $0x64, %rbx
je 0x13f2
movq 0x130(%rsp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x10d0
incq %rbx
jmp 0x13d8
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x152d
movq %rax, %r14
movq %rbx, %rdi
callq 0x1545
movq 0x2c7c(%rip), %rsi      # 0x4090
movq 0x2c7d(%rip), %rdx      # 0x4098
leaq 0xc55(%rip), %rdi       # 0x2077
movq %r14, %rcx
movl %eax, %r8d
xorl %eax, %eax
callq 0x1060
movq 0x2c5a(%rip), %rax      # 0x4090
cmpq 0x2c5b(%rip), %rax      # 0x4098
leaq 0xc93(%rip), %rax       # 0x20d7
leaq 0xc7e(%rip), %rdi       # 0x20c9
cmoveq %rax, %rdi
callq 0x1050
movq 0x2c35(%rip), %rcx      # 0x4090
xorl %eax, %eax
cmpq 0x2c34(%rip), %rcx      # 0x4098
setne %al
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/minkcv[P]vm/convertsprite.c
// Function: getColorIndex
int getColorIndex(int rgba[4], int colors[4][3])
{
    int i;
    for (i = 0; i < 4; i++)
    {
        // Screw &&
        if (rgba[0] == colors[i][0])
        if (rgba[1] == colors[i][1])
        if (rgba[2] == colors[i][2])
            return i;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %ecx
addq $0x8, %rsi
xorl %edx, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x4, %rdx
je 0x12e6
cmpl -0x8(%rsi), %ecx
jne 0x12db
movl 0x4(%rdi), %r8d
cmpl -0x4(%rsi), %r8d
jne 0x12db
movl 0x8(%rdi), %r8d
cmpl (%rsi), %r8d
je 0x12e4
incq %rdx
addq $0xc, %rsi
jmp 0x12bd
movl %edx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tkln[P]mcwm/mcwm.c
// Function: movestep
int movestep(struct client *client, const union cb_arg arg)
{
    int16_t start_x;
    int16_t start_y;
    
    if (NULL == client)
    {
        return 0;
    }

    if (client->maxed)
    {
        /* We can't move a fully maximized window. */
        return 0;
    }

    /* Save pointer position so we can warp pointer here later. */
    if (!getpointer(client->id, &start_x, &start_y))
    {
        return 0;
    }

    raisewindow(client->id);
    switch (arg.c)
    {
    case 'h':
        client->x = client->x - MOVE_STEP;
        break;

    case 'j':
        client->y = client->y + MOVE_STEP;
        break;

    case 'k':
        client->y = client->y - MOVE_STEP;
        break;

    case 'l':
        client->x = client->x + MOVE_STEP;
        break;

    default:
        PDEBUG("movestep: Moving in unknown direction.\n");
        break;
    } /* switch direction */
    
    movelim(client);
    
    /*
     * If the pointer was inside the window to begin with, move
     * pointer back to where it was, relative to the window.
     */
    if (start_x > 0 - conf.borderwidth && start_x < client->width
        + conf.borderwidth && start_y > 0 - conf.borderwidth && start_y
        < client->height + conf.borderwidth)
    {
        xcb_warp_pointer(conn, XCB_NONE, client->id, 0, 0, 0, 0,
                         start_x, start_y);
        xcb_flush(conn);        
    }
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x378e
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x31(%rdi)
jne 0x3787
movq %rsi, %r14
movl (%rbx), %edi
leaq 0x26(%rsp), %rsi
leaq 0x24(%rsp), %rdx
callq 0x62ff
testb %al, %al
je 0x3787
movl (%rbx), %edi
callq 0x5fa1
movsbl %r14b, %eax
addl $-0x68, %eax
cmpl $0x4, %eax
ja 0x371f
leaq 0x3908(%rip), %rcx      # 0x7004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addw $-0x20, 0x6(%rbx)
jmp 0x371f
addw $-0x20, 0x8(%rbx)
jmp 0x371f
addw $0x20, 0x8(%rbx)
jmp 0x371f
addw $0x20, 0x6(%rbx)
movq %rbx, %rdi
callq 0x6354
movswl 0x26(%rsp), %eax
movl 0x721e(%rip), %ecx      # 0xa950
movl %ecx, %edx
negl %edx
cmpl %edx, %eax
jle 0x3787
movzwl 0xa(%rbx), %esi
addl %ecx, %esi
cmpl %eax, %esi
jle 0x3787
movswl 0x24(%rsp), %esi
cmpl %edx, %esi
jle 0x3787
movzwl 0xc(%rbx), %edx
addl %edx, %ecx
cmpl %esi, %ecx
jle 0x3787
movq 0x721a(%rip), %rdi      # 0xa978
movl (%rbx), %edx
andl $0x0, (%rsp)
movl %esi, 0x10(%rsp)
movl %eax, 0x8(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3050
movq 0x71f6(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x28, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6e36(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x3bb6
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x3b2c
movzwl 0x10(%rcx), %ebx
movzwl 0x12(%rcx), %ebp
jmp 0x3b30
xorl %ebx, %ebx
xorl %ebp, %ebp
movl (%rax), %edi
callq 0x5fa1
movq 0x6e02(%rip), %rax      # 0xa940
movl (%rax), %edi
leaq 0x26(%rsp), %rsi
leaq 0x24(%rsp), %rdx
callq 0x62ff
testb %al, %al
je 0x3bb0
movq 0x6de6(%rip), %rax      # 0xa940
movw %bx, 0x6(%rax)
movw %bp, 0x8(%rax)
movl (%rax), %edi
movzwl %bx, %esi
movzwl %bp, %edx
callq 0x604a
movq 0x6e02(%rip), %rdi      # 0xa978
movq 0x6dc3(%rip), %rax      # 0xa940
movl (%rax), %edx
movswl 0x26(%rsp), %eax
movswl 0x24(%rsp), %ecx
andl $0x0, (%rsp)
movl %ecx, 0x10(%rsp)
movl %eax, 0x8(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3050
movq 0x6dcd(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x28, %rsp
popq %rbx
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6d80(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x3c8e
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x3be4
movzwl 0x10(%rcx), %ebx
movzwl 0x12(%rcx), %ebp
jmp 0x3bef
xorl %ebx, %ebx
movq 0x6d5b(%rip), %rcx      # 0xa948
xorl %ebp, %ebp
movzwl 0x14(%rcx), %r14d
movl (%rax), %edi
callq 0x5fa1
movq 0x6d3e(%rip), %rax      # 0xa940
movl (%rax), %edi
leaq 0x1e(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
callq 0x62ff
testb %al, %al
je 0x3c86
movq 0x6d22(%rip), %rax      # 0xa940
movzwl 0xa(%rax), %ecx
movl 0x6d28(%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 0x604a
movq 0x6d2c(%rip), %rdi      # 0xa978
movq 0x6ced(%rip), %rax      # 0xa940
movl (%rax), %edx
movswl 0x1e(%rsp), %eax
movswl 0x1c(%rsp), %ecx
andl $0x0, (%rsp)
movl %ecx, 0x10(%rsp)
movl %eax, 0x8(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3050
movq 0x6cf7(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6ca8(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x3d66
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x3cbc
movzwl 0x10(%rcx), %ebx
movzwl 0x12(%rcx), %ebp
jmp 0x3cc7
xorl %ebx, %ebx
movq 0x6c83(%rip), %rcx      # 0xa948
xorl %ebp, %ebp
movzwl 0x16(%rcx), %r14d
movl (%rax), %edi
callq 0x5fa1
movq 0x6c66(%rip), %rax      # 0xa940
movl (%rax), %edi
leaq 0x1e(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
callq 0x62ff
testb %al, %al
je 0x3d5e
movq 0x6c4a(%rip), %rax      # 0xa940
movw %bx, 0x6(%rax)
movzwl 0xc(%rax), %ecx
movl 0x6c4c(%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 0x604a
movq 0x6c54(%rip), %rdi      # 0xa978
movq 0x6c15(%rip), %rax      # 0xa940
movl (%rax), %edx
movswl 0x1e(%rsp), %eax
movswl 0x1c(%rsp), %ecx
andl $0x0, (%rsp)
movl %ecx, 0x10(%rsp)
movl %eax, 0x8(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3050
movq 0x6c1f(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6bd0(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x3e51
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x3d96
movzwl 0x10(%rcx), %ebx
movzwl 0x12(%rcx), %ebp
jmp 0x3da1
xorl %ebx, %ebx
movq 0x6ba9(%rip), %rcx      # 0xa948
xorl %ebp, %ebp
movzwl 0x16(%rcx), %r14d
movzwl 0x14(%rcx), %r15d
movl (%rax), %edi
callq 0x5fa1
movq 0x6b87(%rip), %rax      # 0xa940
movl (%rax), %edi
leaq 0x26(%rsp), %rsi
leaq 0x24(%rsp), %rdx
callq 0x62ff
testb %al, %al
je 0x3e47
movq 0x6b6b(%rip), %rax      # 0xa940
movzwl 0xa(%rax), %ecx
movl 0x6b71(%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 0x604a
movq 0x6b6b(%rip), %rdi      # 0xa978
movq 0x6b2c(%rip), %rax      # 0xa940
movl (%rax), %edx
movswl 0x26(%rsp), %eax
movswl 0x24(%rsp), %ecx
andl $0x0, (%rsp)
movl %ecx, 0x10(%rsp)
movl %eax, 0x8(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3050
movq 0x6b36(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6ae5(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x3f45
pushq %rbx
subq $0x40, %rsp
movq 0x6b08(%rip), %rdi      # 0xa978
movl (%rax), %esi
movl 0x6b18(%rip), %edx      # 0xa990
callq 0x3460
movq 0x6af4(%rip), %rdi      # 0xa978
leaq 0x8(%rsp), %rdx
movl %eax, %esi
xorl %ecx, %ecx
callq 0x3110
cmpb $0x1, %al
jne 0x3ebd
movl 0x8(%rsp), %eax
movq 0x10(%rsp), %rcx
movl 0x6adf(%rip), %edx      # 0xa984
xorl %esi, %esi
xorl %ebx, %ebx
cmpq %rsi, %rax
je 0x3ec9
cmpl %edx, (%rcx,%rsi,4)
sete %dil
orb %dil, %bl
incq %rsi
jmp 0x3ea9
leaq 0x8(%rsp), %rdi
callq 0x30a0
jmp 0x3f1f
leaq 0x8(%rsp), %rdi
callq 0x30a0
testb $0x1, %bl
je 0x3f1f
leaq 0x20(%rsp), %r8
movl $0x2021, (%r8)          # imm = 0x2021
movq 0x6a55(%rip), %rax      # 0xa940
movl (%rax), %edx
movl %edx, 0x4(%r8)
movl 0x6a99(%rip), %eax      # 0xa990
movl %eax, 0x8(%r8)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r8)
movl 0x6a7b(%rip), %eax      # 0xa984
movl %eax, 0xc(%r8)
movq 0x6a64(%rip), %rdi      # 0xa978
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x3450
jmp 0x3f34
movq 0x6a52(%rip), %rdi      # 0xa978
movq 0x6a13(%rip), %rax      # 0xa940
movl (%rax), %esi
callq 0x3530
movq 0x6a3d(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x40, %rsp
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x69f1(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x3fd1
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x3fd1
movq 0x18(%rcx), %rcx
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0x3fd1
subq $0x18, %rsp
movq (%rcx), %rcx
movq %rcx, 0x38(%rax)
movl (%rax), %edi
callq 0x5fa1
movq 0x69bd(%rip), %rdi      # 0xa940
callq 0x4135
movq 0x69b1(%rip), %rdi      # 0xa940
callq 0x6354
movq 0x69dd(%rip), %rdi      # 0xa978
movq 0x699e(%rip), %rax      # 0xa940
movl (%rax), %edx
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3050
movq 0x69b0(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x18, %rsp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x6965(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x405d
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x405d
movq 0x18(%rcx), %rcx
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
je 0x405d
subq $0x18, %rsp
movq (%rcx), %rcx
movq %rcx, 0x38(%rax)
movl (%rax), %edi
callq 0x5fa1
movq 0x6931(%rip), %rdi      # 0xa940
callq 0x4135
movq 0x6925(%rip), %rdi      # 0xa940
callq 0x6354
movq 0x6951(%rip), %rdi      # 0xa978
movq 0x6912(%rip), %rax      # 0xa940
movl (%rax), %edx
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3050
movq 0x6924(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x18, %rsp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x18, %rsp
cmpb $0x1, 0x6906(%rip)      # 0xa974
jne 0x40c2
movq %rdi, %rbx
movaps 0x3066(%rip), %xmm0     # 0x70e0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq 0x68f0(%rip), %rdi      # 0xa978
movl (%rbx), %esi
callq 0x30d0
movq 0x68e2(%rip), %rdi      # 0xa978
movl (%rbx), %edx
movl 0x68ee(%rip), %ecx      # 0xa98c
xorl %ebx, %ebx
pushq $0x20
popq %r9
xorl %esi, %esi
movl %ecx, %r8d
pushq %r14
pushq $0x2
callq 0x3520
popq %rcx
popq %rdx
movq 0x68bd(%rip), %rdi      # 0xa978
callq 0x3150
jmp 0x40c5
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x26cd(%rip), %rdi      # 0x73f3
callq 0x30c0
leaq 0x2723(%rip), %rdi      # 0x7455
callq 0x30c0
leaq 0x2732(%rip), %rdi      # 0x7470
callq 0x30c0
leaq 0x2740(%rip), %rdi      # 0x748a
callq 0x30c0
leaq 0x2770(%rip), %rdi      # 0x74c6
callq 0x30c0
leaq 0x27b4(%rip), %rdi      # 0x7516
callq 0x30c0
leaq 0x27de(%rip), %rdi      # 0x754c
popq %rax
jmp 0x30c0
// File: /workspace/github_c_makefile_star2_O2/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 0x5bc2(%rip), %rax      # 0xa948
movl 0x4(%rax), %ebp
movq 0x5be8(%rip), %r14      # 0xa978
callq 0x3140
movzwl %ax, %edx
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rcx
callq 0x3330
movq 0x5bcc(%rip), %rdi      # 0xa978
leaq 0x8(%rsp), %r14
movl %eax, %esi
movq %r14, %rdx
callq 0x33a0
cmpq $0x0, (%r14)
jne 0x4dcd
movl 0x8(%rax), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x5224(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x24b2(%rip), %rsi      # 0x7290
movq %rbx, %rdx
xorl %eax, %eax
callq 0x32d0
movq 0x5b89(%rip), %rdi      # 0xa978
callq 0x3430
pushq $0x1
popq %rdi
callq 0x3500
// File: /workspace/github_c_makefile_star2_O2/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 0x4c32(%rip), %rdi      # 0xa978
pushq $0x1
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x34d0
movq 0x4c1f(%rip), %rdi      # 0xa978
callq 0x3150
movq 0x4c13(%rip), %rdi      # 0xa978
callq 0x3430
movl %ebx, %edi
callq 0x3500
// File: /workspace/github_c_makefile_star2_O2/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 0x4b17(%rip), %rax      # 0xa940
testq %rax, %rax
je 0x5e6a
movl (%rax), %eax
movq 0x4b11(%rip), %rcx      # 0xa948
cmpl (%rcx), %eax
je 0x5e6a
pushq %rax
movl %edi, %esi
movl 0x4b28(%rip), %eax      # 0xa96c
leaq 0x4(%rsp), %rcx
movl %eax, (%rcx)
movq 0x4b26(%rip), %rdi      # 0xa978
pushq $0x8
popq %rdx
callq 0x30f0
movq 0x4b17(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/tkln[P]mcwm/mcwm.c
// Function: fixwindow
void fixwindow(struct client *client, bool setcolour)
{
    uint32_t values[1];
    uint32_t ws;
    
    if (NULL == client)
    {
        return;
    }
    
    if (client->fixed)
    {
        client->fixed = false;
        setwmdesktop(client->id, curws);

        if (setcolour)
        {
            /* Set border color to ordinary focus colour. */
            values[0] = conf.focuscol;
            xcb_change_window_attributes(conn, client->id, XCB_CW_BORDER_PIXEL,
                                         values);
        }

        /* Delete from all workspace lists except current. */
        for (ws = 0; ws < WORKSPACES; ws ++)
        {
            if (ws != curws)
            {
                delfromworkspace(client, ws);
            }
        }
    }
    else
    {
        /*
         * First raise the window. If we're going to another desktop
         * we don't want this fixed window to be occluded behind
         * something else.
         */
        raisewindow(client->id);
        
        client->fixed = true;
        setwmdesktop(client->id, NET_WM_FIXED);

        /* Add window to all workspace lists. */
        for (ws = 0; ws < WORKSPACES; ws ++)
        {
            if (ws != curws)
            {
                addtoworkspace(client, ws);
            }
        }

        if (setcolour)
        {
            /* Set border color to fixed colour. */
            values[0] = conf.fixedcol;
            xcb_change_window_attributes(conn, client->id, XCB_CW_BORDER_PIXEL,
                                         values);
        }
    }

    xcb_flush(conn);    
}

// Assembly:
testq %rdi, %rdi
je 0x5f46
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
cmpb $0x1, 0x32(%rdi)
jne 0x5ed8
movb $0x0, 0x32(%rbx)
movl (%rbx), %edi
movl 0x4a2d(%rip), %esi      # 0xa8c0
callq 0x5f47
testb %bpl, %bpl
je 0x5ebb
movl 0x4ac5(%rip), %eax      # 0xa968
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movq 0x4ac7(%rip), %rdi      # 0xa978
movl (%rbx), %esi
pushq $0x8
popq %rdx
callq 0x30f0
xorl %ebp, %ebp
cmpl $0xa, %ebp
je 0x5f32
cmpl 0x49f8(%rip), %ebp      # 0xa8c0
je 0x5ed4
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5f74
incl %ebp
jmp 0x5ebd
movl (%rbx), %edi
callq 0x5fa1
movb $0x1, 0x32(%rbx)
movl (%rbx), %edi
pushq $-0x1
popq %rsi
callq 0x5f47
xorl %r14d, %r14d
cmpl $0xa, %r14d
je 0x5f0f
cmpl 0x49c3(%rip), %r14d     # 0xa8c0
je 0x5f0a
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5fda
incl %r14d
jmp 0x5ef0
testb %bpl, %bpl
je 0x5f32
movl 0x4a56(%rip), %eax      # 0xa970
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movq 0x4a50(%rip), %rdi      # 0xa978
movl (%rbx), %esi
pushq $0x8
popq %rdx
callq 0x30f0
movq 0x4a3f(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, 0x4(%rsp)
testl %edi, %edi
je 0x5fd8
movl %edi, %esi
movq 0x4994(%rip), %rax      # 0xa948
cmpl %edi, (%rax)
je 0x5fd8
movq 0x49b9(%rip), %rdi      # 0xa978
pushq $0x40
popq %rdx
leaq 0x4(%rsp), %rcx
callq 0x3200
movq 0x49a5(%rip), %rdi      # 0xa978
callq 0x3150
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/tkln[P]mcwm/mcwm.c
// Function: setborders
void setborders(struct client *client, int width)
{
    uint32_t values[1];
    uint32_t mask = 0;
    
    values[0] = width;

    mask |= XCB_CONFIG_WINDOW_BORDER_WIDTH;
    xcb_configure_window(conn, client->id, mask, &values[0]);
    xcb_flush(conn);
}

// Assembly:
pushq %rax
leaq 0x4(%rsp), %rcx
movl %esi, (%rcx)
movq 0x4949(%rip), %rax      # 0xa978
movl (%rdi), %esi
pushq $0x10
popq %rdx
movq %rax, %rdi
callq 0x3200
movq 0x4935(%rip), %rdi      # 0xa978
callq 0x3150
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x608b
movl %edi, %eax
movq 0x48f1(%rip), %rcx      # 0xa948
cmpl %edi, (%rcx)
je 0x608b
pushq %rax
movzwl %si, %esi
movq %rsp, %rcx
movl %esi, (%rcx)
movzwl %dx, %edx
movl %edx, 0x4(%rcx)
movq 0x4907(%rip), %rdi      # 0xa978
pushq $0x3
popq %rdx
movl %eax, %esi
callq 0x3200
movq 0x48f6(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x60cd
movl %edi, %eax
movq 0x48af(%rip), %rcx      # 0xa948
cmpl %edi, (%rcx)
je 0x60cd
pushq %rax
movzwl %si, %esi
movq %rsp, %rcx
movl %esi, (%rcx)
movzwl %dx, %edx
movl %edx, 0x4(%rcx)
movq 0x48c5(%rip), %rdi      # 0xa978
pushq $0xc
popq %rdx
movl %eax, %esi
callq 0x3200
movq 0x48b4(%rip), %rdi      # 0xa978
callq 0x3150
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x623d
movswl 0x10(%rsi), %edx
movswl 0x12(%rsi), %eax
jmp 0x6248
xorl %edx, %edx
movq 0x4702(%rip), %rsi      # 0xa948
xorl %eax, %eax
movzwl 0x16(%rsi), %ecx
movzwl 0x14(%rsi), %r8d
movzwl 0x18(%rdi), %esi
testw %si, %si
je 0x6264
cmpw %si, 0xc(%rdi)
jae 0x6264
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 0x628e
movw %r9w, 0xa(%rdi)
movl %r9d, %esi
pushq %rbx
movswl 0x6(%rdi), %r10d
movzwl %si, %r9d
addl %r10d, %r9d
movl 0x46ae(%rip), %r11d     # 0xa950
leal (%r9,%r11,2), %ebx
movl %r11d, %r9d
addl %r11d, %r9d
leal (%rdx,%r8), %r11d
cmpl %r11d, %ebx
popq %rbx
jle 0x62c7
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 0x62f1
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 0x608c
// File: /workspace/github_c_makefile_star2_O2/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 0x4665(%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 0x6348
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_O2/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 0x6368
movzwl 0x10(%rcx), %edx
movzwl 0x12(%rcx), %r8d
jmp 0x6374
movq 0x45d9(%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 0x638b
movw %dx, 0x6(%rdi)
movl %edx, %ecx
movswl %dx, %r9d
movzwl 0x8(%rdi), %edx
cmpw %r8w, %dx
jge 0x63a1
movw %r8w, 0x8(%rdi)
movl %r8d, %edx
movswl %r8w, %r8d
movswl %cx, %r11d
movzwl 0xa(%rdi), %r10d
addl %r10d, %r11d
addl %r9d, %esi
movl 0x4595(%rip), %r9d      # 0xa950
addl %r9d, %r9d
subl %r9d, %esi
negl %r9d
cmpl %esi, %r11d
jle 0x63d2
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 0x63f0
subl %esi, %eax
movw %ax, 0x8(%rdi)
movl %eax, %edx
movl (%rdi), %edi
movzwl %cx, %esi
movzwl %dx, %edx
jmp 0x604a