	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DrawTilesFromCache
_DrawTilesFromCache:                    ## @DrawTilesFromCache
	.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	%edx, %r14d
	movq	%rdi, %r15
	testl	%esi, %esi
	je	LBB0_9
## %bb.1:
	movq	_rendstatus@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PDRAW_SHHI_DONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PDRAW_PLANE_HI_PRIO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	testl	%eax, %edx
	je	LBB0_2
## %bb.7:
	testl	%eax, %ecx
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_DrawTilesFromCacheShPrep
LBB0_9:
	movl	(%r15), %ebx
	testl	%ebx, %ebx
	je	LBB0_55
## %bb.10:
	addq	$4, %r15
	movw	$-1, %r12w
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	callq	_TileNorm
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	testl	%eax, %eax
	cmovnel	%ebx, %r12d
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r15), %ebx
	addq	$4, %r15
	testl	%ebx, %ebx
	je	LBB0_55
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movswl	%bx, %eax
	movswl	%r12w, %ecx
	cmpl	%ecx, %eax
	je	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%ebx, %eax
	shll	$4, %eax
	andl	$32752, %eax                    ## imm = 0x7FF0
	movl	%ebx, %esi
	shrl	$25, %esi
	addl	%eax, %esi
	movl	%ebx, %edi
	shrl	$16, %edi
	andl	$511, %edi                      ## imm = 0x1FF
	movl	%ebx, %edx
	shrl	$9, %edx
	andl	$48, %edx
	cmpl	%r14d, %edi
	jg	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
	testl	$2048, %ebx                     ## imm = 0x800
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	callq	_TileFlip
	jmp	LBB0_16
LBB0_2:
	movl	(%r15), %ebx
	testl	%ebx, %ebx
	je	LBB0_55
## %bb.3:
	addq	$4, %r15
	movq	_HighCol@GOTPCREL(%rip), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	callq	_TileNorm
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r15), %ebx
	addq	$4, %r15
	testl	%ebx, %ebx
	je	LBB0_55
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	shrl	$16, %edi
	andl	$511, %edi                      ## imm = 0x1FF
	movq	(%r12), %rax
	andb	$-65, (%rax,%rdi)
	andb	$-65, 1(%rax,%rdi)
	andb	$-65, 2(%rax,%rdi)
	andb	$-65, 3(%rax,%rdi)
	movl	%ebx, %ecx
	andb	$-65, 4(%rax,%rdi)
	shll	$4, %ecx
	andb	$-65, 5(%rax,%rdi)
	andl	$32752, %ecx                    ## imm = 0x7FF0
	andb	$-65, 6(%rax,%rdi)
	andb	$-65, 7(%rax,%rdi)
	movl	%ebx, %esi
	shrl	$25, %esi
	addl	%ecx, %esi
	movl	%ebx, %edx
	shrl	$9, %edx
	andl	$48, %edx
	cmpl	%r14d, %edi
	jg	LBB0_20
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
	testl	$2048, %ebx                     ## imm = 0x800
	je	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	callq	_TileFlip
	jmp	LBB0_19
LBB0_20:
	movq	_Pico@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, %ecx
	movl	(%rax,%rcx), %eax
	testl	%eax, %eax
	je	LBB0_55
## %bb.21:
	movl	%edi, %ecx
	movq	_HighCol@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	subl	%ecx, %r14d
	addl	$7, %r14d
	testl	$2048, %ebx                     ## imm = 0x800
	jne	LBB0_22
## %bb.38:
	cmpl	$6, %r14d
	ja	LBB0_55
## %bb.39:
	leaq	LJTI0_1(%rip), %rdi
	movslq	(%rdi,%r14,4), %rbx
	addq	%rdi, %rbx
	jmpq	*%rbx
LBB0_40:
	movl	%eax, %edi
	andl	$15728640, %edi                 ## imm = 0xF00000
	je	LBB0_42
## %bb.41:
	shrl	$20, %edi
	orl	%edx, %edi
	movb	%dil, 6(%rsi,%rcx)
LBB0_42:
	movl	%eax, %edi
	andl	$251658240, %edi                ## imm = 0xF000000
	je	LBB0_44
## %bb.43:
	shrl	$24, %edi
	orl	%edx, %edi
	movb	%dil, 5(%rsi,%rcx)
LBB0_44:
	cmpl	$268435456, %eax                ## imm = 0x10000000
	jb	LBB0_46
## %bb.45:
	movl	%eax, %edi
	shrl	$28, %edi
	orl	%edx, %edi
	movb	%dil, 4(%rsi,%rcx)
LBB0_46:
	movl	%eax, %edi
	andl	$15, %edi
	je	LBB0_48
## %bb.47:
	orl	%edx, %edi
	movb	%dil, 3(%rsi,%rcx)
LBB0_48:
	movl	%eax, %edi
	andl	$240, %edi
	je	LBB0_50
## %bb.49:
	shrl	$4, %edi
	orl	%edx, %edi
	movb	%dil, 2(%rsi,%rcx)
LBB0_50:
	movl	%eax, %edi
	andl	$3840, %edi                     ## imm = 0xF00
	je	LBB0_52
## %bb.51:
	shrl	$8, %edi
	orl	%edx, %edi
	movb	%dil, 1(%rsi,%rcx)
LBB0_52:
	andl	$61440, %eax                    ## imm = 0xF000
	je	LBB0_55
## %bb.53:
	shrl	$12, %eax
	jmp	LBB0_54
LBB0_22:
	cmpl	$6, %r14d
	ja	LBB0_55
## %bb.23:
	leaq	LJTI0_0(%rip), %rdi
	movslq	(%rdi,%r14,4), %rbx
	addq	%rdi, %rbx
	jmpq	*%rbx
LBB0_24:
	movl	%eax, %edi
	andl	$3840, %edi                     ## imm = 0xF00
	je	LBB0_26
## %bb.25:
	shrl	$8, %edi
	orl	%edx, %edi
	movb	%dil, 6(%rsi,%rcx)
LBB0_26:
	movl	%eax, %edi
	andl	$240, %edi
	je	LBB0_28
## %bb.27:
	shrl	$4, %edi
	orl	%edx, %edi
	movb	%dil, 5(%rsi,%rcx)
LBB0_28:
	movl	%eax, %edi
	andl	$15, %edi
	je	LBB0_30
## %bb.29:
	orl	%edx, %edi
	movb	%dil, 4(%rsi,%rcx)
LBB0_30:
	cmpl	$268435456, %eax                ## imm = 0x10000000
	jb	LBB0_32
## %bb.31:
	movl	%eax, %edi
	shrl	$28, %edi
	orl	%edx, %edi
	movb	%dil, 3(%rsi,%rcx)
LBB0_32:
	movl	%eax, %edi
	andl	$251658240, %edi                ## imm = 0xF000000
	je	LBB0_34
## %bb.33:
	shrl	$24, %edi
	orl	%edx, %edi
	movb	%dil, 2(%rsi,%rcx)
LBB0_34:
	movl	%eax, %edi
	andl	$15728640, %edi                 ## imm = 0xF00000
	je	LBB0_36
## %bb.35:
	shrl	$20, %edi
	orl	%edx, %edi
	movb	%dil, 1(%rsi,%rcx)
LBB0_36:
	andl	$983040, %eax                   ## imm = 0xF0000
	je	LBB0_55
## %bb.37:
	shrl	$16, %eax
LBB0_54:
	orl	%edx, %eax
	movb	%al, (%rsi,%rcx)
LBB0_55:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_36, LBB0_36-LJTI0_0
.set L0_0_set_34, LBB0_34-LJTI0_0
.set L0_0_set_32, LBB0_32-LJTI0_0
.set L0_0_set_30, LBB0_30-LJTI0_0
.set L0_0_set_28, LBB0_28-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
LJTI0_0:
	.long	L0_0_set_36
	.long	L0_0_set_34
	.long	L0_0_set_32
	.long	L0_0_set_30
	.long	L0_0_set_28
	.long	L0_0_set_26
	.long	L0_0_set_24
.set L0_1_set_52, LBB0_52-LJTI0_1
.set L0_1_set_50, LBB0_50-LJTI0_1
.set L0_1_set_48, LBB0_48-LJTI0_1
.set L0_1_set_46, LBB0_46-LJTI0_1
.set L0_1_set_44, LBB0_44-LJTI0_1
.set L0_1_set_42, LBB0_42-LJTI0_1
.set L0_1_set_40, LBB0_40-LJTI0_1
LJTI0_1:
	.long	L0_1_set_52
	.long	L0_1_set_50
	.long	L0_1_set_48
	.long	L0_1_set_46
	.long	L0_1_set_44
	.long	L0_1_set_42
	.long	L0_1_set_40
	.end_data_region
                                        ## -- End function
	.comm	_rendstatus,4,2                 ## @rendstatus
	.comm	_PDRAW_SHHI_DONE,4,2            ## @PDRAW_SHHI_DONE
	.comm	_PDRAW_PLANE_HI_PRIO,4,2        ## @PDRAW_PLANE_HI_PRIO
	.comm	_HighCol,8,3                    ## @HighCol
	.comm	_Pico,8,3                       ## @Pico
	.no_dead_strip	_DrawTilesFromCache
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DrawTilesFromCache
_DrawTilesFromCache:                    ; @DrawTilesFromCache
	.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, x2
	mov	x20, x0
	cbz	w1, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _rendstatus@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rendstatus@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PDRAW_SHHI_DONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PDRAW_SHHI_DONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _PDRAW_PLANE_HI_PRIO@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PDRAW_PLANE_HI_PRIO@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w10, w10, w9
	tst	w10, w8
	b.eq	LBB0_13
; %bb.2:
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	bl	_DrawTilesFromCacheShPrep
LBB0_4:
	ldr	w21, [x20]
	cbz	w21, LBB0_55
; %bb.5:
	add	x20, x20, #4
	mov	w22, #65535
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_9 Depth=1
	bl	_TileNorm
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	cmp	w0, #0
	csel	w22, w22, w21, eq
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w21, [x20], #4
	cbz	w21, LBB0_55
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	sxth	w8, w21
	cmp	w8, w22, sxth
	b.eq	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ubfiz	w8, w21, #4, #11
	ubfx	w0, w21, #16, #9
	lsr	w9, w21, #9
	and	w2, w9, #0x30
	add	w1, w8, w21, lsr #25
	cmp	w0, w19
	b.gt	LBB0_20
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0
	tbz	w21, #11, LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	bl	_TileFlip
	b	LBB0_7
LBB0_13:
	ldr	w21, [x20]
	cbz	w21, LBB0_55
; %bb.14:
	add	x20, x20, #4
Lloh9:
	adrp	x22, _HighCol@GOTPAGE
Lloh10:
	ldr	x22, [x22, _HighCol@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=1
	bl	_TileNorm
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w21, [x20], #4
	cbz	w21, LBB0_55
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ubfx	x0, x21, #16, #9
	add	x8, x8, x0
	ldrb	w9, [x8]
	ubfiz	w10, w21, #4, #11
	and	w9, w9, #0xffffffbf
	strb	w9, [x8]
	ldrb	w9, [x8, #1]
	add	w1, w10, w21, lsr #25
	and	w9, w9, #0xffffffbf
	strb	w9, [x8, #1]
	ldrb	w9, [x8, #2]
	and	w9, w9, #0xffffffbf
	strb	w9, [x8, #2]
	ldrb	w9, [x8, #3]
	and	w9, w9, #0xffffffbf
	strb	w9, [x8, #3]
	ldrb	w9, [x8, #4]
	and	w9, w9, #0xffffffbf
	strb	w9, [x8, #4]
	ldrb	w9, [x8, #5]
	and	w9, w9, #0xffffffbf
	strb	w9, [x8, #5]
	ldrb	w9, [x8, #6]
	and	w9, w9, #0xffffffbf
	strb	w9, [x8, #6]
	ldrb	w9, [x8, #7]
	and	w9, w9, #0xffffffbf
	strb	w9, [x8, #7]
	lsr	w8, w21, #9
	and	w2, w8, #0x30
	cmp	w0, w19
	b.gt	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0
	tbz	w21, #11, LBB0_15
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	bl	_TileFlip
	b	LBB0_16
LBB0_20:
Lloh11:
	adrp	x8, _Pico@GOTPAGE
Lloh12:
	ldr	x8, [x8, _Pico@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	w9, [x8, w1, uxtw]
	cbz	w9, LBB0_55
; %bb.21:
Lloh14:
	adrp	x8, _HighCol@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HighCol@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	add	x8, x8, w0, uxtw
	sub	w10, w19, w0
	add	w10, w10, #7
	cmp	w10, #6
	tbnz	w21, #11, LBB0_38
; %bb.22:
	b.hi	LBB0_55
; %bb.23:
Lloh17:
	adrp	x11, lJTI0_1@PAGE
Lloh18:
	add	x11, x11, lJTI0_1@PAGEOFF
	adr	x12, LBB0_24
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_24:
	ands	w10, w9, #0xf00000
	b.eq	LBB0_26
; %bb.25:
	orr	w10, w2, w10, lsr #20
	strb	w10, [x8, #6]
LBB0_26:
	ands	w10, w9, #0xf000000
	b.eq	LBB0_28
; %bb.27:
	orr	w10, w2, w10, lsr #24
	strb	w10, [x8, #5]
LBB0_28:
	lsr	w10, w9, #28
	cbz	w10, LBB0_30
; %bb.29:
	orr	w10, w2, w9, lsr #28
	strb	w10, [x8, #4]
LBB0_30:
	ands	w10, w9, #0xf
	b.eq	LBB0_32
; %bb.31:
	orr	w10, w10, w2
	strb	w10, [x8, #3]
LBB0_32:
	ands	w10, w9, #0xf0
	b.eq	LBB0_34
; %bb.33:
	orr	w10, w2, w10, lsr #4
	strb	w10, [x8, #2]
LBB0_34:
	ands	w10, w9, #0xf00
	b.eq	LBB0_36
; %bb.35:
	orr	w10, w2, w10, lsr #8
	strb	w10, [x8, #1]
LBB0_36:
	ands	w9, w9, #0xf000
	b.eq	LBB0_55
; %bb.37:
	lsr	w9, w9, #12
	b	LBB0_54
LBB0_38:
	b.hi	LBB0_55
; %bb.39:
Lloh19:
	adrp	x11, lJTI0_0@PAGE
Lloh20:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_40
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_40:
	ands	w10, w9, #0xf00
	b.eq	LBB0_42
; %bb.41:
	orr	w10, w2, w10, lsr #8
	strb	w10, [x8, #6]
LBB0_42:
	ands	w10, w9, #0xf0
	b.eq	LBB0_44
; %bb.43:
	orr	w10, w2, w10, lsr #4
	strb	w10, [x8, #5]
LBB0_44:
	ands	w10, w9, #0xf
	b.eq	LBB0_46
; %bb.45:
	orr	w10, w10, w2
	strb	w10, [x8, #4]
LBB0_46:
	lsr	w10, w9, #28
	cbz	w10, LBB0_48
; %bb.47:
	orr	w10, w2, w9, lsr #28
	strb	w10, [x8, #3]
LBB0_48:
	ands	w10, w9, #0xf000000
	b.eq	LBB0_50
; %bb.49:
	orr	w10, w2, w10, lsr #24
	strb	w10, [x8, #2]
LBB0_50:
	ands	w10, w9, #0xf00000
	b.eq	LBB0_52
; %bb.51:
	orr	w10, w2, w10, lsr #20
	strb	w10, [x8, #1]
LBB0_52:
	ands	w9, w9, #0xf0000
	b.eq	LBB0_55
; %bb.53:
	lsr	w9, w9, #16
LBB0_54:
	orr	w9, w9, w2
	strb	w9, [x8]
LBB0_55:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_52-LBB0_40)>>2
	.byte	(LBB0_50-LBB0_40)>>2
	.byte	(LBB0_48-LBB0_40)>>2
	.byte	(LBB0_46-LBB0_40)>>2
	.byte	(LBB0_44-LBB0_40)>>2
	.byte	(LBB0_42-LBB0_40)>>2
	.byte	(LBB0_40-LBB0_40)>>2
lJTI0_1:
	.byte	(LBB0_36-LBB0_24)>>2
	.byte	(LBB0_34-LBB0_24)>>2
	.byte	(LBB0_32-LBB0_24)>>2
	.byte	(LBB0_30-LBB0_24)>>2
	.byte	(LBB0_28-LBB0_24)>>2
	.byte	(LBB0_26-LBB0_24)>>2
	.byte	(LBB0_24-LBB0_24)>>2
                                        ; -- End function
	.comm	_rendstatus,4,2                 ; @rendstatus
	.comm	_PDRAW_SHHI_DONE,4,2            ; @PDRAW_SHHI_DONE
	.comm	_PDRAW_PLANE_HI_PRIO,4,2        ; @PDRAW_PLANE_HI_PRIO
	.comm	_HighCol,8,3                    ; @HighCol
	.comm	_Pico,8,3                       ; @Pico
	.no_dead_strip	_DrawTilesFromCache
.subsections_via_symbols
