	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvrc_resultarg
_nvrc_resultarg:                        ## @nvrc_resultarg
	.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
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_STATE_TEXTURESTAGE
	subl	%eax, %ebx
	movq	_WINED3D_HIGHEST_TEXTURE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	incl	%ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_TRACE
	movq	_WINED3D_TSS_COLOR_OP@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_STATE_TEXTURESTAGE
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_isStateDirty
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_STATE_TEXTURESTAGE
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_context_apply_state
LBB0_2:
	movq	_WINED3D_TSS_ALPHA_OP@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_STATE_TEXTURESTAGE
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_isStateDirty
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_STATE_TEXTURESTAGE
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_context_apply_state            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_HIGHEST_TEXTURE_STATE,4,2 ## @WINED3D_HIGHEST_TEXTURE_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting result arg for stage %u.\n"

	.comm	_WINED3D_TSS_COLOR_OP,4,2       ## @WINED3D_TSS_COLOR_OP
	.comm	_WINED3D_TSS_ALPHA_OP,4,2       ## @WINED3D_TSS_ALPHA_OP
	.no_dead_strip	_nvrc_resultarg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvrc_resultarg
_nvrc_resultarg:                        ; @nvrc_resultarg
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x19, x1
	mov	x20, x0
	mov	w0, #0
	mov	w1, #0
	bl	_STATE_TEXTURESTAGE
	sub	w8, w21, w0
Lloh0:
	adrp	x9, _WINED3D_HIGHEST_TEXTURE_STATE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3D_HIGHEST_TEXTURE_STATE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w9, w9, #1
	sdiv	w21, w8, w9
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_TRACE
Lloh5:
	adrp	x22, _WINED3D_TSS_COLOR_OP@GOTPAGE
Lloh6:
	ldr	x22, [x22, _WINED3D_TSS_COLOR_OP@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_STATE_TEXTURESTAGE
	mov	x1, x0
	mov	x0, x20
	bl	_isStateDirty
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x21
	bl	_STATE_TEXTURESTAGE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_context_apply_state
LBB0_2:
Lloh7:
	adrp	x22, _WINED3D_TSS_ALPHA_OP@GOTPAGE
Lloh8:
	ldr	x22, [x22, _WINED3D_TSS_ALPHA_OP@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_STATE_TEXTURESTAGE
	mov	x1, x0
	mov	x0, x20
	bl	_isStateDirty
	cbz	w0, LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w1, [x22]
	mov	x0, x21
	bl	_STATE_TEXTURESTAGE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_context_apply_state
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_HIGHEST_TEXTURE_STATE,4,2 ; @WINED3D_HIGHEST_TEXTURE_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting result arg for stage %u.\n"

	.comm	_WINED3D_TSS_COLOR_OP,4,2       ; @WINED3D_TSS_COLOR_OP
	.comm	_WINED3D_TSS_ALPHA_OP,4,2       ; @WINED3D_TSS_ALPHA_OP
	.no_dead_strip	_nvrc_resultarg
.subsections_via_symbols
