	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_tex_op_atifs
_set_tex_op_atifs:                      ## @set_tex_op_atifs
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	32(%rdi), %rax
	movq	24(%rdi), %r12
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r14
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %rbx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	callq	_gen_ffp_frag_op
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_find_ffp_frag_shader
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	$32, %edi
	callq	_heap_alloc_zero
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	movl	$0, (%rax)
	movl	(%rbx), %eax
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	-56(%rbp), %rdi
	movq	_WINED3D_TOP_DISABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, (%rdi,%rdx,8)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rdx
	movl	%edx, (%r15)
	cmpq	%rdx, %rax
	jne	LBB0_6
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
	jmp	LBB0_27
LBB0_4:
	movq	-56(%rbp), %rdi
LBB0_8:
	movq	%r15, %rbx
	addq	$24, %rbx
	movq	%rdi, 24(%r15)
	movq	8(%r15), %rdx
	movq	%r12, %rsi
	callq	_gen_ati_shader
	movl	%eax, 16(%r15)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_add_ffp_frag_shader
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_TRACE
LBB0_9:
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_14
## %bb.10:
	xorl	%ebx, %ebx
	movq	_WINED3D_UNMAPPED_STAGE@GOTPCREL(%rip), %r14
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rcx
	movq	(%rcx,%rbx,8), %rdx
	cmpq	(%r14), %rdx
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_context_active_texture
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %edi
	movq	%r12, %rsi
	callq	_texture_activate_dimensions
	movl	(%r15), %eax
	jmp	LBB0_13
LBB0_14:
	movl	16(%r15), %edi
	callq	_glBindFragmentShaderATI
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	movq	_MAX_TEXTURES@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_27
## %bb.15:
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_25:                                ##   in Loop: Header=BB0_16 Depth=1
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%rbx
	movl	(%r12), %eax
	cmpq	%rax, %rbx
	jae	LBB0_27
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	testq	%r14, %r14
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	8(%r14), %rax
	movq	8(%r15), %rcx
	movl	(%rcx,%rbx,4), %esi
	cmpl	%esi, (%rax,%rbx,4)
	je	LBB0_26
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$128, %esi
	je	LBB0_23
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$129, %esi
	je	LBB0_24
## %bb.21:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$130, %esi
	jne	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	_WINED3D_TSS_BUMPENV_MAT00@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_STATE_TEXTURESTAGE
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_set_bumpmat
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	cmpl	$128, %esi
	jne	LBB0_20
LBB0_23:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	_WINED3D_RS_TEXTUREFACTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STATE_RENDER
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_atifs_tfactor
	jmp	LBB0_26
LBB0_24:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	_WINED3D_TSS_CONSTANT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_STATE_TEXTURESTAGE
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_atifs_stage_constant
	jmp	LBB0_26
LBB0_27:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory\n"

	.comm	_WINED3D_TOP_DISABLE,8,3        ## @WINED3D_TOP_DISABLE
L_.str.1:                               ## @.str.1
	.asciz	"Allocated fixed function replacement shader descriptor %p.\n"

	.comm	_WINED3D_UNMAPPED_STAGE,8,3     ## @WINED3D_UNMAPPED_STAGE
	.comm	_MAX_TEXTURES,4,2               ## @MAX_TEXTURES
	.comm	_WINED3D_TSS_BUMPENV_MAT00,4,2  ## @WINED3D_TSS_BUMPENV_MAT00
	.comm	_WINED3D_RS_TEXTUREFACTOR,4,2   ## @WINED3D_RS_TEXTUREFACTOR
	.comm	_WINED3D_TSS_CONSTANT,4,2       ## @WINED3D_TSS_CONSTANT
L_.str.2:                               ## @.str.2
	.asciz	"Unexpected constant type %u.\n"

	.no_dead_strip	_set_tex_op_atifs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_tex_op_atifs
_set_tex_op_atifs:                      ; @set_tex_op_atifs
	.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	x19, x1
	mov	x20, x0
	ldp	x22, x8, [x0, #24]
	ldp	x26, x24, [x0, #8]
	ldr	x25, [x26]
	ldr	x23, [x8]
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	add	x2, sp, #8
	bl	_gen_ffp_frag_op
	add	x1, sp, #8
	mov	x0, x23
	bl	_find_ffp_frag_shader
	mov	x21, x0
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	cbnz	w8, LBB0_10
	b	LBB0_14
LBB0_2:
	mov	w0, #32
	bl	_heap_alloc_zero
	cbz	x0, LBB0_7
; %bb.3:
	mov	x21, x0
	str	wzr, [x0]
	ldr	w8, [x24]
	cbz	w8, LBB0_8
; %bb.4:
	mov	x9, #0
	ldr	x0, [sp, #8]
Lloh3:
	adrp	x10, _WINED3D_TOP_DISABLE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _WINED3D_TOP_DISABLE@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x0, x9, lsl #3]
	cmp	x11, x10
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #1
	str	w9, [x21]
	cmp	x8, x9
	b.ne	LBB0_5
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	b	LBB0_27
LBB0_8:
	ldr	x0, [sp, #8]
LBB0_9:
	mov	x24, x21
	str	x0, [x24, #24]!
	ldr	x2, [x21, #8]
	mov	x1, x22
	bl	_gen_ati_shader
	str	w0, [x21, #16]
	mov	x0, x23
	mov	x1, x24
	bl	_add_ffp_frag_shader
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_TRACE
	ldr	w8, [x21]
	cbz	w8, LBB0_14
LBB0_10:
	mov	x23, #0
Lloh10:
	adrp	x24, _WINED3D_UNMAPPED_STAGE@GOTPAGE
Lloh11:
	ldr	x24, [x24, _WINED3D_UNMAPPED_STAGE@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, uxtw
	b.hs	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20]
	ldr	x2, [x9, x23, lsl #3]
	ldr	x9, [x24]
	cmp	x2, x9
	b.eq	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_context_active_texture
	ldr	x8, [x19]
	ldr	w0, [x8, x23, lsl #2]
	mov	x1, x22
	bl	_texture_activate_dimensions
	ldr	w8, [x21]
	b	LBB0_11
LBB0_14:
	ldr	w0, [x21, #16]
	bl	_glBindFragmentShaderATI
	bl	_GL_EXTCALL
	str	x21, [x26]
Lloh12:
	adrp	x24, _MAX_TEXTURES@GOTPAGE
Lloh13:
	ldr	x24, [x24, _MAX_TEXTURES@GOTPAGEOFF]
	ldr	w8, [x24]
	cbz	w8, LBB0_27
; %bb.15:
	mov	x22, #0
Lloh14:
	adrp	x26, _WINED3D_RS_TEXTUREFACTOR@GOTPAGE
Lloh15:
	ldr	x26, [x26, _WINED3D_RS_TEXTUREFACTOR@GOTPAGEOFF]
Lloh16:
	adrp	x27, _WINED3D_TSS_CONSTANT@GOTPAGE
Lloh17:
	ldr	x27, [x27, _WINED3D_TSS_CONSTANT@GOTPAGEOFF]
Lloh18:
	adrp	x28, _WINED3D_TSS_BUMPENV_MAT00@GOTPAGE
Lloh19:
	ldr	x28, [x28, _WINED3D_TSS_BUMPENV_MAT00@GOTPAGEOFF]
Lloh20:
	adrp	x23, l_.str.2@PAGE
Lloh21:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=1
	str	x8, [sp]
	mov	x0, x23
	bl	_ERR
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x22, x22, #1
	ldr	w8, [x24]
	cmp	x22, x8
	b.hs	LBB0_27
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	cbz	x25, LBB0_24
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x25, #8]
	lsl	x9, x22, #2
	ldr	w10, [x8, x9]
	ldr	x8, [x21, #8]
	ldr	w8, [x8, x9]
	cmp	w10, w8
	b.eq	LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	cmp	w8, #128
	b.eq	LBB0_25
LBB0_21:                                ;   in Loop: Header=BB0_18 Depth=1
	cmp	w8, #129
	b.eq	LBB0_26
; %bb.22:                               ;   in Loop: Header=BB0_18 Depth=1
	cmp	w8, #130
	b.ne	LBB0_16
; %bb.23:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w1, [x28]
	mov	x0, x22
	bl	_STATE_TEXTURESTAGE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_set_bumpmat
	b	LBB0_17
LBB0_24:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x21, #8]
	ldr	w8, [x8, x22, lsl #2]
	cmp	w8, #128
	b.ne	LBB0_21
LBB0_25:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	w0, [x26]
	bl	_STATE_RENDER
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_atifs_tfactor
	b	LBB0_17
LBB0_26:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	w1, [x27]
	mov	x0, x22
	bl	_STATE_TEXTURESTAGE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_atifs_stage_constant
	b	LBB0_17
LBB0_27:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory\n"

	.comm	_WINED3D_TOP_DISABLE,8,3        ; @WINED3D_TOP_DISABLE
l_.str.1:                               ; @.str.1
	.asciz	"Allocated fixed function replacement shader descriptor %p.\n"

	.comm	_WINED3D_UNMAPPED_STAGE,8,3     ; @WINED3D_UNMAPPED_STAGE
	.comm	_MAX_TEXTURES,4,2               ; @MAX_TEXTURES
	.comm	_WINED3D_TSS_BUMPENV_MAT00,4,2  ; @WINED3D_TSS_BUMPENV_MAT00
	.comm	_WINED3D_RS_TEXTUREFACTOR,4,2   ; @WINED3D_RS_TEXTUREFACTOR
	.comm	_WINED3D_TSS_CONSTANT,4,2       ; @WINED3D_TSS_CONSTANT
l_.str.2:                               ; @.str.2
	.asciz	"Unexpected constant type %u.\n"

	.no_dead_strip	_set_tex_op_atifs
.subsections_via_symbols
