	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_glsl_generate_fog_code
_shader_glsl_generate_fog_code:         ## @shader_glsl_generate_fog_code
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_needs_legacy_glsl_syntax
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rbx
	cmoveq	%rax, %rbx
	leal	-128(%r15), %eax
	cmpl	$3, %eax
	ja	LBB0_3
## %bb.1:
	leaq	L_.str.2(%rip), %rsi
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.5(%rip), %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
LBB0_2:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.3(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_shader_addline                 ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_5
	.long	L0_0_set_2
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gl_FragData[0]"

L_.str.1:                               ## @.str.1
	.asciz	"ps_out0"

L_.str.2:                               ## @.str.2
	.asciz	"float fog = (ffp_fog.end - ffp_varying_fogcoord) * ffp_fog.scale;\n"

L_.str.3:                               ## @.str.3
	.asciz	"float fog = exp(-ffp_fog.density * ffp_varying_fogcoord);\n"

L_.str.4:                               ## @.str.4
	.asciz	"float fog = exp(-ffp_fog.density * ffp_fog.density * ffp_varying_fogcoord * ffp_varying_fogcoord);\n"

L_.str.5:                               ## @.str.5
	.asciz	"Invalid fog mode %#x.\n"

L_.str.6:                               ## @.str.6
	.asciz	"%s.xyz = mix(ffp_fog.color.xyz, %s.xyz, clamp(fog, 0.0, 1.0));\n"

	.no_dead_strip	_shader_glsl_generate_fog_code
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_glsl_generate_fog_code
_shader_glsl_generate_fog_code:         ; @shader_glsl_generate_fog_code
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	mov	x19, x0
	mov	x0, x1
	bl	_needs_legacy_glsl_syntax
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x0, #0
	csel	x21, x9, x8, eq
	sub	w8, w20, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_ERR
LBB0_4:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_shader_addline
	stp	x21, x21, [sp]
Lloh14:
	adrp	x1, l_.str.6@PAGE
Lloh15:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_shader_addline
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gl_FragData[0]"

l_.str.1:                               ; @.str.1
	.asciz	"ps_out0"

l_.str.2:                               ; @.str.2
	.asciz	"float fog = (ffp_fog.end - ffp_varying_fogcoord) * ffp_fog.scale;\n"

l_.str.3:                               ; @.str.3
	.asciz	"float fog = exp(-ffp_fog.density * ffp_varying_fogcoord);\n"

l_.str.4:                               ; @.str.4
	.asciz	"float fog = exp(-ffp_fog.density * ffp_fog.density * ffp_varying_fogcoord * ffp_varying_fogcoord);\n"

l_.str.5:                               ; @.str.5
	.asciz	"Invalid fog mode %#x.\n"

l_.str.6:                               ; @.str.6
	.asciz	"%s.xyz = mix(ffp_fog.color.xyz, %s.xyz, clamp(fog, 0.0, 1.0));\n"

	.no_dead_strip	_shader_glsl_generate_fog_code
.subsections_via_symbols
