	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrepareSprites                 ## -- Begin function PrepareSprites
	.p2align	4, 0x90
_PrepareSprites:                        ## @PrepareSprites
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_Pico@GOTPCREL(%rip), %rax
	movq	8(%rax), %r8
	movl	48(%r8), %ecx
	movl	%ecx, -92(%rbp)                 ## 4-byte Spill
	movl	%ecx, %eax
	andl	$1, %eax
	movl	%eax, %ecx
	shll	$4, %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	_PicoOpt@GOTPCREL(%rip), %rcx
	movq	_POPT_DIS_SPRITE_LIM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	_MAX_LINE_SPRITES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_3
LBB0_1:
	leal	16(,%rax,4), %ecx
LBB0_3:
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	_HighPreSpr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	addl	$64, -52(%rbp)                  ## 4-byte Folded Spill
	movb	4(%r8), %cl
	andb	$8, %cl
	shrb	$3, %cl
	movzbl	%cl, %esi
	orl	$14, %esi
	shll	$4, %esi
	movl	%eax, %ecx
	xorl	$127, %ecx
	andl	20(%r8), %ecx
	shlq	$8, %rcx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	testl	%edi, %edi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_17
## %bb.4:
	shll	$6, %eax
	orl	$264, %eax                      ## imm = 0x108
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	_HighLnSpr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, %edi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rcx,8), %rdx
	movl	$0, (%rdx)
	movq	8(%rax,%rcx,8), %rdx
	movl	$0, (%rdx)
	movq	16(%rax,%rcx,8), %rdx
	movl	$0, (%rdx)
	movq	24(%rax,%rcx,8), %rdx
	movl	$0, (%rdx)
	movq	32(%rax,%rcx,8), %rdx
	movl	$0, (%rdx)
	movq	40(%rax,%rcx,8), %rdx
	movl	$0, (%rdx)
	movq	48(%rax,%rcx,8), %rdx
	movl	$0, (%rdx)
	movq	56(%rax,%rcx,8), %rdx
	movl	$0, (%rdx)
	addq	$8, %rcx
	cmpq	%rcx, %rdi
	jne	LBB0_5
## %bb.6:
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addl	%eax, %eax
	movl	%eax, -104(%rbp)                ## 4-byte Spill
	xorl	%r8d, %r8d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	_Pico@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	leal	(%rcx,%r13,4), %ecx
	andl	$32764, %ecx                    ## imm = 0x7FFC
	movl	(%rax,%rcx), %r13d
	movl	4(%rax,%rcx), %eax
	movl	%r13d, %r14d
	andl	$511, %r14d                     ## imm = 0x1FF
	addl	$-128, %r14d
	movl	%r13d, %r11d
	shrl	$24, %r11d
	movl	%r11d, %r9d
	andl	$15, %r9d
	andl	$3, %r11d
	incl	%r11d
	movl	%r9d, %r15d
	shrl	$2, %r15d
	incl	%r15d
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%eax, %r12d
	shrl	$16, %r12d
	andl	$511, %r12d                     ## imm = 0x1FF
	leal	-120(%r12), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	cmpl	%esi, %r14d
	jge	LBB0_48
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leal	(%r14,%r11,8), %eax
	movq	_DrawScanline@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_48
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	leal	(,%r15,8), %edx
	movl	$8, %edi
	subl	%edx, %edi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, %edi
	setl	%r10b
	cmpl	-120(%rbp), %edx                ## 4-byte Folded Reload
	setl	-41(%rbp)                       ## 1-byte Folded Spill
	cmpl	%ecx, %r14d
	cmovgl	%r14d, %ecx
	cmpl	%eax, %ecx
	jge	LBB0_48
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	jge	LBB0_48
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	-92(%rbp), %edi                 ## 4-byte Reload
	shrl	$3, %edi
	andl	$1, %edi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	_HighPreSpr@GOTPCREL(%rip), %rsi
	subq	(%rsi), %rdx
	movq	%rdx, %rbx
	shrq	$2, %rbx
	shrq	$63, %rdx
	addq	%rbx, %rdx
	shrq	%rdx
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, %ebx
	shrl	$8, %ebx
	andl	$128, %ebx
	orl	%edx, %ebx
	movl	%ebx, -100(%rbp)                ## 4-byte Spill
	movl	%esi, %edx
	notl	%edx
	xorl	%esi, %esi
	testl	$24576, %edx                    ## imm = 0x6000
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_SPRL_MAY_HAVE_OP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	andb	%r10b, -41(%rbp)                ## 1-byte Folded Spill
	testl	%edi, %edi
	cmovel	%edi, %esi
	movl	%esi, -96(%rbp)                 ## 4-byte Spill
	movslq	%ecx, %rcx
	cltq
	incq	%rcx
	movq	_HighLnSpr@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rsi), %rdx
	movq	-8(%rdx,%rcx,8), %rdi
	movzbl	(%rdi), %r10d
	cmpl	%r10d, -80(%rbp)                ## 4-byte Folded Reload
	jle	LBB0_46
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	movzbl	2(%rdi), %ebx
	cmpl	%ebx, -104(%rbp)                ## 4-byte Folded Reload
	jle	LBB0_16
## %bb.37:                              ##   in Loop: Header=BB0_14 Depth=2
	addb	%r15b, %bl
	movb	%bl, 2(%rdi)
	testl	%r12d, %r12d
	je	LBB0_38
## %bb.39:                              ##   in Loop: Header=BB0_14 Depth=2
	testq	%r10, %r10
	sete	%dl
	orb	-41(%rbp), %dl                  ## 1-byte Folded Reload
	cmpb	$1, %dl
	jne	LBB0_46
## %bb.40:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	%r10d, %edx
	incb	%dl
	movl	-100(%rbp), %ebx                ## 4-byte Reload
	movb	%bl, 3(%r10,%rdi)
	movb	%dl, (%rdi)
	movq	_SPRL_HAVE_HI@GOTPCREL(%rip), %rdx
	testb	$-128, %bl
	jne	LBB0_42
## %bb.41:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	_SPRL_HAVE_LO@GOTPCREL(%rip), %rdx
LBB0_42:                                ##   in Loop: Header=BB0_14 Depth=2
	movzbl	1(%rdi), %ebx
	orb	-96(%rbp), %bl                  ## 1-byte Folded Reload
	orb	(%rdx), %bl
	movb	%bl, 1(%rdi)
	testq	%r10, %r10
	je	LBB0_46
## %bb.43:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	andl	$32768, %edx                    ## imm = 0x8000
	je	LBB0_46
## %bb.44:                              ##   in Loop: Header=BB0_14 Depth=2
	cmpb	$0, 2(%r10,%rdi)
	js	LBB0_46
## %bb.45:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	_SPRL_LO_ABOVE_HI@GOTPCREL(%rip), %rdx
	orb	(%rdx), %bl
	movb	%bl, 1(%rdi)
	jmp	LBB0_46
LBB0_38:                                ##   in Loop: Header=BB0_14 Depth=2
	testq	%r10, %r10
	je	LBB0_46
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=2
	orb	$-128, %r10b
	movb	%r10b, (%rdi)
LBB0_46:                                ##   in Loop: Header=BB0_14 Depth=2
	cmpq	%rax, %rcx
	jge	LBB0_48
## %bb.47:                              ##   in Loop: Header=BB0_14 Depth=2
	leaq	1(%rcx), %rdx
	cmpq	-88(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	%rdx, %rcx
	jl	LBB0_14
	.p2align	4, 0x90
LBB0_48:                                ##   in Loop: Header=BB0_7 Depth=1
	shll	$28, %r15d
	shll	$24, %r11d
	orl	%r15d, %r11d
	shll	$16, %r9d
	orl	%r11d, %r9d
	movzwl	%r14w, %eax
	orl	%r9d, %eax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	shll	$16, %ecx
	movzwl	-56(%rbp), %eax                 ## 2-byte Folded Reload
	orl	%ecx, %eax
	movl	%eax, 4(%rbx)
	addq	$8, %rbx
	shrl	$16, %r13d
	andl	$127, %r13d
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_50
## %bb.49:                              ##   in Loop: Header=BB0_7 Depth=1
	incl	%r8d
	cmpl	-52(%rbp), %r8d                 ## 4-byte Folded Reload
	jne	LBB0_7
LBB0_50:
	movl	$0, (%rbx)
LBB0_51:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_Pico@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_HighLnSpr@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	%esi, %r14d
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	.p2align	4, 0x90
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
                                        ##       Child Loop BB0_28 Depth 3
	movl	(%rax), %edi
	testl	%edi, %edi
	je	LBB0_51
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	leal	(%rdx,%rcx,4), %r12d
	andl	$32764, %r12d                   ## imm = 0x7FFC
	movl	4(%r8,%r12), %r10d
	movswl	%di, %ecx
	cmpl	%esi, %ecx
	jge	LBB0_35
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	shrl	$21, %edi
	andl	$120, %edi
	addl	%ecx, %edi
	movq	_DrawScanline@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	cmpl	%ebx, %edi
	jle	LBB0_35
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpl	%ebx, %ecx
	cmovgl	%ecx, %ebx
	cmpl	%edi, %ebx
	jge	LBB0_35
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_35
## %bb.23:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%rax, %rcx
	subq	-72(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	%rcx, %rdx
	shrq	$2, %rdx
	shrq	$63, %rcx
	addq	%rdx, %rcx
	shrq	%rcx
	movl	%r10d, %esi
	shrl	$8, %esi
	andl	$128, %esi
	orl	%ecx, %esi
	movslq	%ebx, %rbx
	movslq	%edi, %r8
	.p2align	4, 0x90
LBB0_24:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_28 Depth 3
	movq	(%r15,%rbx,8), %rdi
	movl	(%rdi), %r9d
	andl	$127, %r9d
	cmpl	-80(%rbp), %r9d                 ## 4-byte Folded Reload
	jge	LBB0_33
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=2
	testl	%r9d, %r9d
	je	LBB0_29
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=2
	xorl	%r11d, %r11d
	.p2align	4, 0x90
LBB0_28:                                ##   Parent Loop BB0_18 Depth=1
                                        ##     Parent Loop BB0_24 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	12(%rdi,%r11,4), %edx
	xorl	%ecx, %edx
	testb	$127, %dl
	je	LBB0_30
## %bb.27:                              ##   in Loop: Header=BB0_28 Depth=3
	incq	%r11
	cmpq	%r11, %r9
	jne	LBB0_28
LBB0_29:                                ##   in Loop: Header=BB0_24 Depth=2
	movl	%r9d, %edx
	movl	%esi, 12(%rdi,%rdx,4)
	leal	1(%r9), %edx
	movl	%edx, (%rdi)
LBB0_30:                                ##   in Loop: Header=BB0_24 Depth=2
	movq	_SPRL_HAVE_HI@GOTPCREL(%rip), %rdx
	testb	$-128, %sil
	jne	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	_SPRL_HAVE_LO@GOTPCREL(%rip), %rdx
LBB0_32:                                ##   in Loop: Header=BB0_24 Depth=2
	movl	(%rdx), %edx
	orl	%edx, 4(%rdi)
LBB0_33:                                ##   in Loop: Header=BB0_24 Depth=2
	incq	%rbx
	cmpq	%r8, %rbx
	jge	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_24 Depth=2
	cmpq	%r14, %rbx
	jl	LBB0_24
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_18 Depth=1
	andl	$33554431, %r10d                ## imm = 0x1FFFFFF
	addl	$-7864320, %r10d                ## imm = 0xFF880000
	movl	%r10d, 4(%rax)
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	movzwl	2(%r12,%r8), %ecx
	andl	$127, %ecx
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_51
## %bb.36:                              ##   in Loop: Header=BB0_18 Depth=1
	incl	%r13d
	addq	$8, %rax
	cmpl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	jb	LBB0_18
	jmp	LBB0_51
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico,16,3                      ## @Pico
	.comm	_HighPreSpr,8,3                 ## @HighPreSpr
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_POPT_DIS_SPRITE_LIM,4,2        ## @POPT_DIS_SPRITE_LIM
	.comm	_MAX_LINE_SPRITES,4,2           ## @MAX_LINE_SPRITES
	.comm	_DrawScanline,4,2               ## @DrawScanline
	.comm	_HighLnSpr,8,3                  ## @HighLnSpr
	.comm	_SPRL_HAVE_HI,4,2               ## @SPRL_HAVE_HI
	.comm	_SPRL_HAVE_LO,4,2               ## @SPRL_HAVE_LO
	.comm	_SPRL_MAY_HAVE_OP,4,2           ## @SPRL_MAY_HAVE_OP
	.comm	_SPRL_LO_ABOVE_HI,1,0           ## @SPRL_LO_ABOVE_HI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrepareSprites                 ; -- Begin function PrepareSprites
	.p2align	2
_PrepareSprites:                        ; @PrepareSprites
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, _HighPreSpr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HighPreSpr@GOTPAGEOFF]
Lloh2:
	ldr	x15, [x8]
Lloh3:
	adrp	x13, _Pico@GOTPAGE
Lloh4:
	ldr	x13, [x13, _Pico@GOTPAGEOFF]
	ldr	x11, [x13, #8]
	ldr	w8, [x11, #48]
	str	x8, [sp]                        ; 8-byte Folded Spill
	and	x12, x8, #0x1
	mov	w8, #20
	mov	w9, #16
	cmp	w12, #0
	csel	w9, w9, w8, eq
	mov	w8, #328
	mov	w10, #264
	csel	w8, w10, w8, eq
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	mov	w8, #80
	mov	w10, #64
	csel	w8, w10, w8, eq
Lloh5:
	adrp	x10, _PicoOpt@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PicoOpt@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	adrp	x14, _POPT_DIS_SPRITE_LIM@GOTPAGE
Lloh9:
	ldr	x14, [x14, _POPT_DIS_SPRITE_LIM@GOTPAGEOFF]
Lloh10:
	ldr	w14, [x14]
Lloh11:
	adrp	x17, _MAX_LINE_SPRITES@GOTPAGE
Lloh12:
	ldr	x17, [x17, _MAX_LINE_SPRITES@GOTPAGEOFF]
Lloh13:
	ldr	w17, [x17]
	tst	w14, w10
	csel	w9, w9, w17, eq
	ldrb	w10, [x11, #4]
	tst	w10, #0x8
	mov	w10, #240
	mov	w14, #224
	csel	w10, w14, w10, eq
	ldr	w11, [x11, #20]
	eor	x12, x12, #0x7f
	and	x11, x11, x12
	lsl	x11, x11, #8
	cbz	w0, LBB0_22
; %bb.1:
Lloh14:
	adrp	x17, _HighLnSpr@GOTPAGE
Lloh15:
	ldr	x17, [x17, _HighLnSpr@GOTPAGEOFF]
	ldr	x12, [x17]
	add	x12, x12, #16
	mov	x0, x10
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x14, x1, [x12, #-16]
	ldp	x2, x3, [x12], #32
	str	wzr, [x14]
	str	wzr, [x1]
	str	wzr, [x2]
	str	wzr, [x3]
	subs	x0, x0, #4
	b.ne	LBB0_2
; %bb.3:
	mov	w12, #0
	lsl	w1, w9, #1
Lloh16:
	adrp	x2, _DrawScanline@GOTPAGE
Lloh17:
	ldr	x2, [x2, _DrawScanline@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ubfx	w12, w21, #24, #4
	lsl	w14, w25, #24
	bfi	w14, w24, #28, #3
	bfi	w14, w12, #16, #4
	bfxil	w14, w15, #0, #16
	bfi	w22, w23, #16, #16
	add	x15, x20, #8
	stp	w14, w22, [x20]
	ubfx	w12, w21, #16, #7
	add	w0, w0, #1
	cmp	w12, #0
	ccmp	w0, w8, #4, ne
	b.eq	LBB0_20
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	mov	x20, x15
	ldr	x14, [x13]
	add	w12, w11, w12, lsl #2
	and	x12, x12, #0x7ffc
	add	x12, x14, x12
	ldp	w21, w22, [x12]
	and	w12, w21, #0x1ff
	sub	w15, w12, #128
	lsr	w12, w21, #24
	ubfx	w14, w21, #24, #2
	add	w25, w14, #1
	ubfx	w12, w12, #2, #2
	add	w24, w12, #1
	ubfx	w26, w22, #16, #9
	sub	w23, w26, #120
	cmp	w15, w10
	b.ge	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w12, w15, w25, lsl #3
	ldr	w14, [x2]
	cmp	w12, w14
	b.le	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w3, #8
	sub	w3, w3, w24, lsl #3
	ldr	w16, [sp, #12]                  ; 4-byte Folded Reload
	cmp	w23, w16
	ccmp	w3, w23, #0, lt
	cset	w27, lt
	cmp	w15, w14
	csel	w4, w15, w14, gt
	cmp	w4, w12
	ccmp	w4, w10, #0, lt
	b.ge	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh18:
	adrp	x14, _HighPreSpr@GOTPAGE
Lloh19:
	ldr	x14, [x14, _HighPreSpr@GOTPAGEOFF]
Lloh20:
	ldr	x14, [x14]
	sub	x14, x20, x14
	asr	x14, x14, #2
	cmp	x14, #0
	cinc	x14, x14, lt
	lsr	x14, x14, #1
	lsr	w3, w22, #8
	and	w3, w3, #0x80
	orr	w28, w3, w14
	mov	w14, #24576
	bics	wzr, w14, w22
	cset	w14, eq
	ldr	x3, [sp]                        ; 8-byte Folded Reload
	tst	w14, w3, lsr #3
Lloh21:
	adrp	x14, _SPRL_MAY_HAVE_OP@GOTPAGE
Lloh22:
	ldr	x14, [x14, _SPRL_MAY_HAVE_OP@GOTPAGEOFF]
	ldrb	w14, [x14]
	csel	w30, w14, wzr, ne
	sxtw	x19, w4
	sxtw	x4, w12
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x12, [x17]
	ldr	x5, [x12, x19, lsl #3]
	ldrb	w12, [x5]
	cmp	w9, w12
	b.le	LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldrb	w14, [x5, #2]
	cmp	w1, w14
	b.le	LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	add	w14, w14, w24
	strb	w14, [x5, #2]
	cbz	w26, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	cmp	w12, #0
	cset	w14, eq
	orr	w14, w14, w27
	cmp	w14, #1
	b.ne	LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=2
	and	w6, w22, #0x8000
	add	x3, x12, x5
	strb	w28, [x3, #3]
	add	w14, w12, #1
	strb	w14, [x5]
	ldrb	w14, [x5, #1]
	tst	w28, #0x80
Lloh23:
	adrp	x7, _SPRL_HAVE_HI@GOTPAGE
Lloh24:
	ldr	x7, [x7, _SPRL_HAVE_HI@GOTPAGEOFF]
Lloh25:
	adrp	x16, _SPRL_HAVE_LO@GOTPAGE
Lloh26:
	ldr	x16, [x16, _SPRL_HAVE_LO@GOTPAGEOFF]
	csel	x7, x16, x7, eq
	ldrb	w7, [x7]
	orr	w14, w14, w30
	orr	w14, w14, w7
	strb	w14, [x5, #1]
	cmp	w12, #0
	ccmp	w6, #0, #4, ne
	b.eq	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=2
	ldrsb	w12, [x3, #2]
	tbnz	w12, #31, LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=2
Lloh27:
	adrp	x12, _SPRL_LO_ABOVE_HI@GOTPAGE
Lloh28:
	ldr	x12, [x12, _SPRL_LO_ABOVE_HI@GOTPAGEOFF]
	ldrb	w12, [x12]
	orr	w12, w12, w14
	strb	w12, [x5, #1]
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=2
	cbz	w12, LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_9 Depth=2
	orr	w12, w12, #0x80
	strb	w12, [x5]
LBB0_18:                                ;   in Loop: Header=BB0_9 Depth=2
	add	x19, x19, #1
	cmp	x19, x4
	b.ge	LBB0_4
; %bb.19:                               ;   in Loop: Header=BB0_9 Depth=2
	cmp	x19, x10
	b.lt	LBB0_9
	b	LBB0_4
LBB0_20:
	str	wzr, [x15]
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_22:
	mov	w12, #0
	mov	w2, #0
	ldr	x13, [x13]
Lloh29:
	adrp	x16, _HighLnSpr@GOTPAGE
Lloh30:
	ldr	x16, [x16, _HighLnSpr@GOTPAGEOFF]
Lloh31:
	adrp	x14, _DrawScanline@GOTPAGE
Lloh32:
	ldr	x14, [x14, _DrawScanline@GOTPAGEOFF]
Lloh33:
	ldr	x16, [x16]
Lloh34:
	adrp	x17, _SPRL_HAVE_LO@GOTPAGE
Lloh35:
	ldr	x17, [x17, _SPRL_HAVE_LO@GOTPAGEOFF]
Lloh36:
	adrp	x0, _SPRL_HAVE_HI@GOTPAGE
Lloh37:
	ldr	x0, [x0, _SPRL_HAVE_HI@GOTPAGEOFF]
	mov	x1, x15
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	and	w3, w3, #0x1ffffff
	sub	w3, w3, #1920, lsl #12          ; =7864320
	str	w3, [x1, #4]
	ldrh	w2, [x2, #2]
	and	w2, w2, #0x7f
	add	w12, w12, #1
	add	x1, x1, #8
	cmp	w2, #0
	ccmp	w12, w8, #2, ne
	b.hs	LBB0_21
LBB0_24:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_29 Depth 2
                                        ;       Child Loop BB0_32 Depth 3
	ldr	w4, [x1]
	cbz	w4, LBB0_21
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	add	w2, w11, w2, lsl #2
	and	x2, x2, #0x7ffc
	add	x2, x13, x2
	ldr	w3, [x2, #4]
	sxth	w5, w4
	cmp	w5, w10
	b.ge	LBB0_23
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=1
	lsr	w4, w4, #21
	and	w6, w4, #0x78
	ldr	w4, [x14]
	add	w7, w5, w6
	cmp	w7, w4
	b.le	LBB0_23
; %bb.27:                               ;   in Loop: Header=BB0_24 Depth=1
	cmp	w5, w4
	csel	w6, w5, w4, gt
	sub	x4, x1, x15
	asr	x4, x4, #2
	cmp	x4, #0
	cinc	x4, x4, lt
	cmp	w6, w7
	ccmp	w6, w10, #0, lt
	b.ge	LBB0_23
; %bb.28:                               ;   in Loop: Header=BB0_24 Depth=1
	lsr	x4, x4, #1
	lsr	w5, w3, #8
	and	w5, w5, #0x80
	orr	w5, w5, w4
	sxtw	x6, w6
	sxtw	x7, w7
LBB0_29:                                ;   Parent Loop BB0_24 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_32 Depth 3
	ldr	x19, [x16, x6, lsl #3]
	ldr	w20, [x19]
	and	x20, x20, #0x7f
	cmp	w20, w9
	b.ge	LBB0_36
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=2
	cbz	w20, LBB0_34
; %bb.31:                               ;   in Loop: Header=BB0_29 Depth=2
	add	x21, x19, #12
	mov	x22, x20
LBB0_32:                                ;   Parent Loop BB0_24 Depth=1
                                        ;     Parent Loop BB0_29 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w23, [x21]
	eor	w23, w23, w4
	tst	w23, #0x7f
	b.eq	LBB0_35
; %bb.33:                               ;   in Loop: Header=BB0_32 Depth=3
	add	x21, x21, #4
	subs	x22, x22, #1
	b.ne	LBB0_32
LBB0_34:                                ;   in Loop: Header=BB0_29 Depth=2
	add	w21, w20, #3
	str	w5, [x19, w21, uxtw #2]
	add	w20, w20, #1
	str	w20, [x19]
LBB0_35:                                ;   in Loop: Header=BB0_29 Depth=2
	tst	w5, #0x80
	csel	x20, x17, x0, eq
	ldr	w20, [x20]
	ldr	w21, [x19, #4]
	orr	w20, w21, w20
	str	w20, [x19, #4]
LBB0_36:                                ;   in Loop: Header=BB0_29 Depth=2
	add	x6, x6, #1
	cmp	x6, x7
	b.ge	LBB0_23
; %bb.37:                               ;   in Loop: Header=BB0_29 Depth=2
	cmp	x6, x10
	b.lt	LBB0_29
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico,16,3                      ; @Pico
	.comm	_HighPreSpr,8,3                 ; @HighPreSpr
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_POPT_DIS_SPRITE_LIM,4,2        ; @POPT_DIS_SPRITE_LIM
	.comm	_MAX_LINE_SPRITES,4,2           ; @MAX_LINE_SPRITES
	.comm	_DrawScanline,4,2               ; @DrawScanline
	.comm	_HighLnSpr,8,3                  ; @HighLnSpr
	.comm	_SPRL_HAVE_HI,4,2               ; @SPRL_HAVE_HI
	.comm	_SPRL_HAVE_LO,4,2               ; @SPRL_HAVE_LO
	.comm	_SPRL_MAY_HAVE_OP,4,2           ; @SPRL_MAY_HAVE_OP
	.comm	_SPRL_LO_ABOVE_HI,1,0           ; @SPRL_LO_ABOVE_HI
.subsections_via_symbols
