	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function state_texfactor_arbfp
_state_texfactor_arbfp:                 ## @state_texfactor_arbfp
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movq	8(%rbx), %rax
	cmpq	_arb_program_shader_backend@GOTPCREL(%rip), %rax
	je	LBB0_1
LBB0_3:
	movq	(%r14), %rax
	movq	_WINED3D_RS_TEXTUREFACTOR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	leaq	-24(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_wined3d_color_from_d3dcolor
	movq	_GL_FRAGMENT_PROGRAM_ARB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ARB_FFP_CONST_TFACTOR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdx
	callq	_glProgramEnvParameter4fvARB
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str(%rip), %rdi
	callq	_checkGLcall
	jmp	LBB0_4
LBB0_1:
	movq	%r14, %rdi
	callq	_use_ps
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	(%rbx), %rbx
	movq	(%rbx), %rax
	movq	_ARB_FFP_CONST_TFACTOR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movl	$1, (%rax,%rsi,4)
	movl	8(%rbx), %edi
	incq	%rsi
	callq	_max
	movl	%eax, 8(%rbx)
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_arb_program_shader_backend,4,2 ## @arb_program_shader_backend
	.comm	_ARB_FFP_CONST_TFACTOR,8,3      ## @ARB_FFP_CONST_TFACTOR
	.comm	_WINED3D_RS_TEXTUREFACTOR,8,3   ## @WINED3D_RS_TEXTUREFACTOR
	.comm	_GL_FRAGMENT_PROGRAM_ARB,4,2    ## @GL_FRAGMENT_PROGRAM_ARB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_TFACTOR, &color.r)"

	.no_dead_strip	_state_texfactor_arbfp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function state_texfactor_arbfp
_state_texfactor_arbfp:                 ; @state_texfactor_arbfp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	x20, [x0]
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _arb_program_shader_backend@GOTPAGE
Lloh1:
	ldr	x9, [x9, _arb_program_shader_backend@GOTPAGEOFF]
	cmp	x8, x9
	b.eq	LBB0_2
LBB0_1:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _WINED3D_RS_TEXTUREFACTOR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WINED3D_RS_TEXTUREFACTOR@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	add	x0, sp, #8
	bl	_wined3d_color_from_d3dcolor
Lloh5:
	adrp	x8, _GL_FRAGMENT_PROGRAM_ARB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GL_FRAGMENT_PROGRAM_ARB@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _ARB_FFP_CONST_TFACTOR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ARB_FFP_CONST_TFACTOR@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x8]
	add	x2, sp, #8
	bl	_glProgramEnvParameter4fvARB
	bl	_GL_EXTCALL
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_checkGLcall
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_use_ps
	cbz	x0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	ldr	x20, [x20]
	ldr	x8, [x20]
Lloh13:
	adrp	x9, _ARB_FFP_CONST_TFACTOR@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ARB_FFP_CONST_TFACTOR@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	mov	w10, #1
	str	w10, [x8, x9, lsl #2]
	ldr	w0, [x20, #8]
	add	x1, x9, #1
	bl	_max
	str	w0, [x20, #8]
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_arb_program_shader_backend,4,2 ; @arb_program_shader_backend
	.comm	_ARB_FFP_CONST_TFACTOR,8,3      ; @ARB_FFP_CONST_TFACTOR
	.comm	_WINED3D_RS_TEXTUREFACTOR,8,3   ; @WINED3D_RS_TEXTUREFACTOR
	.comm	_GL_FRAGMENT_PROGRAM_ARB,4,2    ; @GL_FRAGMENT_PROGRAM_ARB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_TFACTOR, &color.r)"

	.no_dead_strip	_state_texfactor_arbfp
.subsections_via_symbols
