	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm_3_srcreg
_sm_3_srcreg:                           ## @sm_3_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	%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	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	callq	_d3d9_register
	movq	8(%r12), %rsi
	movl	%eax, %edi
	callq	_d3dsp_register
	movl	%eax, %r13d
	movl	28(%r12), %edi
	callq	_d3d9_swizzle
	movl	%eax, %r14d
	movq	_D3DVS_SWIZZLE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movl	24(%r12), %edi
	callq	_d3d9_srcmod
	movl	%eax, %ebx
	orl	%r13d, %ebx
	orl	%r14d, %ebx
	orl	$-2147483648, %ebx              ## imm = 0x80000000
	movq	16(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rax
	movq	_BWRITERSPR_CONST@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	movq	_D3DVS_ADDRMODE_RELATIVE@GOTPCREL(%rip), %r13
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r14
	movl	$3, %edi
	xorl	%esi, %esi
	callq	_BWRITERPS_VERSION
	cmpq	%rax, %r14
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%r12), %rcx
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rcx), %rax
	movq	_BWRITERSPR_ADDR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r14
	movl	$3, %edi
	xorl	%esi, %esi
	callq	_BWRITERVS_VERSION
	movq	16(%r12), %rcx
	cmpq	%rax, %r14
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rcx), %rax
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_BWRITERSPR_LOOP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_17
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 8(%rcx)
	jne	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_D3DVS_ADDRESSMODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r13), %eax
	orl	%eax, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_D3DVS_ADDRMODE_RELATIVE@GOTPCREL(%rip), %r13
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_put_dword
	testl	%ebx, (%r13)
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%r12), %r12
	jmp	LBB0_1
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_WARN
	jmp	LBB0_15
LBB0_14:
	movq	8(%r12), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_WARN
LBB0_15:
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DVS_SWIZZLE_MASK,4,2         ## @D3DVS_SWIZZLE_MASK
	.comm	_BWRITERSPR_CONST,8,3           ## @BWRITERSPR_CONST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"c%u[...] is unsupported in ps_3_0\n"

	.comm	_E_INVALIDARG,8,3               ## @E_INVALIDARG
	.comm	_BWRITERSPR_ADDR,8,3            ## @BWRITERSPR_ADDR
	.comm	_BWRITERSPR_LOOP,8,3            ## @BWRITERSPR_LOOP
	.comm	_D3DVS_ADDRMODE_RELATIVE,4,2    ## @D3DVS_ADDRMODE_RELATIVE
	.comm	_D3DVS_ADDRESSMODE_MASK,4,2     ## @D3DVS_ADDRESSMODE_MASK
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported relative addressing register\n"

	.no_dead_strip	_sm_3_srcreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sm_3_srcreg
_sm_3_srcreg:                           ; @sm_3_srcreg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _D3DVS_SWIZZLE_MASK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _D3DVS_SWIZZLE_MASK@GOTPAGEOFF]
Lloh2:
	adrp	x24, _D3DVS_ADDRMODE_RELATIVE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _D3DVS_ADDRMODE_RELATIVE@GOTPAGEOFF]
Lloh4:
	adrp	x25, _BWRITERSPR_CONST@GOTPAGE
Lloh5:
	ldr	x25, [x25, _BWRITERSPR_CONST@GOTPAGEOFF]
Lloh6:
	adrp	x26, _BWRITERSPR_ADDR@GOTPAGE
Lloh7:
	ldr	x26, [x26, _BWRITERSPR_ADDR@GOTPAGEOFF]
Lloh8:
	adrp	x27, _D3DVS_ADDRESSMODE_MASK@GOTPAGE
Lloh9:
	ldr	x27, [x27, _D3DVS_ADDRESSMODE_MASK@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	bl	_d3d9_register
	ldr	x1, [x20, #8]
	bl	_d3dsp_register
	mov	x22, x0
	ldr	w0, [x20, #28]
	bl	_d3d9_swizzle
	ldr	w8, [x23]
	and	w28, w8, w0
	ldr	w0, [x20, #24]
	bl	_d3d9_srcmod
	orr	w8, w22, w28
	orr	w8, w8, w0
	orr	w22, w8, #0x80000000
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_11
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [x20]
	ldr	x10, [x25]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x28, [x19]
	mov	w0, #3
	mov	w1, #0
	bl	_BWRITERPS_VERSION
	cmp	x28, x0
	b.eq	LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20, #16]
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [x8]
	ldr	x10, [x26]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x28, [x19]
	mov	w0, #3
	mov	w1, #0
	bl	_BWRITERVS_VERSION
	ldr	x8, [x20, #16]
	cmp	x28, x0
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [x8]
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
Lloh10:
	adrp	x10, _BWRITERSPR_LOOP@GOTPAGE
Lloh11:
	ldr	x10, [x10, _BWRITERSPR_LOOP@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_13
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x27]
	and	w8, w9, w8
	orr	w22, w8, w22
LBB0_11:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_put_dword
	ldr	w8, [x24]
	tst	w8, w22
	b.eq	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	x20, [x20, #16]
	b	LBB0_1
LBB0_13:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_14:
	ldr	x8, [x20, #8]
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
LBB0_15:
	bl	_WARN
Lloh17:
	adrp	x8, _E_INVALIDARG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _E_INVALIDARG@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_16:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DVS_SWIZZLE_MASK,4,2         ; @D3DVS_SWIZZLE_MASK
	.comm	_BWRITERSPR_CONST,8,3           ; @BWRITERSPR_CONST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"c%u[...] is unsupported in ps_3_0\n"

	.comm	_E_INVALIDARG,8,3               ; @E_INVALIDARG
	.comm	_BWRITERSPR_ADDR,8,3            ; @BWRITERSPR_ADDR
	.comm	_BWRITERSPR_LOOP,8,3            ; @BWRITERSPR_LOOP
	.comm	_D3DVS_ADDRMODE_RELATIVE,4,2    ; @D3DVS_ADDRMODE_RELATIVE
	.comm	_D3DVS_ADDRESSMODE_MASK,4,2     ; @D3DVS_ADDRESSMODE_MASK
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported relative addressing register\n"

	.no_dead_strip	_sm_3_srcreg
.subsections_via_symbols
