	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps_2_0_dstreg
_ps_2_0_dstreg:                         ## @ps_2_0_dstreg
	.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
	movq	%rdi, %r13
	cmpq	$0, 16(%rsi)
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	callq	_WARN
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %r14
	movl	(%rsi), %edi
	leal	-128(%rdi), %eax
	cmpl	$4, %eax
	ja	LBB0_7
## %bb.4:
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	jmpq	*%rax
LBB0_5:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_d3d9_register
	movl	8(%r14), %esi
	movl	%eax, %edi
	jmp	LBB0_11
LBB0_6:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_map_ps_input
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_8:
	movl	8(%r13), %ebx
	movl	$2, %edi
	movl	$1, %esi
	callq	_BWRITERPS_VERSION
	cmpl	%eax, %ebx
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	callq	_WARN
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
LBB0_10:
	movq	_D3DSPR_PREDICATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %esi
LBB0_11:
	callq	_d3dsp_register
LBB0_12:
	movl	%eax, %r13d
	movq	_D3DSP_DSTSHIFT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	movq	_D3DSP_DSTSHIFT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movl	%r12d, %edi
	callq	_d3d9_dstmod
	movl	%eax, %ebx
	movl	4(%r14), %edi
	callq	_d3d9_writemask
	orl	%r13d, %ebx
	orl	%eax, %ebx
	orl	%r15d, %ebx
	orl	$-2147483648, %ebx              ## imm = 0x80000000
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_dword                      ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_5
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Relative addressing not supported for destination registers\n"

	.comm	_E_INVALIDARG,8,3               ## @E_INVALIDARG
L_.str.1:                               ## @.str.1
	.asciz	"Predicate register not supported in ps_2_0\n"

	.comm	_D3DSPR_PREDICATE,4,2           ## @D3DSPR_PREDICATE
L_.str.2:                               ## @.str.2
	.asciz	"Invalid dest register type for 2.x pshader\n"

	.comm	_D3DSP_DSTSHIFT_SHIFT,4,2       ## @D3DSP_DSTSHIFT_SHIFT
	.comm	_D3DSP_DSTSHIFT_MASK,4,2        ## @D3DSP_DSTSHIFT_MASK
	.no_dead_strip	_ps_2_0_dstreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps_2_0_dstreg
_ps_2_0_dstreg:                         ; @ps_2_0_dstreg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x23, x0
	ldr	x8, [x1, #16]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_WARN
Lloh2:
	adrp	x8, _E_INVALIDARG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E_INVALIDARG@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [x23]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x20, x1
	ldr	w0, [x1]
	sub	w8, w0, #128
	cmp	w8, #4
	b.hi	LBB0_7
; %bb.4:
	mov	x21, x4
	mov	x22, x3
	mov	x19, x2
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	bl	_d3d9_register
	b	LBB0_11
LBB0_6:
	mov	x0, x23
	mov	x1, x20
	bl	_map_ps_input
	b	LBB0_12
LBB0_7:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_8:
	ldr	w24, [x23, #8]
	mov	w0, #2
	mov	w1, #1
	bl	_BWRITERPS_VERSION
	cmp	w24, w0
	b.eq	LBB0_10
; %bb.9:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WARN
Lloh11:
	adrp	x8, _E_INVALIDARG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _E_INVALIDARG@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x23]
LBB0_10:
Lloh14:
	adrp	x8, _D3DSPR_PREDICATE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _D3DSPR_PREDICATE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
LBB0_11:
	ldr	w1, [x20, #8]
	bl	_d3dsp_register
LBB0_12:
	mov	x23, x0
Lloh17:
	adrp	x8, _D3DSP_DSTSHIFT_SHIFT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _D3DSP_DSTSHIFT_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	lsl	w8, w22, w8
Lloh20:
	adrp	x9, _D3DSP_DSTSHIFT_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _D3DSP_DSTSHIFT_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	and	w22, w8, w9
	mov	x0, x21
	bl	_d3d9_dstmod
	mov	x21, x0
	ldr	w0, [x20, #4]
	bl	_d3d9_writemask
	orr	w8, w23, w22
	orr	w8, w8, w21
	orr	w8, w8, w0
	orr	w1, w8, #0x80000000
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_put_dword
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
	.byte	(LBB0_6-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Relative addressing not supported for destination registers\n"

	.comm	_E_INVALIDARG,8,3               ; @E_INVALIDARG
l_.str.1:                               ; @.str.1
	.asciz	"Predicate register not supported in ps_2_0\n"

	.comm	_D3DSPR_PREDICATE,4,2           ; @D3DSPR_PREDICATE
l_.str.2:                               ; @.str.2
	.asciz	"Invalid dest register type for 2.x pshader\n"

	.comm	_D3DSP_DSTSHIFT_SHIFT,4,2       ; @D3DSP_DSTSHIFT_SHIFT
	.comm	_D3DSP_DSTSHIFT_MASK,4,2        ; @D3DSP_DSTSHIFT_MASK
	.no_dead_strip	_ps_2_0_dstreg
.subsections_via_symbols
