	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function EmuScanEnd16_ld
_EmuScanEnd16_ld:                       ## @EmuScanEnd16_ld
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_DrawLineDest@GOTPCREL(%rip), %r12
	movq	(%r12), %r14
	movq	_ld_counter@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_emu_scan_end
	incl	(%r15)
	movq	_ld_left@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	-1(%rcx), %rdx
	movq	%rdx, (%rax)
	cmpq	$1, %rcx
	jg	LBB0_2
## %bb.1:
	movq	_ld_lines@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movl	%ebx, %edi
	callq	_EmuScanBegin16_ld
	movq	(%r12), %rdi
	movq	_gp2x_current_bpp@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %edx
	movq	%r14, %rsi
	callq	_memcpy32
	movl	(%r15), %edi
	callq	_emu_scan_end
	incl	(%r15)
LBB0_2:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DrawLineDest,8,3               ## @DrawLineDest
	.comm	_ld_counter,4,2                 ## @ld_counter
	.comm	_ld_left,8,3                    ## @ld_left
	.comm	_ld_lines,8,3                   ## @ld_lines
	.comm	_gp2x_current_bpp,4,2           ## @gp2x_current_bpp
	.no_dead_strip	_EmuScanEnd16_ld
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function EmuScanEnd16_ld
_EmuScanEnd16_ld:                       ; @EmuScanEnd16_ld
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
Lloh0:
	adrp	x22, _DrawLineDest@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DrawLineDest@GOTPAGEOFF]
	ldr	x19, [x22]
Lloh2:
	adrp	x21, _ld_counter@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ld_counter@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_emu_scan_end
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
Lloh4:
	adrp	x8, _ld_left@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ld_left@GOTPAGEOFF]
	ldr	x9, [x8]
	subs	x9, x9, #1
	str	x9, [x8]
	b.gt	LBB0_2
; %bb.1:
Lloh6:
	adrp	x9, _ld_lines@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ld_lines@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	str	x9, [x8]
	mov	x0, x20
	bl	_EmuScanBegin16_ld
	ldr	x0, [x22]
Lloh9:
	adrp	x8, _gp2x_current_bpp@GOTPAGE
Lloh10:
	ldr	x8, [x8, _gp2x_current_bpp@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	add	w8, w8, w8, lsl #2
	lsl	w2, w8, #1
	mov	x1, x19
	bl	_memcpy32
	ldr	w0, [x21]
	bl	_emu_scan_end
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DrawLineDest,8,3               ; @DrawLineDest
	.comm	_ld_counter,4,2                 ; @ld_counter
	.comm	_ld_left,8,3                    ; @ld_left
	.comm	_ld_lines,8,3                   ; @ld_lines
	.comm	_gp2x_current_bpp,4,2           ; @gp2x_current_bpp
	.no_dead_strip	_EmuScanEnd16_ld
.subsections_via_symbols
