	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function state_arbfp_fog
_state_arbfp_fog:                       ## @state_arbfp_fog
	.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, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movq	_WINED3D_RS_FOGSTART@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r13
	movq	_WINED3D_RS_FOGEND@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r12
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	_TRACE
	movq	_WINED3D_SHADER_TYPE_PIXEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STATE_SHADER
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_isStateDirty
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_fragment_prog_arbfp
LBB0_2:
	movq	(%r15), %rax
	movq	_WINED3D_RS_FOGENABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_12
## %bb.3:
	movq	_WINED3D_RS_FOGTABLEMODE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_WINED3D_FOG_NONE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_9
## %bb.4:
	movq	%r15, %rdi
	callq	_use_vs
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_FOGSOURCE_VS@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	movq	(%r15), %rax
	movq	_WINED3D_RS_FOGVERTEXMODE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	cmpq	(%rbx), %rax
	je	LBB0_7
## %bb.8:
	cmpq	$0, 8(%r14)
	jne	LBB0_7
LBB0_9:
	movq	_FOGSOURCE_FFP@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	cmpl	(%r14), %eax
	jne	LBB0_13
## %bb.11:
	cmpq	%r12, %r13
	je	LBB0_13
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	%eax, (%r14)
	movq	_WINED3D_RS_FOGSTART@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_STATE_RENDER
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_state_fogstartend              ## TAILCALL
LBB0_7:
	movq	_FOGSOURCE_COORD@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_RS_FOGSTART,8,3        ## @WINED3D_RS_FOGSTART
	.comm	_WINED3D_RS_FOGEND,8,3          ## @WINED3D_RS_FOGEND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"context %p, state %p, state_id %#x.\n"

	.comm	_WINED3D_SHADER_TYPE_PIXEL,4,2  ## @WINED3D_SHADER_TYPE_PIXEL
	.comm	_WINED3D_RS_FOGENABLE,8,3       ## @WINED3D_RS_FOGENABLE
	.comm	_WINED3D_RS_FOGTABLEMODE,8,3    ## @WINED3D_RS_FOGTABLEMODE
	.comm	_WINED3D_FOG_NONE,8,3           ## @WINED3D_FOG_NONE
	.comm	_FOGSOURCE_VS,4,2               ## @FOGSOURCE_VS
	.comm	_WINED3D_RS_FOGVERTEXMODE,8,3   ## @WINED3D_RS_FOGVERTEXMODE
	.comm	_FOGSOURCE_COORD,4,2            ## @FOGSOURCE_COORD
	.comm	_FOGSOURCE_FFP,4,2              ## @FOGSOURCE_FFP
	.no_dead_strip	_state_arbfp_fog
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function state_arbfp_fog
_state_arbfp_fog:                       ; @state_arbfp_fog
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x22, _WINED3D_RS_FOGSTART@GOTPAGE
Lloh1:
	ldr	x22, [x22, _WINED3D_RS_FOGSTART@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	x23, [x8, x9, lsl #3]
Lloh2:
	adrp	x9, _WINED3D_RS_FOGEND@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WINED3D_RS_FOGEND@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	x24, [x8, x9, lsl #3]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	mov	x3, x21
	bl	_TRACE
Lloh7:
	adrp	x8, _WINED3D_SHADER_TYPE_PIXEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WINED3D_SHADER_TYPE_PIXEL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_STATE_SHADER
	mov	x1, x0
	mov	x0, x20
	bl	_isStateDirty
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_fragment_prog_arbfp
LBB0_2:
	ldr	x8, [x19]
Lloh10:
	adrp	x9, _WINED3D_RS_FOGENABLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WINED3D_RS_FOGENABLE@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
	cbz	x9, LBB0_10
; %bb.3:
Lloh13:
	adrp	x9, _WINED3D_RS_FOGTABLEMODE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _WINED3D_RS_FOGTABLEMODE@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
Lloh16:
	adrp	x25, _WINED3D_FOG_NONE@GOTPAGE
Lloh17:
	ldr	x25, [x25, _WINED3D_FOG_NONE@GOTPAGEOFF]
	ldr	x10, [x25]
Lloh18:
	adrp	x21, _FOGSOURCE_FFP@GOTPAGE
Lloh19:
	ldr	x21, [x21, _FOGSOURCE_FFP@GOTPAGEOFF]
	mov	x8, x21
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.4:
	mov	x0, x19
	bl	_use_vs
	cbz	x0, LBB0_6
; %bb.5:
Lloh20:
	adrp	x8, _FOGSOURCE_VS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FOGSOURCE_VS@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldr	x8, [x19]
Lloh22:
	adrp	x9, _WINED3D_RS_FOGVERTEXMODE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _WINED3D_RS_FOGVERTEXMODE@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
	ldr	x10, [x25]
Lloh25:
	adrp	x8, _FOGSOURCE_COORD@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FOGSOURCE_COORD@GOTPAGEOFF]
	cmp	x9, x10
	b.eq	LBB0_8
; %bb.7:
	ldr	x9, [x20, #8]
	cmp	x9, #0
	csel	x8, x21, x8, eq
LBB0_8:
	ldr	w8, [x8]
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.9:
	cmp	x23, x24
	b.eq	LBB0_11
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	str	w8, [x20]
	ldr	x0, [x22]
	bl	_STATE_RENDER
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_state_fogstartend
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_RS_FOGSTART,8,3        ; @WINED3D_RS_FOGSTART
	.comm	_WINED3D_RS_FOGEND,8,3          ; @WINED3D_RS_FOGEND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"context %p, state %p, state_id %#x.\n"

	.comm	_WINED3D_SHADER_TYPE_PIXEL,4,2  ; @WINED3D_SHADER_TYPE_PIXEL
	.comm	_WINED3D_RS_FOGENABLE,8,3       ; @WINED3D_RS_FOGENABLE
	.comm	_WINED3D_RS_FOGTABLEMODE,8,3    ; @WINED3D_RS_FOGTABLEMODE
	.comm	_WINED3D_FOG_NONE,8,3           ; @WINED3D_FOG_NONE
	.comm	_FOGSOURCE_VS,4,2               ; @FOGSOURCE_VS
	.comm	_WINED3D_RS_FOGVERTEXMODE,8,3   ; @WINED3D_RS_FOGVERTEXMODE
	.comm	_FOGSOURCE_COORD,4,2            ; @FOGSOURCE_COORD
	.comm	_FOGSOURCE_FFP,4,2              ; @FOGSOURCE_FFP
	.no_dead_strip	_state_arbfp_fog
.subsections_via_symbols
