	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoDrawUpdateHighPal          ## -- Begin function PicoDrawUpdateHighPal
	.p2align	4, 0x90
_PicoDrawUpdateHighPal:                 ## @PicoDrawUpdateHighPal
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_Pico@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	48(%rax), %eax
	shrl	$3, %eax
	andl	$1, %eax
	movq	_PicoOpt@GOTPCREL(%rip), %rcx
	movq	_POPT_ALT_RENDERER@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%edi, %edi
	andl	(%rcx), %edx
	cmovel	%eax, %edi
	callq	_PicoDoHighPal555
	movq	_rendstatus@GOTPCREL(%rip), %rax
	movq	_PDRAW_SONIC_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_HighPal@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	leaq	64(%rsi), %rdi
	movl	$128, %edx
	callq	_memcpy
	movq	(%rbx), %rsi
	leaq	128(%rsi), %rdi
	movl	$128, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico,8,3                       ## @Pico
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_POPT_ALT_RENDERER,4,2          ## @POPT_ALT_RENDERER
	.comm	_rendstatus,4,2                 ## @rendstatus
	.comm	_PDRAW_SONIC_MODE,4,2           ## @PDRAW_SONIC_MODE
	.comm	_HighPal,8,3                    ## @HighPal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoDrawUpdateHighPal          ; -- Begin function PicoDrawUpdateHighPal
	.p2align	2
_PicoDrawUpdateHighPal:                 ; @PicoDrawUpdateHighPal
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _Pico@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Pico@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8, #48]
	ubfx	w8, w8, #3, #1
Lloh3:
	adrp	x9, _PicoOpt@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PicoOpt@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _POPT_ALT_RENDERER@GOTPAGE
Lloh7:
	ldr	x10, [x10, _POPT_ALT_RENDERER@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	csel	w0, w8, wzr, eq
	bl	_PicoDoHighPal555
Lloh9:
	adrp	x8, _rendstatus@GOTPAGE
Lloh10:
	ldr	x8, [x8, _rendstatus@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _PDRAW_SONIC_MODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PDRAW_SONIC_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh15:
	adrp	x19, _HighPal@GOTPAGE
Lloh16:
	ldr	x19, [x19, _HighPal@GOTPAGEOFF]
	ldr	x1, [x19]
	add	x0, x1, #64
	mov	w2, #128
	bl	_memcpy
	ldr	x1, [x19]
	add	x0, x1, #128
	mov	w2, #128
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_memcpy
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico,8,3                       ; @Pico
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_POPT_ALT_RENDERER,4,2          ; @POPT_ALT_RENDERER
	.comm	_rendstatus,4,2                 ; @rendstatus
	.comm	_PDRAW_SONIC_MODE,4,2           ; @PDRAW_SONIC_MODE
	.comm	_HighPal,8,3                    ; @HighPal
.subsections_via_symbols
