	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DrawSpritesSHi
_DrawSpritesSHi:                        ## @DrawSpritesSHi
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movzbl	(%rdi), %esi
	andq	$127, %rsi
	jne	LBB0_1
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	-1(%rcx), %rsi
	cmpq	$1, %rcx
	jle	LBB0_18
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movb	2(%rax,%rsi), %al
	addb	%al, %al
	movq	_HighPreSpr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movzbl	%al, %edx
	movl	4(%rcx,%rdx,4), %r12d
	movl	%r12d, %r15d
	shrl	$9, %r15d
	andl	$48, %r15d
	cmpl	$48, %r15d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, %eax
	andl	$2048, %eax                     ## imm = 0x800
	testl	$32768, %r12d                   ## imm = 0x8000
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_TileFlipSH_onlyop_lp@GOTPCREL(%rip), %rsi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_TileNormSH_onlyop_lp@GOTPCREL(%rip), %rsi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	$32768, %r12d                   ## imm = 0x8000
	je	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, %eax
	movq	_TileFlip@GOTPCREL(%rip), %rsi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	andl	$2048, %eax                     ## imm = 0x800
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_TileNorm@GOTPCREL(%rip), %rsi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_TileFlipSH@GOTPCREL(%rip), %rsi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_TileNormSH@GOTPCREL(%rip), %rsi
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rcx,%rdx,4), %edx
	movl	%edx, %ecx
	shrl	$24, %ecx
	andl	$7, %ecx
	movl	%ecx, %r13d
	negl	%r13d
	testl	%eax, %eax
	cmovel	%ecx, %r13d
	cmpl	$268435456, %edx                ## imm = 0x10000000
	jb	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	shll	$4, %r13d
	movl	%edx, %r14d
	sarl	$28, %r14d
	leal	2047(%r14), %esi
	imull	%ecx, %esi
	testl	%eax, %eax
	cmovel	%eax, %esi
	addl	%r12d, %esi
	movq	_DrawScanline@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movswl	%dx, %edx
	subl	%edx, %eax
	testl	$4096, %r12d                    ## imm = 0x1000
	movl	%eax, %edx
	notl	%edx
	leal	(%rdx,%rcx,8), %ecx
	cmovel	%eax, %ecx
	movl	%ecx, %eax
	shrl	$3, %eax
	addl	%esi, %eax
	shll	$4, %eax
	andl	$32752, %eax                    ## imm = 0x7FF0
	andl	$7, %ecx
	leal	(%rax,%rcx,2), %ebx
	sarl	$16, %r12d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=2
	andl	$32767, %ebx                    ## imm = 0x7FFF
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=2
	addl	%r13d, %ebx
	addl	$8, %r12d
	decl	%r14d
	je	LBB0_17
LBB0_13:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%r12d, %r12d
	jle	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	cmpl	$327, %r12d                     ## imm = 0x147
	jbe	LBB0_15
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_HighPreSpr,8,3                 ## @HighPreSpr
	.comm	_DrawScanline,4,2               ## @DrawScanline
	.no_dead_strip	_DrawSpritesSHi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DrawSpritesSHi
_DrawSpritesSHi:                        ; @DrawSpritesSHi
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldrb	w8, [x0]
	ands	w22, w8, #0x7f
	b.eq	LBB0_13
; %bb.1:
	add	x23, x0, #3
Lloh0:
	adrp	x24, _HighPreSpr@GOTPAGE
Lloh1:
	ldr	x24, [x24, _HighPreSpr@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x22, #1
	mov	x22, x25
	b.le	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	sub	x25, x22, #1
	ldrb	w8, [x23, x25]
	lsl	w8, w8, #1
	ldr	x9, [x24]
	and	x8, x8, #0xfe
	add	x10, x9, x8, lsl #2
	ldr	w8, [x10, #4]
	lsr	w9, w8, #9
	and	w19, w9, #0x30
	cmp	w19, #48
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ands	w9, w8, #0x800
Lloh2:
	adrp	x11, _TileFlipSH_onlyop_lp@GOTPAGE
Lloh3:
	ldr	x11, [x11, _TileFlipSH_onlyop_lp@GOTPAGEOFF]
Lloh4:
	adrp	x12, _TileNormSH_onlyop_lp@GOTPAGE
Lloh5:
	ldr	x12, [x12, _TileNormSH_onlyop_lp@GOTPAGEOFF]
	csel	x11, x12, x11, eq
Lloh6:
	adrp	x12, _TileFlipSH@GOTPAGE
Lloh7:
	ldr	x12, [x12, _TileFlipSH@GOTPAGEOFF]
Lloh8:
	adrp	x13, _TileNormSH@GOTPAGE
Lloh9:
	ldr	x13, [x13, _TileNormSH@GOTPAGEOFF]
	csel	x12, x13, x12, eq
	tst	w8, #0x8000
	csel	x26, x11, x12, eq
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	tbz	w8, #15, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ands	w9, w8, #0x800
Lloh10:
	adrp	x11, _TileFlip@GOTPAGE
Lloh11:
	ldr	x11, [x11, _TileFlip@GOTPAGEOFF]
Lloh12:
	adrp	x12, _TileNorm@GOTPAGE
Lloh13:
	ldr	x12, [x12, _TileNorm@GOTPAGEOFF]
	csel	x26, x12, x11, eq
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w11, [x10]
	ubfx	w10, w11, #24, #3
	cmp	w9, #0
	cneg	w12, w10, ne
	lsr	w13, w11, #28
	cbz	w13, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	w27, w12, #4
	asr	w28, w11, #28
	add	w12, w28, #2047
	mul	w12, w10, w12
	cmp	w9, #0
	csel	w9, wzr, w12, eq
	add	w9, w9, w8
Lloh14:
	adrp	x12, _DrawScanline@GOTPAGE
Lloh15:
	ldr	x12, [x12, _DrawScanline@GOTPAGEOFF]
Lloh16:
	ldr	w12, [x12]
	sub	w11, w12, w11, sxth
	mvn	w12, w11
	add	w10, w12, w10, lsl #3
	tst	w8, #0x1000
	csel	w10, w11, w10, eq
	add	w9, w9, w10, lsr #3
	ubfiz	w20, w10, #1, #3
	bfi	w20, w9, #4, #11
	asr	w21, w8, #16
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=2
	and	w20, w20, #0x7fff
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	blr	x26
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	w21, w21, #8
	add	w20, w20, w27
	subs	w28, w28, #1
	b.eq	LBB0_2
LBB0_11:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	cmp	w21, #327
	b.ls	LBB0_9
	b	LBB0_2
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_HighPreSpr,8,3                 ; @HighPreSpr
	.comm	_DrawScanline,4,2               ; @DrawScanline
	.no_dead_strip	_DrawSpritesSHi
.subsections_via_symbols
