	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DrawDisplayM4
_DrawDisplayM4:                         ## @DrawDisplayM4
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r8d
	movq	_Pico@GOTPCREL(%rip), %rsi
	movq	8(%rsi), %rax
	movl	36(%rax), %ecx
	leal	(%rcx,%r8), %edx
	cmpl	$224, %edx
	leal	-224(%rcx,%r8), %r13d
	cmovll	%edx, %r13d
	movl	8(%rax), %ecx
	movl	32(%rax), %ebx
	andl	$14, %ecx
	shlq	$9, %rcx
	addq	%rcx, %rcx
	addq	(%rsi), %rcx
	leal	(,%r13,4), %edx
	andl	$-32, %edx
	movslq	%edx, %rdx
	cmpl	$15, %edi
	jg	LBB0_2
## %bb.1:
	xorl	%esi, %esi
	testb	$64, (%rax)
	cmovnel	%esi, %ebx
LBB0_2:
	leaq	(%rcx,%rdx,2), %r14
	movl	%ebx, %r15d
	negl	%r15d
	shrl	$3, %r15d
	andl	$31, %r15d
	addl	%r13d, %r13d
	andl	$14, %r13d
	decl	%ebx
	andl	$7, %ebx
	incl	%ebx
	xorl	%r12d, %r12d
	cmpl	$8, %ebx
	sete	%r12b
	xorl	$33, %r12d
	movq	_PicoDrawMask@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PDRAW_LAYERB_ON@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movl	%r13d, %ecx
	shll	$16, %ecx
	orl	%r15d, %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	callq	_draw_strip
	movq	_PicoDrawMask@GOTPCREL(%rip), %rdx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	(%rdx), %eax
LBB0_4:
	movq	_PDRAW_SPRITES_LOW_ON@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movl	%r8d, %edi
	callq	_draw_sprites
	movq	_PicoDrawMask@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	movq	_PDRAW_LAYERA_ON@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	shll	$16, %r13d
	leal	(%r15,%r13), %ecx
	addl	$4096, %ecx                     ## imm = 0x1000
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_draw_strip
LBB0_8:
	movq	_Pico@GOTPCREL(%rip), %rax
	movq	8(%rax), %rax
	testb	$32, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_HighCol@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movabsq	$-2242545357980376864, %rcx     ## imm = 0xE0E0E0E0E0E0E0E0
	movq	%rcx, 8(%rax)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico,16,3                      ## @Pico
	.comm	_PicoDrawMask,4,2               ## @PicoDrawMask
	.comm	_PDRAW_LAYERB_ON,4,2            ## @PDRAW_LAYERB_ON
	.comm	_PDRAW_SPRITES_LOW_ON,4,2       ## @PDRAW_SPRITES_LOW_ON
	.comm	_PDRAW_LAYERA_ON,4,2            ## @PDRAW_LAYERA_ON
	.comm	_HighCol,8,3                    ## @HighCol
	.no_dead_strip	_DrawDisplayM4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DrawDisplayM4
_DrawDisplayM4:                         ; @DrawDisplayM4
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x24, _Pico@GOTPAGE
Lloh1:
	ldr	x24, [x24, _Pico@GOTPAGEOFF]
	ldp	x11, x8, [x24]
	ldp	w9, w10, [x8, #32]
	add	w10, w10, w0
	sub	w12, w10, #224
	cmp	w10, #223
	csel	w10, w12, w10, gt
	ldr	w12, [x8, #8]
	lsl	w12, w12, #9
	and	x12, x12, #0x1c00
	add	x11, x11, x12, lsl #1
	lsl	w12, w10, #2
	and	w12, w12, #0xffffffe0
	add	x20, x11, w12, sxtw #1
	cmp	w0, #15
	b.gt	LBB0_2
; %bb.1:
	ldrb	w8, [x8]
	tst	w8, #0x40
	csel	w9, w9, wzr, eq
LBB0_2:
	neg	w8, w9
	ubfx	w21, w8, #3, #5
	ubfiz	w10, w10, #1, #3
	sub	w8, w9, #1
	and	w8, w8, #0x7
	add	w22, w8, #1
	cmp	w22, #8
	mov	w8, #32
	cinc	w23, w8, ne
Lloh2:
	adrp	x25, _PicoDrawMask@GOTPAGE
Lloh3:
	ldr	x25, [x25, _PicoDrawMask@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh4:
	adrp	x9, _PDRAW_LAYERB_ON@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PDRAW_LAYERB_ON@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	bfi	w21, w10, #16, #4
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	bl	_draw_strip
	ldr	w8, [x25]
LBB0_4:
Lloh7:
	adrp	x9, _PDRAW_SPRITES_LOW_ON@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PDRAW_SPRITES_LOW_ON@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_draw_sprites
	ldr	w8, [x25]
LBB0_6:
Lloh10:
	adrp	x9, _PDRAW_LAYERA_ON@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PDRAW_LAYERA_ON@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	orr	w3, w21, #0x1000
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_draw_strip
LBB0_8:
	ldr	x8, [x24, #8]
	ldrb	w8, [x8]
	tbz	w8, #5, LBB0_10
; %bb.9:
Lloh13:
	adrp	x8, _HighCol@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HighCol@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	movi.8b	v0, #224
	str	d0, [x8, #8]
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico,16,3                      ; @Pico
	.comm	_PicoDrawMask,4,2               ; @PicoDrawMask
	.comm	_PDRAW_LAYERB_ON,4,2            ; @PDRAW_LAYERB_ON
	.comm	_PDRAW_SPRITES_LOW_ON,4,2       ; @PDRAW_SPRITES_LOW_ON
	.comm	_PDRAW_LAYERA_ON,4,2            ; @PDRAW_LAYERA_ON
	.comm	_HighCol,8,3                    ; @HighCol
	.no_dead_strip	_DrawDisplayM4
.subsections_via_symbols
