// File: /workspace/github_c_makefile_star2_O2/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 0x2ba2
leaq 0x4237(%rip), %rbx      # 0x7354
xorl %r14d, %r14d
leaq 0x14a39(%rip), %r15     # 0x17b60
leaq 0x14912(%rip), %r12     # 0x17a40
cmpq $0x348, %r14            # imm = 0x348
je 0x3230
movq 0x146b6(%rip), %rdi     # 0x177f8
movq 0x14827(%rip), %rsi     # 0x17970
movl -0x10(%rbx), %eax
movl -0xc(%rbx), %r9d
addl 0x14a02(%rip), %eax     # 0x17b58
movl 0x148d3(%rip), %r8d     # 0x17a30
imull %r8d, %eax
movl 0x148cc(%rip), %r11d    # 0x17a34
cltd
idivl %r11d
movl %eax, %ecx
addl 0x149e7(%rip), %r9d     # 0x17b5c
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 0x14674(%rip), %r11     # 0x17818
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 0x1462b(%rip), %rdi     # 0x177f8
movslq (%rbx), %rcx
movq (%r12,%rcx,8), %rdx
movq %rax, %rsi
callq 0x2320
movq 0x14615(%rip), %rdi     # 0x177f8
movq (%r14,%r15), %rsi
callq 0x2210
movq 0x14605(%rip), %rdi     # 0x177f8
movq (%r14,%r15), %rsi
subq $0x8, %rsp
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x1
callq 0x22e0
popq %rcx
popq %rdx
movq 0x145e3(%rip), %rdi     # 0x177f8
movq (%r14,%r15), %rsi
movl $0x800c, %edx           # imm = 0x800C
callq 0x2260
addq $0x8, %r14
addq $0x18, %rbx
jmp 0x312e
xorl %ebx, %ebx
leaq 0x3fd7(%rip), %r14      # 0x7210
pushq $0x4
popq %rbp
leaq 0x14c6d(%rip), %r15     # 0x17eb0
cmpq $0x98, %rbx
je 0x32fe
movl 0x147d9(%rip), %r11d    # 0x17a30
movl 0x8(%r14,%rbx,2), %eax
imull %r11d, %eax
movl 0x147cd(%rip), %r12d    # 0x17a34
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 0x14566(%rip), %rdi     # 0x177f8
movq 0x146d7(%rip), %rsi     # 0x17970
movl (%r14,%rbx,2), %eax
movl 0x4(%r14,%rbx,2), %ecx
addl 0x148b0(%rip), %eax     # 0x17b58
imull %r11d, %eax
cltd
idivl %r12d
movl %eax, %r10d
addl 0x148a3(%rip), %ecx     # 0x17b5c
imull %r11d, %ecx
movl %ecx, %eax
cltd
idivl %r12d
movq 0x1454e(%rip), %r11     # 0x17818
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 0x1450b(%rip), %rdi     # 0x177f8
movq %rax, %rsi
callq 0x2210
addq $0x8, %rbx
jmp 0x3243
andl $0x0, 0x14c43(%rip)     # 0x17f48
leaq 0x14c44(%rip), %rax     # 0x17f50
xorl %ecx, %ecx
leaq 0x18c3b(%rip), %rdx     # 0x1bf50
cmpq $0x8, %rcx
je 0x333f
xorl %esi, %esi
cmpq $0x100, %rsi            # imm = 0x100
je 0x3330
andq $0x0, (%rax,%rsi,8)
incq %rsi
jmp 0x331d
andl $0x0, (%rdx,%rcx,4)
incq %rcx
addq $0x800, %rax            # imm = 0x800
jmp 0x3315
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2d23