	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps_2_srcreg
_ps_2_srcreg:                           ## @ps_2_srcreg
	.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
	movq	%rdi, %r15
	cmpq	$0, 16(%rsi)
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	callq	_WARN
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %r12
	movl	(%rsi), %edi
	leal	-128(%rdi), %eax
	cmpl	$9, %eax
	ja	LBB0_15
## %bb.4:
	movq	%rdx, %r14
	movl	$1003, %ecx                     ## imm = 0x3EB
	btl	%eax, %ecx
	jae	LBB0_5
## %bb.7:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_d3d9_register
	movl	12(%r12), %esi
	movl	%eax, %edi
LBB0_13:
	callq	_d3dsp_register
LBB0_14:
	movl	%eax, %ebx
	movl	8(%r12), %edi
	callq	_d3d9_swizzle
	movl	%eax, %r15d
	movq	_D3DVS_SWIZZLE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movl	4(%r12), %edi
	callq	_d3d9_srcmod
	orl	%eax, %ebx
	orl	%r15d, %ebx
	orl	$-2147483648, %ebx              ## imm = 0x80000000
	movq	%r14, %rdi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_dword                      ## TAILCALL
LBB0_5:
	cmpl	$2, %eax
	jne	LBB0_6
## %bb.8:
	movl	8(%r15), %ebx
	movl	$2, %edi
	movl	$1, %esi
	callq	_BWRITERPS_VERSION
	cmpl	%eax, %ebx
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_WARN
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_10:
	movl	12(%r12), %esi
	testl	%esi, %esi
	je	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_WARN
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_12:
	movq	_D3DSPR_PREDICATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	jmp	LBB0_13
LBB0_6:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_map_ps_input
	jmp	LBB0_14
LBB0_15:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Relative addressing not supported in <= ps_3_0\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"Predicate register with regnum %u not supported\n"

	.comm	_D3DSPR_PREDICATE,4,2           ## @D3DSPR_PREDICATE
L_.str.3:                               ## @.str.3
	.asciz	"Invalid register type for ps_2_0 shader\n"

	.comm	_D3DVS_SWIZZLE_MASK,4,2         ## @D3DVS_SWIZZLE_MASK
	.no_dead_strip	_ps_2_srcreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps_2_srcreg
_ps_2_srcreg:                           ; @ps_2_srcreg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, 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, [x21]
	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
	add	sp, sp, #64
	ret
LBB0_3:
	mov	x20, x1
	ldr	w0, [x1]
	sub	w8, w0, #128
	cmp	w8, #9
	b.hi	LBB0_15
; %bb.4:
	mov	x19, x2
	mov	w9, #1
	lsl	w9, w9, w8
	mov	w10, #1003
	tst	w9, w10
	b.eq	LBB0_8
; %bb.5:
	bl	_d3d9_register
	ldr	w1, [x20, #12]
LBB0_6:
	bl	_d3dsp_register
LBB0_7:
	mov	x21, x0
	ldr	w0, [x20, #8]
	bl	_d3d9_swizzle
Lloh5:
	adrp	x8, _D3DVS_SWIZZLE_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _D3DVS_SWIZZLE_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w22, w8, w0
	ldr	w0, [x20, #4]
	bl	_d3d9_srcmod
	orr	w8, w21, w22
	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
	add	sp, sp, #64
	b	_put_dword
LBB0_8:
	cmp	w8, #2
	b.ne	LBB0_14
; %bb.9:
	ldr	w22, [x21, #8]
	mov	w0, #2
	mov	w1, #1
	bl	_BWRITERPS_VERSION
	cmp	w22, w0
	b.eq	LBB0_11
; %bb.10:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WARN
Lloh10:
	adrp	x8, _E_INVALIDARG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _E_INVALIDARG@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_11:
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_13
; %bb.12:
	str	x8, [sp]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_WARN
Lloh15:
	adrp	x8, _E_INVALIDARG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _E_INVALIDARG@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_13:
Lloh18:
	adrp	x8, _D3DSPR_PREDICATE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _D3DSPR_PREDICATE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	mov	w1, #0
	b	LBB0_6
LBB0_14:
	mov	x0, x21
	mov	x1, x20
	bl	_map_ps_input
	b	LBB0_7
LBB0_15:
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Relative addressing not supported in <= ps_3_0\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"Predicate register with regnum %u not supported\n"

	.comm	_D3DSPR_PREDICATE,4,2           ; @D3DSPR_PREDICATE
l_.str.3:                               ; @.str.3
	.asciz	"Invalid register type for ps_2_0 shader\n"

	.comm	_D3DVS_SWIZZLE_MASK,4,2         ; @D3DVS_SWIZZLE_MASK
	.no_dead_strip	_ps_2_srcreg
.subsections_via_symbols
