	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PDebugShowPalette              ## -- Begin function PDebugShowPalette
	.p2align	4, 0x90
_PDebugShowPalette:                     ## @PDebugShowPalette
	.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	%esi, %ebx
	movq	%rdi, %r14
	movq	_Pico@GOTPCREL(%rip), %r15
	movl	$1, (%r15)
	movq	_PicoAHW@GOTPCREL(%rip), %rax
	movq	_PAHW_SMS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_PicoDoHighPal555M4
	jmp	LBB0_3
LBB0_2:
	movl	$1, %edi
	callq	_PicoDoHighPal555
LBB0_3:
	movl	$1, (%r15)
	movq	_HighPal@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %r9
	shll	$4, %ebx
	movslq	%ebx, %r8
	leaq	(%r14,%r8,2), %rsi
	addq	$18, %rsi
	addq	%r9, %r9
	xorl	%r10d, %r10d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	leal	(%r10,%r10), %ebx
	andl	$2147483632, %ebx               ## imm = 0x7FFFFFF0
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%edx, %ecx
	shrl	$3, %ecx
	addl	%ebx, %ecx
	movzwl	(%rax,%rcx,2), %edi
	movw	%di, -2(%rsi,%rdx,2)
	movzwl	(%rax,%rcx,2), %ecx
	movw	%cx, (%rsi,%rdx,2)
	addq	$2, %rdx
	cmpq	$128, %rdx
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r10
	addq	%r9, %rsi
	cmpq	$32, %r10
	jne	LBB0_4
## %bb.7:
	leaq	(%r14,%r8,2), %rsi
	addq	$338, %rsi                      ## imm = 0x152
	xorl	%r10d, %r10d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	leal	(%r10,%r10), %ebx
	andl	$2147483632, %ebx               ## imm = 0x7FFFFFF0
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%edx, %ecx
	shrl	$3, %ecx
	addl	%ebx, %ecx
	orl	$64, %ecx
	movzwl	(%rax,%rcx,2), %edi
	movw	%di, -2(%rsi,%rdx,2)
	movzwl	(%rax,%rcx,2), %ecx
	movw	%cx, (%rsi,%rdx,2)
	addq	$2, %rdx
	cmpq	$128, %rdx
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	incq	%r10
	addq	%r9, %rsi
	cmpq	$32, %r10
	jne	LBB0_8
## %bb.11:
	leal	(%r8,%r8,2), %ecx
	movslq	%ecx, %rcx
	addq	%r8, %rcx
	leaq	(%r14,%rcx,2), %rdx
	addq	$338, %rdx                      ## imm = 0x152
	xorl	%r8d, %r8d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	leal	(%r8,%r8), %edi
	andl	$2147483632, %edi               ## imm = 0x7FFFFFF0
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %ecx
	shrl	$3, %ecx
	addl	%edi, %ecx
	orl	$128, %ecx
	movzwl	(%rax,%rcx,2), %esi
	movw	%si, -2(%rdx,%rbx,2)
	movzwl	(%rax,%rcx,2), %ecx
	movw	%cx, (%rdx,%rbx,2)
	addq	$2, %rbx
	cmpq	$128, %rbx
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%r8
	addq	%r9, %rdx
	cmpq	$32, %r8
	jne	LBB0_12
## %bb.15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico,4,2                       ## @Pico
	.comm	_PicoAHW,4,2                    ## @PicoAHW
	.comm	_PAHW_SMS,4,2                   ## @PAHW_SMS
	.comm	_HighPal,8,3                    ## @HighPal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PDebugShowPalette              ; -- Begin function PDebugShowPalette
	.p2align	2
_PDebugShowPalette:                     ; @PDebugShowPalette
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _Pico@GOTPAGE
Lloh1:
	ldr	x21, [x21, _Pico@GOTPAGEOFF]
	mov	w8, #1
Lloh2:
	adrp	x9, _PicoAHW@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PicoAHW@GOTPAGEOFF]
	str	w8, [x21]
Lloh4:
	ldr	w8, [x9]
Lloh5:
	adrp	x9, _PAHW_SMS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PAHW_SMS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	bl	_PicoDoHighPal555M4
	b	LBB0_3
LBB0_2:
	mov	w0, #1
	bl	_PicoDoHighPal555
LBB0_3:
	mov	x10, #0
	mov	w8, #1
	str	w8, [x21]
	sxtw	x9, w19
	add	x8, x20, x9, lsl #5
	add	x11, x8, #16
Lloh8:
	adrp	x8, _HighPal@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HighPal@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	sbfiz	x12, x19, #1, #32
	mov	x13, x11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	x14, #0
	lsl	w15, w10, #1
	and	w15, w15, #0x7ffffff0
LBB0_5:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w16, w15, w14, lsr #3
	ldrh	w16, [x8, w16, uxtw #1]
	strh	w16, [x13, x14, lsl #1]
	add	x14, x14, #1
	cmp	x14, #128
	b.ne	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #1
	add	x13, x13, x12
	cmp	x10, #32
	b.ne	LBB0_4
; %bb.7:
	mov	x12, #0
	add	x11, x11, #320
	lsl	x10, x9, #1
	mov	x13, x11
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	mov	x14, #0
	lsl	w15, w12, #1
	and	w15, w15, #0x7ffffff0
LBB0_9:                                 ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w16, w15, w14, lsr #3
	orr	w16, w16, #0x40
	ldrh	w16, [x8, w16, uxtw #1]
	strh	w16, [x13, x14, lsl #1]
	add	x14, x14, #1
	cmp	x14, #128
	b.ne	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x12, x12, #1
	add	x13, x13, x10
	cmp	x12, #32
	b.ne	LBB0_8
; %bb.11:
	mov	x12, #0
	mov	w13, #96
	madd	x9, x9, x13, x11
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	mov	x11, #0
	lsl	w13, w12, #1
	and	w13, w13, #0x7ffffff0
LBB0_13:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w14, w13, w11, lsr #3
	orr	w14, w14, #0x80
	ldrh	w14, [x8, w14, uxtw #1]
	strh	w14, [x9, x11, lsl #1]
	add	x11, x11, #1
	cmp	x11, #128
	b.ne	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x12, x12, #1
	add	x9, x9, x10
	cmp	x12, #32
	b.ne	LBB0_12
; %bb.15:
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico,4,2                       ; @Pico
	.comm	_PicoAHW,4,2                    ; @PicoAHW
	.comm	_PAHW_SMS,4,2                   ; @PAHW_SMS
	.comm	_HighPal,8,3                    ; @HighPal
.subsections_via_symbols
