	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function EmuScanSlowEnd
_EmuScanSlowEnd:                        ## @EmuScanSlowEnd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_Pico@GOTPCREL(%rip), %r14
	cmpq	$0, 8(%r14)
	je	LBB0_4
## %bb.1:
	movq	_dynamic_palette@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jne	LBB0_3
## %bb.2:
	movl	%ebx, %edi
	callq	_do_slowmode_lines
	movl	$3, (%r15)
LBB0_3:
	movl	$1, %edi
	movl	$1, %esi
	callq	_do_pal_update
LBB0_4:
	movq	_dynamic_palette@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	(%r14), %rax
	movl	48(%rax), %ecx
	andl	$1, %ecx
	orl	$4, %ecx
	shll	$6, %ecx
	movq	_VRAM_STUFF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shll	$10, %ebx
	leaq	(%rax,%rbx), %rdi
	addq	$122880, %rdi                   ## imm = 0x1E000
	movq	_HighCol@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$8, %rsi
	movq	_localPal@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_amips_clut_f
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico,16,3                      ## @Pico
	.comm	_dynamic_palette,4,2            ## @dynamic_palette
	.comm	_VRAM_STUFF,8,3                 ## @VRAM_STUFF
	.comm	_HighCol,8,3                    ## @HighCol
	.comm	_localPal,4,2                   ## @localPal
	.no_dead_strip	_EmuScanSlowEnd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function EmuScanSlowEnd
_EmuScanSlowEnd:                        ; @EmuScanSlowEnd
	.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	x19, x0
Lloh0:
	adrp	x20, _Pico@GOTPAGE
Lloh1:
	ldr	x20, [x20, _Pico@GOTPAGEOFF]
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x21, _dynamic_palette@GOTPAGE
Lloh3:
	ldr	x21, [x21, _dynamic_palette@GOTPAGEOFF]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x21]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_do_slowmode_lines
	mov	w8, #3
	str	w8, [x21]
LBB0_3:
	mov	w0, #1
	mov	w1, #1
	bl	_do_pal_update
LBB0_4:
	ldr	w8, [x21]
	cbz	w8, LBB0_6
; %bb.5:
	ldr	x8, [x20]
	ldr	w8, [x8, #48]
	tst	w8, #0x1
	mov	w8, #320
	mov	w9, #256
Lloh4:
	adrp	x10, _VRAM_STUFF@GOTPAGE
Lloh5:
	ldr	x10, [x10, _VRAM_STUFF@GOTPAGEOFF]
	csel	w3, w9, w8, eq
Lloh6:
	ldr	x8, [x10]
	lsl	w9, w19, #10
	add	x8, x8, x9
Lloh7:
	adrp	x9, _HighCol@GOTPAGE
Lloh8:
	ldr	x9, [x9, _HighCol@GOTPAGEOFF]
	add	x0, x8, #30, lsl #12            ; =122880
Lloh9:
	ldr	x8, [x9]
	add	x1, x8, #8
Lloh10:
	adrp	x8, _localPal@GOTPAGE
Lloh11:
	ldr	x8, [x8, _localPal@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	bl	_amips_clut_f
LBB0_6:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico,16,3                      ; @Pico
	.comm	_dynamic_palette,4,2            ; @dynamic_palette
	.comm	_VRAM_STUFF,8,3                 ; @VRAM_STUFF
	.comm	_HighCol,8,3                    ; @HighCol
	.comm	_localPal,4,2                   ; @localPal
	.no_dead_strip	_EmuScanSlowEnd
.subsections_via_symbols
