// File: /workspace/github_c_makefile_star2_O3/kyx0r[P]xkeyboard/xkeyboard.c
// Function: create_keys
void create_keys(void)
{
	int i, j, w, h;

	create_pixmaps();
	for (i = 0; i < MAX_KEYS; i++) {
		mykey[i] = XCreateSimpleWindow(dpy, mywindow,
			(ox + xk[i].x) * sn / sd, (oy + xk[i].y) * sn / sd,
			xk[i].w * sn / sd, xk[i].h * sn / sd,
			BORDER, mybackground, mybackground);
		XSetWindowBackgroundPixmap(dpy, mykey[i], mykc[xk[i].p]);
		XMapRaised(dpy, mykey[i]);
		XClearArea(dpy, mykey[i], 0, 0, 0, 0, True);
		XSelectInput(dpy, mykey[i], ButtonPressMask |
			ButtonReleaseMask | ExposureMask);
	}
	for (i = 0; i < NUM_BORDERS; i++) {
		w = mb[i].w * sn / sd;
		h = mb[i].h * sn / sd;
		if (!w)
			w = 4;
		if (!h)
			h = 4;
		myborder[i] = XCreateSimpleWindow(dpy, mywindow,
			(ox + mb[i].x) * sn / sd, (oy + mb[i].y) * sn / sd,
			w, h, 0, mybackground, mybackground);
		XMapRaised(dpy, myborder[i]);
	}
	keystate = 0;
	for (j = 0; j < 8; j++) {
		for (i = 0; i < 256; i++)
			scanname[j][i] = NULL;
		modindex[j] = 0;
	}
	create_constkeys();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
callq 0x2c43
leaq 0x5175(%rip), %rbx      # 0x8354
xorl %r14d, %r14d
leaq 0x15977(%rip), %r15     # 0x18b60
leaq 0x15850(%rip), %r12     # 0x18a40
movq 0x15601(%rip), %rdi     # 0x187f8
movq 0x15772(%rip), %rsi     # 0x18970
movl -0x10(%rbx), %eax
movl -0xc(%rbx), %r9d
addl 0x1594d(%rip), %eax     # 0x18b58
movl 0x1581e(%rip), %r8d     # 0x18a30
imull %r8d, %eax
movl 0x15817(%rip), %r11d    # 0x18a34
cltd
idivl %r11d
movl %eax, %ecx
addl 0x15932(%rip), %r9d     # 0x18b5c
imull %r8d, %r9d
movl %r9d, %eax
cltd
idivl %r11d
movl %eax, %r9d
movl -0x8(%rbx), %eax
imull %r8d, %eax
cltd
idivl %r11d
movl %eax, %r10d
imull -0x4(%rbx), %r8d
movl %r8d, %eax
cltd
idivl %r11d
movq 0x155bf(%rip), %r11     # 0x18818
subq $0x8, %rsp
movl %ecx, %edx
movl %r9d, %ecx
movl %r10d, %r8d
movl %eax, %r9d
pushq %r11
pushq %r11
pushq $0x0
callq 0x22b0
addq $0x20, %rsp
movq %rax, (%r14,%r15)
movq 0x15576(%rip), %rdi     # 0x187f8
movslq (%rbx), %rcx
movq (%r12,%rcx,8), %rdx
movq %rax, %rsi
callq 0x2320
movq 0x15560(%rip), %rdi     # 0x187f8
movq (%r14,%r15), %rsi
callq 0x2210
movq 0x15550(%rip), %rdi     # 0x187f8
movq (%r14,%r15), %rsi
subq $0x8, %rsp
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x1
callq 0x22e0
addq $0x10, %rsp
movq 0x1552c(%rip), %rdi     # 0x187f8
movq (%r14,%r15), %rsi
movl $0x800c, %edx           # imm = 0x800C
callq 0x2260
addq $0x8, %r14
addq $0x18, %rbx
cmpq $0x348, %r14            # imm = 0x348
jne 0x31f0
xorl %ebx, %ebx
leaq 0x4f18(%rip), %r14      # 0x8210
movl $0x4, %ebp
leaq 0x15bac(%rip), %r15     # 0x18eb0
movl 0x15725(%rip), %r11d    # 0x18a30
movl 0x8(%r14,%rbx,2), %eax
imull %r11d, %eax
movl 0x15719(%rip), %r12d    # 0x18a34
cltd
idivl %r12d
movl %eax, %r8d
movl 0xc(%r14,%rbx,2), %eax
imull %r11d, %eax
cltd
idivl %r12d
movl %eax, %r9d
testl %r8d, %r8d
cmovel %ebp, %r8d
testl %eax, %eax
cmovel %ebp, %r9d
movq 0x154b2(%rip), %rdi     # 0x187f8
movq 0x15623(%rip), %rsi     # 0x18970
movl (%r14,%rbx,2), %eax
movl 0x4(%r14,%rbx,2), %ecx
addl 0x157fc(%rip), %eax     # 0x18b58
imull %r11d, %eax
cltd
idivl %r12d
movl %eax, %r10d
addl 0x157ef(%rip), %ecx     # 0x18b5c
imull %r11d, %ecx
movl %ecx, %eax
cltd
idivl %r12d
movq 0x1549a(%rip), %r11     # 0x18818
subq $0x8, %rsp
movl %r10d, %edx
movl %eax, %ecx
pushq %r11
pushq %r11
pushq $0x0
callq 0x22b0
addq $0x20, %rsp
movq %rax, (%rbx,%r15)
movq 0x15457(%rip), %rdi     # 0x187f8
movq %rax, %rsi
callq 0x2210
addq $0x8, %rbx
cmpq $0x98, %rbx
jne 0x3304
movl $0x0, 0x15b84(%rip)     # 0x18f48
leaq 0x15b85(%rip), %rdi     # 0x18f50
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x2130
xorps %xmm0, %xmm0
movaps %xmm0, 0x19b6f(%rip)    # 0x1cf50
movaps %xmm0, 0x19b78(%rip)    # 0x1cf60
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2dc9