	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function glsl_fragment_pipe_fog
_glsl_fragment_pipe_fog:                ## @glsl_fragment_pipe_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_use_vs
	movq	(%rbx), %rsi
	movq	_WINED3D_RS_FOGSTART@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rsi,%rcx,8), %rdx
	movq	_WINED3D_RS_FOGEND@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movq	_WINED3D_SHADER_TYPE_PIXEL@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %ebx
	shll	%cl, %ebx
	movq	(%rsi,%rdi,8), %rcx
	orl	%ebx, (%r14)
	movq	_WINED3D_RS_FOGENABLE@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	cmpq	$0, (%rsi,%rdi,8)
	je	LBB0_11
## %bb.1:
	movq	_WINED3D_RS_FOGTABLEMODE@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movq	(%rsi,%rdi,8), %rdi
	movq	_WINED3D_FOG_NONE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdi
	jne	LBB0_7
## %bb.2:
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_FOGSOURCE_VS@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	_WINED3D_RS_FOGVERTEXMODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rdi, (%rsi,%rax,8)
	je	LBB0_5
## %bb.6:
	cmpq	$0, 16(%r14)
	jne	LBB0_5
LBB0_7:
	movq	_FOGSOURCE_FFP@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	cmpl	4(%r14), %eax
	jne	LBB0_10
## %bb.9:
	cmpq	%rcx, %rdx
	jne	LBB0_11
LBB0_10:
	movl	%eax, 4(%r14)
	movq	_WINED3D_SHADER_CONST_PS_FOG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	_FOGSOURCE_COORD@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_RS_FOGSTART,8,3        ## @WINED3D_RS_FOGSTART
	.comm	_WINED3D_RS_FOGEND,8,3          ## @WINED3D_RS_FOGEND
	.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
	.comm	_WINED3D_SHADER_CONST_PS_FOG,4,2 ## @WINED3D_SHADER_CONST_PS_FOG
	.no_dead_strip	_glsl_fragment_pipe_fog
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function glsl_fragment_pipe_fog
_glsl_fragment_pipe_fog:                ; @glsl_fragment_pipe_fog
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_use_vs
Lloh0:
	adrp	x8, _WINED3D_RS_FOGSTART@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_RS_FOGSTART@GOTPAGEOFF]
	ldr	x10, [x20]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x10, x8, lsl #3]
Lloh3:
	adrp	x9, _WINED3D_RS_FOGEND@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WINED3D_RS_FOGEND@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x9, [x10, x9, lsl #3]
Lloh6:
	adrp	x11, _WINED3D_SHADER_TYPE_PIXEL@GOTPAGE
Lloh7:
	ldr	x11, [x11, _WINED3D_SHADER_TYPE_PIXEL@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	mov	w12, #1
	lsl	w11, w12, w11
	ldr	w12, [x19]
	orr	w11, w12, w11
	str	w11, [x19]
Lloh9:
	adrp	x11, _WINED3D_RS_FOGENABLE@GOTPAGE
Lloh10:
	ldr	x11, [x11, _WINED3D_RS_FOGENABLE@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	ldr	x11, [x10, x11, lsl #3]
	cbz	x11, LBB0_9
; %bb.1:
Lloh12:
	adrp	x11, _WINED3D_RS_FOGTABLEMODE@GOTPAGE
Lloh13:
	ldr	x11, [x11, _WINED3D_RS_FOGTABLEMODE@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	ldr	x13, [x10, x11, lsl #3]
Lloh15:
	adrp	x11, _WINED3D_FOG_NONE@GOTPAGE
Lloh16:
	ldr	x11, [x11, _WINED3D_FOG_NONE@GOTPAGEOFF]
Lloh17:
	ldr	x14, [x11]
Lloh18:
	adrp	x11, _FOGSOURCE_FFP@GOTPAGE
Lloh19:
	ldr	x11, [x11, _FOGSOURCE_FFP@GOTPAGEOFF]
	mov	x12, x11
	cmp	x13, x14
	b.ne	LBB0_6
; %bb.2:
	cbz	x0, LBB0_4
; %bb.3:
Lloh20:
	adrp	x12, _FOGSOURCE_VS@GOTPAGE
Lloh21:
	ldr	x12, [x12, _FOGSOURCE_VS@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh22:
	adrp	x12, _WINED3D_RS_FOGVERTEXMODE@GOTPAGE
Lloh23:
	ldr	x12, [x12, _WINED3D_RS_FOGVERTEXMODE@GOTPAGEOFF]
Lloh24:
	ldr	x12, [x12]
	ldr	x10, [x10, x12, lsl #3]
Lloh25:
	adrp	x12, _FOGSOURCE_COORD@GOTPAGE
Lloh26:
	ldr	x12, [x12, _FOGSOURCE_COORD@GOTPAGEOFF]
	cmp	x10, x13
	b.eq	LBB0_6
; %bb.5:
	ldr	x10, [x19, #16]
	cmp	x10, #0
	csel	x12, x11, x12, eq
LBB0_6:
	ldr	w10, [x12]
	ldr	w11, [x19, #4]
	cmp	w10, w11
	b.ne	LBB0_8
; %bb.7:
	cmp	x8, x9
	b.ne	LBB0_9
LBB0_8:
Lloh27:
	adrp	x8, _WINED3D_SHADER_CONST_PS_FOG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WINED3D_SHADER_CONST_PS_FOG@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	stp	w10, w8, [x19, #4]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_RS_FOGSTART,8,3        ; @WINED3D_RS_FOGSTART
	.comm	_WINED3D_RS_FOGEND,8,3          ; @WINED3D_RS_FOGEND
	.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
	.comm	_WINED3D_SHADER_CONST_PS_FOG,4,2 ; @WINED3D_SHADER_CONST_PS_FOG
	.no_dead_strip	_glsl_fragment_pipe_fog
.subsections_via_symbols
