// File: /workspace/github_c_makefile_star2_O1/kaiserschmarrn0[P]mywm/margin.c
// Function: create_margins
void create_margins() {
	traverse_margins(create_margin_window);

	uint32_t corner_width = scr->width_in_pixels / 4;
	uint32_t corner_height = scr->height_in_pixels / 4;

	uint32_t width = scr->width_in_pixels - 2 * corner_width; //odd_numbers
	uint32_t height = scr->height_in_pixels - 2 * corner_height; //odd_numbers

	/* dl */

	margins[0].rects[0].x = 0;
	margins[0].rects[0].y = scr->height_in_pixels - corner_height;
	margins[0].rects[0].width = MARGIN;
	margins[0].rects[0].height = corner_height;

	margins[0].rects[1].x = 0;
	margins[0].rects[1].y = scr->height_in_pixels - MARGIN;
	margins[0].rects[1].width = corner_width;
	margins[0].rects[1].height = MARGIN;
	
	/* l */

	margins[1].rects[0].x = 0;
	margins[1].rects[0].y = corner_height;
	margins[1].rects[0].width = MARGIN;
	margins[1].rects[0].height = height;

	/* ul */

	margins[2].rects[0].x = 0;
	margins[2].rects[0].y = 0;
	margins[2].rects[0].width = MARGIN;
	margins[2].rects[0].height = corner_height;

	margins[2].rects[1].x = 0;
	margins[2].rects[1].y = 0;
	margins[2].rects[1].width = corner_width;
	margins[2].rects[1].height = MARGIN;

	/* t */

	margins[3].rects[0].x = corner_width;
	margins[3].rects[0].y = 0;
	margins[3].rects[0].width = width;
	margins[3].rects[0].height = MARGIN;

	/* ur */

	margins[4].rects[0].x = scr->width_in_pixels - corner_width;
	margins[4].rects[0].y = 0;
	margins[4].rects[0].width = corner_width;
	margins[4].rects[0].height = MARGIN;

	margins[4].rects[1].x = scr->width_in_pixels - MARGIN;
	margins[4].rects[1].y = 0;
	margins[4].rects[1].width = MARGIN;
	margins[4].rects[1].height = corner_height;

	/* r */

	margins[5].rects[0].x = scr->width_in_pixels - MARGIN;
	margins[5].rects[0].y = corner_height;
	margins[5].rects[0].width = MARGIN;
	margins[5].rects[0].height = height;

	/* dr */

	margins[6].rects[0].x = scr->width_in_pixels - MARGIN;
	margins[6].rects[0].y = scr->height_in_pixels - corner_height;
	margins[6].rects[0].width = MARGIN;
	margins[6].rects[0].height = corner_height;

	margins[6].rects[1].x = scr->width_in_pixels - corner_width;
	margins[6].rects[1].y = scr->height_in_pixels - MARGIN;
	margins[6].rects[1].width = corner_width;
	margins[6].rects[1].height = MARGIN;
	
	traverse_margins(shape_margin);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x14, %r15d
leaq 0x4f5d(%rip), %rbx      # 0xd448
leaq 0x4e6e(%rip), %r14      # 0xd360
leaq -0x2c(%rbp), %r13
xorl %r12d, %r12d
movq (%rbx), %rdi
callq 0x3560
movl %eax, (%r15,%r14)
movl $0x30, -0x2c(%rbp)
movq (%rbx), %rdi
leaq 0x4f3a(%rip), %rcx      # 0xd450
movq (%rcx), %rdx
movl (%rdx), %ecx
movzwl 0x14(%rdx), %r10d
movzwl 0x16(%rdx), %r11d
subq $0x8, %rsp
xorl %esi, %esi
movl %eax, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r13
pushq $0x800                  # imm = 0x800
pushq %r12
pushq $0x2
pushq %r12
pushq %r11
pushq %r10
callq 0x3030
addq $0x40, %rsp
addq $0x1c, %r15
cmpq $0xd8, %r15
jne 0x84f9
leaq 0x4eef(%rip), %rax      # 0xd450
movq (%rax), %rdx
movzwl 0x14(%rdx), %ecx
movl %ecx, %eax
shrl $0x2, %eax
movzwl 0x16(%rdx), %esi
movl %esi, %edx
shrl $0x2, %edx
leal (%rax,%rax), %r10d
xorl %r15d, %r15d
movw %r15w, 0x4ddb(%rip)     # 0xd360
movl %esi, %edi
subl %edx, %edi
movl %edx, %r11d
addl %edx, %r11d
movw %di, 0x4dcc(%rip)       # 0xd362
movw $0x5, %r8w
movw %r8w, 0x4dc1(%rip)      # 0xd364
movw %dx, 0x4dbc(%rip)       # 0xd366
movw %r15w, 0x4db6(%rip)     # 0xd368
leal -0x5(%rsi), %r9d
movw %r9w, 0x4dac(%rip)      # 0xd36a
movw %ax, 0x4da7(%rip)       # 0xd36c
movw %r8w, 0x4da1(%rip)      # 0xd36e
movw %r15w, 0x4da7(%rip)     # 0xd37c
movw %dx, 0x4da2(%rip)       # 0xd37e
movw %r8w, 0x4d9c(%rip)      # 0xd380
subl %r11d, %esi
movw %si, 0x4d94(%rip)       # 0xd382
movl %r15d, 0x4da3(%rip)     # 0xd398
movw %r8w, 0x4d9f(%rip)      # 0xd39c
movw %dx, 0x4d9a(%rip)       # 0xd39e
movl %r15d, 0x4d95(%rip)     # 0xd3a0
movw %ax, 0x4d92(%rip)       # 0xd3a4
movw %r8w, 0x4d8c(%rip)      # 0xd3a6
movw %ax, 0x4d93(%rip)       # 0xd3b4
movw %r15w, 0x4d8d(%rip)     # 0xd3b6
movl %ecx, %r11d
subl %r10d, %r11d
movw %r11w, 0x4d81(%rip)     # 0xd3b8
movw %r8w, 0x4d7b(%rip)      # 0xd3ba
movl %ecx, %r10d
subl %eax, %r10d
movw %r10w, 0x4d83(%rip)     # 0xd3d0
movw %r15w, 0x4d7d(%rip)     # 0xd3d2
movw %ax, 0x4d78(%rip)       # 0xd3d4
movw %r8w, 0x4d72(%rip)      # 0xd3d6
addl $-0x5, %ecx
movw %cx, 0x4d6a(%rip)       # 0xd3d8
movl $0x50000, 0x4d62(%rip)  # imm = 0x50000
movw %dx, 0x4d5f(%rip)       # 0xd3de
movw %cx, 0x4d66(%rip)       # 0xd3ec
movw %dx, 0x4d61(%rip)       # 0xd3ee
movw %r8w, 0x4d5b(%rip)      # 0xd3f0
movw %si, 0x4d56(%rip)       # 0xd3f2
movw %cx, 0x4d65(%rip)       # 0xd408
movw %di, 0x4d60(%rip)       # 0xd40a
movw %r8w, 0x4d5a(%rip)      # 0xd40c
movw %dx, 0x4d55(%rip)       # 0xd40e
movw %r10w, 0x4d4f(%rip)     # 0xd410
movw %r9w, 0x4d49(%rip)      # 0xd412
movw %ax, 0x4d44(%rip)       # 0xd414
movw %r8w, 0x4d3e(%rip)      # 0xd416
movq (%rbx), %rdi
leaq (%r14,%r15), %rax
movl 0x10(%r15,%r14), %r10d
movl 0x14(%r15,%r14), %r8d
subq $0x8, %rsp
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq %rax
pushq %r10
pushq $0x0
callq 0x3260
addq $0x20, %rsp
addq $0x1c, %r15
cmpq $0xc4, %r15
jne 0x86d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq