// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]wld/intel.c
// Function: renderer_copy_rectangle
void
renderer_copy_rectangle(struct wld_renderer *base,
                        struct buffer *buffer_base,
                        int32_t dst_x, int32_t dst_y,
                        int32_t src_x, int32_t src_y,
                        uint32_t width, uint32_t height)
{
	struct intel_renderer *renderer = intel_renderer(base);

	if (buffer_base->base.impl != &wld_buffer_impl)
		return;

	struct intel_buffer *src = intel_buffer(&buffer_base->base),
	                    *dst = renderer->target;

	xy_src_copy_blt(&renderer->batch,
	                src->bo, src->base.base.pitch, src_x, src_y,
	                dst->bo, dst->base.base.pitch, dst_x, dst_y, width, height);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0xc8a7(%rip), %rax      # 0x179f0
cmpq %rax, (%rdi)
jne 0xb36c
leaq 0xc8df(%rip), %rax      # 0x17a38
cmpq %rax, (%rsi)
jne 0xb35d
movl %ecx, %r13d
movq %rdi, %rbx
movl %edx, 0xc(%rsp)
movl %r9d, 0x14(%rsp)
movl %r8d, 0x18(%rsp)
movl 0x70(%rsp), %r14d
movq 0x8028(%rdi), %rax
leaq 0x10(%rdi), %r12
movq 0x60(%rsi), %rcx
movq %rcx, 0x20(%rsp)
movzwl 0x10(%rsi), %ecx
movl %ecx, 0x10(%rsp)
movq 0x60(%rax), %rbp
movzwl 0x10(%rax), %eax
movl %eax, 0x8(%rsp)
movq 0x10(%rdi), %rax
xorl %ecx, %ecx
cmpl $0x8, (%rax)
setge %cl
leal 0x8(,%rcx,2), %eax
movl $0x1ffe, %ecx           # imm = 0x1FFE
subl 0x8020(%rdi), %ecx
cmpl %eax, %ecx
jae 0xb1cd
movq %r12, %rdi
callq 0xc1c4
leaq 0x1c(%rsp), %rsi
movq %r12, 0x28(%rsp)
leaq 0x34(%rsp), %r12
movq %rbp, %rdi
movq %r12, %rdx
callq 0x9350
leaq 0x4(%rsp), %rsi
movq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r12, %rdx
callq 0x9350
movq 0x18(%rbx), %rdi
movl 0x8020(%rbx), %eax
leal 0x10(,%rax,4), %esi
movq %rbp, %rdx
xorl %ecx, %ecx
movl $0x2, %r8d
movl $0x2, %r9d
callq 0x9740
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdi
xorl %ecx, %ecx
cmpl $0x8, (%rax)
setge %cl
addl 0x8020(%rbx), %ecx
leal 0x1c(,%rcx,4), %esi
movq %r15, %rdx
xorl %ecx, %ecx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0x9740
xorl %eax, %eax
leaq 0x4(%rsp), %rcx
cmpl $0x0, (%rcx)
setne %al
shll $0xf, %eax
movl 0x8(%rsp), %edi
movl %edi, %ecx
shrl $0x2, %ecx
xorl %edx, %edx
leaq 0x1c(%rsp), %rsi
cmpl $0x0, (%rsi)
setne %dl
movq 0x10(%rbx), %rsi
cmovel %edi, %ecx
shll $0xb, %edx
orl %eax, %edx
xorl %eax, %eax
cmpl $0x8, (%rsi)
setge %al
leal (%rdx,%rax,2), %edx
addl $0x54f00006, %edx       # imm = 0x54F00006
orl $0x3cc0000, %ecx        # imm = 0x3CC0000
movl 0x78(%rsp), %eax
addl %r13d, %eax
shll $0x10, %r13d
movl $0xffff, %r12d          # imm = 0xFFFF
movl 0xc(%rsp), %esi
andl %r12d, %esi
orl %esi, %r13d
shll $0x10, %eax
andl %r12d, %r14d
addl %esi, %r14d
orl %eax, %r14d
movq 0x28(%rsp), %r15
movq %r15, %rdi
movl $0x4, %esi
movl %r13d, %r8d
movl %r14d, %r9d
xorl %eax, %eax
callq 0xb7d6
movq 0x10(%rbx), %rax
xorl %esi, %esi
cmpl $0x8, (%rax)
setge %sil
incl %esi
movq 0x30(%rbp), %rdx
movq %rdx, %rcx
shrq $0x20, %rcx
movq %r15, %rdi
xorl %eax, %eax
callq 0xb7d6
movl 0x14(%rsp), %eax
shll $0x10, %eax
movl 0x18(%rsp), %edx
andl %r12d, %edx
orl %eax, %edx
movl 0x10(%rsp), %eax
movl %eax, %ecx
shrl $0x2, %ecx
leaq 0x4(%rsp), %rsi
cmpl $0x0, (%rsi)
cmovel %eax, %ecx
movq %r15, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0xb7d6
movq 0x10(%rbx), %rax
xorl %esi, %esi
cmpl $0x8, (%rax)
setge %sil
incl %esi
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rdx
movq %rdx, %rcx
shrq $0x20, %rcx
movq %r15, %rdi
xorl %eax, %eax
callq 0xb7d6
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5a86(%rip), %rdi      # 0x10df9
leaq 0x5a06(%rip), %rsi      # 0x10d80
leaq 0x5a9b(%rip), %rcx      # 0x10e1c
movl $0x39, %edx
callq 0x9380