	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm_3_dstreg
_sm_3_dstreg:                           ## @sm_3_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
	movl	%r8d, %r12d
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r15
	cmpq	$0, 8(%rsi)
	je	LBB0_1
## %bb.2:
	movq	(%r15), %rbx
	movl	$3, %edi
	xorl	%esi, %esi
	callq	_BWRITERVS_VERSION
	cmpq	%rax, %rbx
	jne	LBB0_7
## %bb.3:
	movq	(%r14), %rdi
	movq	_BWRITERSPR_OUTPUT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_7
## %bb.4:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_D3DVS_ADDRMODE_RELATIVE@GOTPCREL(%rip), %rax
	movq	_D3DVS_ADDRESSMODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	andl	(%rax), %ebx
	orl	$-2147483648, %ebx              ## imm = 0x80000000
	jmp	LBB0_5
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_WARN
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	jmp	LBB0_8
LBB0_1:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rdi
	movl	$-2147483648, %ebx              ## imm = 0x80000000
LBB0_5:
	callq	_d3d9_register
	movl	20(%r14), %esi
	movl	%eax, %edi
	callq	_d3dsp_register
	movl	%eax, %r13d
	movl	%r12d, %edi
	callq	_d3d9_dstmod
	movl	%eax, %r12d
	orl	%ebx, %r12d
	movl	16(%r14), %edi
	callq	_d3d9_writemask
	movl	%eax, %ebx
	orl	%r12d, %ebx
	orl	%r13d, %ebx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_put_dword
	movq	_D3DVS_ADDRMODE_RELATIVE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.6:
	movq	8(%r14), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sm_3_srcreg                    ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BWRITERSPR_OUTPUT,8,3          ## @BWRITERSPR_OUTPUT
	.comm	_D3DVS_ADDRMODE_RELATIVE,4,2    ## @D3DVS_ADDRMODE_RELATIVE
	.comm	_D3DVS_ADDRESSMODE_MASK,4,2     ## @D3DVS_ADDRESSMODE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Relative addressing not supported for this shader type or register type\n"

	.comm	_E_INVALIDARG,4,2               ## @E_INVALIDARG
	.no_dead_strip	_sm_3_dstreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sm_3_dstreg
_sm_3_dstreg:                           ; @sm_3_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	x22, x4
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x23, [x19]
	mov	w0, #3
	mov	w1, #0
	bl	_BWRITERVS_VERSION
	cmp	x23, x0
	b.ne	LBB0_4
; %bb.2:
	ldr	x0, [x21]
Lloh0:
	adrp	x8, _BWRITERSPR_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BWRITERSPR_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _D3DVS_ADDRMODE_RELATIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D3DVS_ADDRMODE_RELATIVE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _D3DVS_ADDRESSMODE_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _D3DVS_ADDRESSMODE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
	orr	w23, w8, #0x80000000
	b	LBB0_6
LBB0_4:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WARN
Lloh11:
	adrp	x8, _E_INVALIDARG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _E_INVALIDARG@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	b	LBB0_8
LBB0_5:
	ldr	x0, [x21]
	mov	w23, #-2147483648
LBB0_6:
	bl	_d3d9_register
	ldr	w1, [x21, #20]
	bl	_d3dsp_register
	orr	w23, w0, w23
	mov	x0, x22
	bl	_d3d9_dstmod
	orr	w22, w23, w0
	ldr	w0, [x21, #16]
	bl	_d3d9_writemask
	orr	w22, w22, w0
	mov	x0, x20
	mov	x1, x22
	bl	_put_dword
Lloh14:
	adrp	x8, _D3DVS_ADDRMODE_RELATIVE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _D3DVS_ADDRMODE_RELATIVE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_8
; %bb.7:
	ldr	x1, [x21, #8]
	mov	x0, x19
	mov	x2, x20
	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	_sm_3_srcreg
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_BWRITERSPR_OUTPUT,8,3          ; @BWRITERSPR_OUTPUT
	.comm	_D3DVS_ADDRMODE_RELATIVE,4,2    ; @D3DVS_ADDRMODE_RELATIVE
	.comm	_D3DVS_ADDRESSMODE_MASK,4,2     ; @D3DVS_ADDRESSMODE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Relative addressing not supported for this shader type or register type\n"

	.comm	_E_INVALIDARG,4,2               ; @E_INVALIDARG
	.no_dead_strip	_sm_3_dstreg
.subsections_via_symbols
