// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: completemirror
void completemirror(void)
{
	int i, dy;
	intptr_t p;

#if USE_POLYMOST
	if (rendmode) return;
#endif

		//Can't reverse with uninitialized data
	if (inpreparemirror) { inpreparemirror = 0; return; }
	if (mirrorsx1 > 0) mirrorsx1--;
	if (mirrorsx2 < windowx2-windowx1-1) mirrorsx2++;
	if (mirrorsx2 < mirrorsx1) return;

	p = frameplace+ylookup[windowy1+mirrorsy1]+windowx1+mirrorsx1;
	i = windowx2-windowx1-mirrorsx2-mirrorsx1; mirrorsx2 -= mirrorsx1;
	for(dy=mirrorsy2-mirrorsy1-1;dy>=0;dy--)
	{
		copybufbyte((void*)(p+1),tempbuf,mirrorsx2+1);
		tempbuf[mirrorsx2] = tempbuf[mirrorsx2-1];
		copybufreverse(&tempbuf[mirrorsx2],(void*)(p+i),mirrorsx2+1);
		p += ylookup[1];
		faketimerhandler();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x594f21(%rip), %rax    # 0x5ed920
cmpl $0x0, (%rax)
je 0x58a09
jmp 0x58b8b
cmpb $0x0, 0x19cb8e(%rip)    # 0x1f559e
je 0x58a1e
movb $0x0, 0x19cb85(%rip)    # 0x1f559e
jmp 0x58b8b
cmpl $0x0, 0x3b9ae7(%rip)    # 0x41250c
jle 0x58a36
movl 0x3b9adf(%rip), %eax    # 0x41250c
addl $-0x1, %eax
movl %eax, 0x3b9ad6(%rip)    # 0x41250c
movl 0x3b9ad4(%rip), %eax    # 0x412510
movl 0x3ea2fe(%rip), %ecx    # 0x442d40
subl 0x3b5708(%rip), %ecx    # 0x40e150
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x58a5e
movl 0x3b9abb(%rip), %eax    # 0x412510
addl $0x1, %eax
movl %eax, 0x3b9ab2(%rip)    # 0x412510
movl 0x3b9aac(%rip), %eax    # 0x412510
cmpl 0x3b9aa2(%rip), %eax    # 0x41250c
jge 0x58a71
jmp 0x58b8b
leaq 0x162198(%rip), %rax    # 0x1bac10
movq (%rax), %rax
movl 0x3b6d5f(%rip), %ecx    # 0x40f7e0
addl 0x3bda99(%rip), %ecx    # 0x416520
movslq %ecx, %rdx
leaq 0x3f8fef(%rip), %rcx    # 0x451a80
movslq (%rcx,%rdx,4), %rcx
addq %rcx, %rax
movslq 0x3b56b1(%rip), %rcx    # 0x40e150
addq %rcx, %rax
movslq 0x3b9a63(%rip), %rcx    # 0x41250c
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl 0x3ea28a(%rip), %eax    # 0x442d40
subl 0x3b5694(%rip), %eax    # 0x40e150
subl 0x3b9a4e(%rip), %eax    # 0x412510
subl 0x3b9a44(%rip), %eax    # 0x41250c
movl %eax, -0x4(%rbp)
movl 0x3b9a3b(%rip), %ecx    # 0x41250c
movl 0x3b9a39(%rip), %eax    # 0x412510
subl %ecx, %eax
movl %eax, 0x3b9a31(%rip)    # 0x412510
movl 0x3bda3f(%rip), %eax    # 0x416524
subl 0x3bda35(%rip), %eax    # 0x416520
subl $0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0x58b8b
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
movl 0x3b9a07(%rip), %edx    # 0x412510
addl $0x1, %edx
leaq 0x3bda1d(%rip), %rsi    # 0x416530
callq 0x6ef00
movl 0x3b99f2(%rip), %eax    # 0x412510
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x3bda05(%rip), %rax    # 0x416530
movb (%rax,%rcx), %dl
movslq 0x3b99db(%rip), %rcx    # 0x412510
leaq 0x3bd9f4(%rip), %rax    # 0x416530
movb %dl, (%rax,%rcx)
movslq 0x3b99ca(%rip), %rax    # 0x412510
leaq 0x3bd9e3(%rip), %rdi    # 0x416530
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movslq -0x4(%rbp), %rax
addq %rax, %rsi
movl 0x3b99af(%rip), %edx    # 0x412510
addl $0x1, %edx
callq 0x6ef60
movslq 0x3f8f14(%rip), %rax    # 0x451a84
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
callq 0xc220
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x58af1
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)