	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function VIDDCVdp1DistortedSpriteDraw
LCPI0_0:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_1:
	.quad	1                               ## 0x1
	.quad	0                               ## 0x0
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2
LCPI0_2:
	.long	0x358637bd                      ## float 9.99999997E-7
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_VIDDCVdp1DistortedSpriteDraw:          ## @VIDDCVdp1DistortedSpriteDraw
	.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
	subq	$192, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_Vdp1Regs@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	16(%rax), %esi
	leaq	-112(%rbp), %rdi
	callq	_Vdp1ReadCommand
	movl	-112(%rbp), %eax
	movl	-108(%rbp), %ecx
	movzbl	%al, %edx
	shrl	$5, %eax
	andl	$504, %eax                      ## imm = 0x1F8
	movq	_cur_spr@GOTPCREL(%rip), %r15
	movl	%eax, (%r15)
	movl	%edx, 4(%r15)
	andl	$7, %ecx
	cmpl	$3, %ecx
	jne	LBB0_3
## %bb.1:
	movq	_PVR_LIST_TR_POLY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r14d
	movq	_tr_sprite_hdr@GOTPCREL(%rip), %rsi
	leaq	-112(%rbp), %rdi
	callq	_Vdp1ReadTexture
	testl	%eax, %eax
	je	LBB0_20
## %bb.2:
	movl	(%rbx), %edi
	movq	_tr_sprite_hdr@GOTPCREL(%rip), %rsi
	jmp	LBB0_5
LBB0_3:
	movq	_pt_sprite_hdr@GOTPCREL(%rip), %rsi
	leaq	-112(%rbp), %rdi
	callq	_Vdp1ReadTexture
	testl	%eax, %eax
	je	LBB0_20
## %bb.4:
	movq	_PVR_LIST_PT_POLY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_pt_sprite_hdr@GOTPCREL(%rip), %rsi
	movl	%r14d, %edi
LBB0_5:
	movl	$4, %edx
	callq	_pvr_list_prim
	leaq	-112(%rbp), %rdi
	callq	_Vdp1ReadPriority
	movq	%rax, %rbx
	movq	_PVR_CMD_VERTEX_EOL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -120(%rbp)
	movq	(%r12), %rax
	movq	_priority_levels@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movss	(%rcx,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -224(%rbp)
	movss	(%rcx,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -220(%rbp)
	movdqu	(%rax), %xmm0
	movdqu	-80(%rbp), %xmm1
	movdqu	-64(%rbp), %xmm2
	movdqu	-48(%rbp), %xmm3
	paddq	%xmm0, %xmm3
	movdqu	%xmm3, -136(%rbp)
	paddq	%xmm0, %xmm2
	paddq	LCPI0_0(%rip), %xmm2
	paddq	%xmm0, %xmm1
	movdqu	%xmm2, -152(%rbp)
	pcmpeqd	%xmm2, %xmm2
	psubq	%xmm2, %xmm1
	movdqu	%xmm1, -168(%rbp)
	movss	(%rcx,%rbx,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -216(%rbp)
	movdqu	-96(%rbp), %xmm1
	paddq	%xmm0, %xmm1
	paddq	LCPI0_1(%rip), %xmm1
	movdqu	%xmm1, -184(%rbp)
	movl	-104(%rbp), %eax
	pxor	%xmm0, %xmm0
	testb	$16, %al
	je	LBB0_7
## %bb.6:
	movd	8(%r15), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
LBB0_7:
	pxor	%xmm1, %xmm1
	testb	$32, %al
	je	LBB0_9
## %bb.8:
	movd	12(%r15), %xmm1                 ## xmm1 = mem[0],zero,zero,zero
LBB0_9:
	callq	_PVR_PACK_16BIT_UV
	movq	%rax, -192(%rbp)
	movl	-104(%rbp), %eax
	testb	$16, %al
	je	LBB0_10
## %bb.11:
	pxor	%xmm0, %xmm0
	jmp	LBB0_12
LBB0_10:
	movd	8(%r15), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
LBB0_12:
	pxor	%xmm1, %xmm1
	testb	$32, %al
	je	LBB0_14
## %bb.13:
	movd	12(%r15), %xmm1                 ## xmm1 = mem[0],zero,zero,zero
LBB0_14:
	callq	_PVR_PACK_16BIT_UV
	movq	%rax, -200(%rbp)
	movl	-104(%rbp), %eax
	testb	$16, %al
	je	LBB0_15
## %bb.16:
	pxor	%xmm0, %xmm0
	jmp	LBB0_17
LBB0_15:
	movd	8(%r15), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
LBB0_17:
	pxor	%xmm1, %xmm1
	testb	$32, %al
	jne	LBB0_19
## %bb.18:
	movd	12(%r15), %xmm1                 ## xmm1 = mem[0],zero,zero,zero
LBB0_19:
	callq	_PVR_PACK_16BIT_UV
	movq	%rax, -208(%rbp)
	leaq	-224(%rbp), %rsi
	movl	%r14d, %edi
	movl	$112, %edx
	callq	_pvr_list_prim
	movq	(%r12), %rax
	movss	(%rax,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	addss	LCPI0_2(%rip), %xmm0
	movss	%xmm0, (%rax,%rbx,4)
LBB0_20:
	addq	$192, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Vdp1Regs,8,3                   ## @Vdp1Regs
	.comm	_cur_spr,16,2                   ## @cur_spr
	.comm	_PVR_LIST_TR_POLY,4,2           ## @PVR_LIST_TR_POLY
	.comm	_tr_sprite_hdr,112,3            ## @tr_sprite_hdr
	.comm	_pt_sprite_hdr,112,3            ## @pt_sprite_hdr
	.comm	_PVR_LIST_PT_POLY,4,2           ## @PVR_LIST_PT_POLY
	.comm	_PVR_CMD_VERTEX_EOL,4,2         ## @PVR_CMD_VERTEX_EOL
	.comm	_priority_levels,8,3            ## @priority_levels
	.no_dead_strip	_VIDDCVdp1DistortedSpriteDraw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function VIDDCVdp1DistortedSpriteDraw
_VIDDCVdp1DistortedSpriteDraw:          ; @VIDDCVdp1DistortedSpriteDraw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #272
	.cfi_def_cfa_offset 272
	stp	d9, d8, [sp, #192]              ; 16-byte Folded Spill
	stp	x28, x27, [sp, #208]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #224]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #240]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #256]            ; 16-byte Folded Spill
	add	x29, sp, #256
	.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 w27, -56
	.cfi_offset w28, -64
	.cfi_offset b8, -72
	.cfi_offset b9, -80
Lloh0:
	adrp	x21, _Vdp1Regs@GOTPAGE
Lloh1:
	ldr	x21, [x21, _Vdp1Regs@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w1, [x8, #16]
	add	x0, sp, #112
	bl	_Vdp1ReadCommand
	ldp	w8, w9, [sp, #112]
	lsr	w10, w8, #5
Lloh2:
	adrp	x20, _cur_spr@GOTPAGE
Lloh3:
	ldr	x20, [x20, _cur_spr@GOTPAGEOFF]
	and	w10, w10, #0x1f8
	and	w8, w8, #0xff
	stp	w10, w8, [x20]
	and	w8, w9, #0x7
	cmp	w8, #3
	b.ne	LBB0_3
; %bb.1:
Lloh4:
	adrp	x22, _PVR_LIST_TR_POLY@GOTPAGE
Lloh5:
	ldr	x22, [x22, _PVR_LIST_TR_POLY@GOTPAGEOFF]
	ldr	w19, [x22]
Lloh6:
	adrp	x1, _tr_sprite_hdr@GOTPAGE
Lloh7:
	ldr	x1, [x1, _tr_sprite_hdr@GOTPAGEOFF]
	add	x0, sp, #112
	bl	_Vdp1ReadTexture
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w0, [x22]
Lloh8:
	adrp	x1, _tr_sprite_hdr@GOTPAGE
Lloh9:
	ldr	x1, [x1, _tr_sprite_hdr@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x1, _pt_sprite_hdr@GOTPAGE
Lloh11:
	ldr	x1, [x1, _pt_sprite_hdr@GOTPAGEOFF]
	add	x0, sp, #112
	bl	_Vdp1ReadTexture
	cbz	w0, LBB0_6
; %bb.4:
Lloh12:
	adrp	x8, _PVR_LIST_PT_POLY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PVR_LIST_PT_POLY@GOTPAGEOFF]
Lloh14:
	ldr	w19, [x8]
Lloh15:
	adrp	x1, _pt_sprite_hdr@GOTPAGE
Lloh16:
	ldr	x1, [x1, _pt_sprite_hdr@GOTPAGEOFF]
	mov	x0, x19
LBB0_5:
	mov	w2, #4
	bl	_pvr_list_prim
	add	x0, sp, #112
	bl	_Vdp1ReadPriority
Lloh17:
	adrp	x8, _PVR_CMD_VERTEX_EOL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PVR_CMD_VERTEX_EOL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [sp, #104]
	ldr	x8, [x21]
	ldr	q0, [sp, #176]
	ldr	q1, [x8]
	add.2d	v0, v1, v0
	stur	q0, [sp, #88]
Lloh20:
	adrp	x22, _priority_levels@GOTPAGE
Lloh21:
	ldr	x22, [x22, _priority_levels@GOTPAGEOFF]
	ldr	x8, [x22]
	lsl	x21, x0, #2
	ldr	s0, [x8, x21]
	mov.d	x9, v1[1]
	add	x10, x9, #1
	ldp	x12, x11, [sp, #160]
	add	x11, x10, x11
	fmov	x13, d1
	add	x12, x12, x13
	stp	x12, x11, [sp, #72]
	ldp	x12, x11, [sp, #144]
	add	x10, x10, x11
	str	s0, [sp]
	ldr	s0, [x8, x21]
	str	s0, [sp, #4]
	add	x11, x13, #1
	add	x12, x11, x12
	stp	x12, x10, [sp, #56]
	ldr	s0, [x8, x21]
	str	s0, [sp, #8]
	ldp	x10, x8, [sp, #128]
	add	x8, x8, x9
	add	x9, x11, x10
	stp	x9, x8, [sp, #40]
	ldr	w8, [sp, #120]
	tst	w8, #0x10
	movi	d8, #0000000000000000
	ldp	s0, s1, [x20, #8]
	fcsel	s0, s8, s0, eq
	tst	w8, #0x20
	fcsel	s1, s8, s1, eq
	bl	_PVR_PACK_16BIT_UV
	str	x0, [sp, #32]
	ldr	w8, [sp, #120]
	tst	w8, #0x10
	ldp	s0, s1, [x20, #8]
	fcsel	s0, s0, s8, eq
	tst	w8, #0x20
	fcsel	s1, s8, s1, eq
	bl	_PVR_PACK_16BIT_UV
	str	x0, [sp, #24]
	ldr	w8, [sp, #120]
	tst	w8, #0x10
	ldp	s0, s1, [x20, #8]
	fcsel	s0, s0, s8, eq
	tst	w8, #0x20
	fcsel	s1, s1, s8, eq
	bl	_PVR_PACK_16BIT_UV
	str	x0, [sp, #16]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #112
	bl	_pvr_list_prim
	ldr	x8, [x22]
	ldr	s0, [x8, x21]
	mov	w9, #14269
	movk	w9, #13702, lsl #16
	fmov	s1, w9
	fadd	s0, s0, s1
	str	s0, [x8, x21]
LBB0_6:
	ldp	x29, x30, [sp, #256]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #240]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #224]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #208]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #192]              ; 16-byte Folded Reload
	add	sp, sp, #272
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_Vdp1Regs,8,3                   ; @Vdp1Regs
	.comm	_cur_spr,16,2                   ; @cur_spr
	.comm	_PVR_LIST_TR_POLY,4,2           ; @PVR_LIST_TR_POLY
	.comm	_tr_sprite_hdr,112,3            ; @tr_sprite_hdr
	.comm	_pt_sprite_hdr,112,3            ; @pt_sprite_hdr
	.comm	_PVR_LIST_PT_POLY,4,2           ; @PVR_LIST_PT_POLY
	.comm	_PVR_CMD_VERTEX_EOL,4,2         ; @PVR_CMD_VERTEX_EOL
	.comm	_priority_levels,8,3            ; @priority_levels
	.no_dead_strip	_VIDDCVdp1DistortedSpriteDraw
.subsections_via_symbols
