	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function GX_SetFog
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x3f000000                      ## float 0.5
LCPI0_2:
	.long	0x4b00001e                      ## float 8388638
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_GX_SetFog
	.p2align	4, 0x90
_GX_SetFog:                             ## @GX_SetFog
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movaps	%xmm3, -128(%rbp)               ## 16-byte Spill
	movaps	%xmm2, -112(%rbp)               ## 16-byte Spill
	movaps	%xmm1, -96(%rbp)                ## 16-byte Spill
	movaps	%xmm0, -80(%rbp)                ## 16-byte Spill
	movl	$1, %ebx
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	$3, %esi
	movl	$1, %edx
	callq	__SHIFTR
	movaps	-112(%rbp), %xmm5               ## 16-byte Reload
	movaps	-96(%rbp), %xmm4                ## 16-byte Reload
	movaps	-128(%rbp), %xmm3               ## 16-byte Reload
	movaps	-80(%rbp), %xmm2                ## 16-byte Reload
	movaps	%xmm3, %xmm0
	cmpeqps	%xmm5, %xmm0
	movaps	%xmm4, %xmm1
	cmpeqps	%xmm2, %xmm1
	orps	%xmm0, %xmm1
	movd	%xmm1, %ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	$-285212672, %r14d              ## imm = 0xEF000000
	xorl	%ebx, %ebx
	xorps	%xmm0, %xmm0
	testb	$1, %cl
	je	LBB0_3
## %bb.2:
	xorps	%xmm2, %xmm2
	jmp	LBB0_15
LBB0_4:
	testb	$1, %cl
	je	LBB0_6
## %bb.5:
	xorps	%xmm2, %xmm2
	movss	LCPI0_1(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	jmp	LBB0_14
LBB0_3:
	subss	%xmm2, %xmm4
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	divss	%xmm4, %xmm0
	subss	%xmm5, %xmm3
	mulss	%xmm0, %xmm3
	subss	%xmm5, %xmm2
	mulss	%xmm0, %xmm2
	movaps	%xmm3, %xmm0
	jmp	LBB0_15
LBB0_6:
	movaps	%xmm3, %xmm0
	subss	%xmm5, %xmm0
	mulss	%xmm3, %xmm5
	subss	%xmm2, %xmm4
	movaps	%xmm4, %xmm1
	mulss	%xmm0, %xmm1
	divss	%xmm0, %xmm3
	insertps	$16, %xmm5, %xmm2               ## xmm2 = xmm2[0],xmm5[0],xmm2[2,3]
	insertps	$16, %xmm1, %xmm4               ## xmm4 = xmm4[0],xmm1[0],xmm4[2,3]
	movl	$1, %ebx
	ucomiss	LCPI0_0(%rip), %xmm3
	jbe	LBB0_9
## %bb.7:
	movl	$1, %ebx
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	mulss	%xmm0, %xmm3
	incl	%ebx
	ucomiss	%xmm1, %xmm3
	ja	LBB0_8
LBB0_9:
	divps	%xmm4, %xmm2
	xorps	%xmm0, %xmm0
	ucomiss	%xmm0, %xmm3
	jbe	LBB0_14
## %bb.10:
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm3, %xmm0
	jbe	LBB0_14
## %bb.11:
	xorps	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	addss	%xmm3, %xmm3
	decl	%ebx
	ucomiss	%xmm1, %xmm3
	jbe	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	ucomiss	%xmm3, %xmm0
	ja	LBB0_12
LBB0_14:
	movl	$1, %eax
	movl	%ebx, %ecx
	shll	%cl, %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	movshdup	%xmm2, %xmm0                    ## xmm0 = xmm2[1,1,3,3]
	divss	%xmm1, %xmm0
	mulss	LCPI0_2(%rip), %xmm3
	cvttss2si	%xmm3, %r14d
	andl	$16777215, %r14d                ## imm = 0xFFFFFF
	orl	$-285212672, %r14d              ## imm = 0xEF000000
LBB0_15:
	movq	%r13, %r15
	shrq	$32, %r15
	movd	%xmm0, %edi
	movd	%xmm2, %r12d
	movl	$12, %esi
	movl	$20, %edx
	callq	__SHIFTR
	orl	$-301989888, %eax               ## imm = 0xEE000000
	movl	%eax, %edi
	callq	_GX_LOAD_BP_REG
	movl	%r14d, %edi
	callq	_GX_LOAD_BP_REG
	andl	$31, %ebx
	orl	$-268435456, %ebx               ## imm = 0xF0000000
	movl	%ebx, %edi
	callq	_GX_LOAD_BP_REG
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	$21, %esi
	movl	$3, %edx
	callq	__SHIFTL
	movl	%eax, %r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	$20, %esi
	movl	$1, %edx
	callq	__SHIFTL
	movl	%eax, %ebx
	movl	%r12d, %edi
	movl	$12, %esi
	movl	$20, %edx
	callq	__SHIFTR
	orl	%r14d, %ebx
	orl	%eax, %ebx
	orl	$-251658240, %ebx               ## imm = 0xF1000000
	movl	%ebx, %edi
	callq	_GX_LOAD_BP_REG
	movl	%r13d, %edi
	movl	$16, %esi
	movl	$8, %edx
	callq	__SHIFTL
	movl	%eax, %ebx
	movl	%r15d, %edi
	movl	$8, %esi
	movl	$8, %edx
	callq	__SHIFTL
	movzbl	-52(%rbp), %edi                 ## 1-byte Folded Reload
	orl	%ebx, %edi
	orl	%eax, %edi
	orl	$-234881024, %edi               ## imm = 0xF2000000
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_GX_LOAD_BP_REG                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_SetFog                      ; -- Begin function GX_SetFog
	.p2align	2
_GX_SetFog:                             ; @GX_SetFog
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-112]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	d9, d8, [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 b8, -88
	.cfi_offset b9, -96
	.cfi_offset b10, -104
	.cfi_offset b11, -112
	mov	x19, x2
	mov	x20, x1
	fmov	s9, s3
	fmov	s10, s2
	fmov	s11, s1
	fmov	s8, s0
	mov	x21, x0
	mov	w1, #3
	mov	w2, #1
	bl	__SHIFTR
	mov	x22, x0
	fcmp	s9, s10
	cset	w8, eq
	fcmp	s11, s8
	cset	w9, eq
	orr	w9, w9, w8
	cbz	w0, LBB0_2
; %bb.1:
	movi	d0, #0000000000000000
	mov	w24, #-285212672
	fsub	s1, s11, s8
	fmov	s2, #1.00000000
	fdiv	s1, s2, s1
	fsub	s2, s9, s10
	fmul	s2, s1, s2
	fsub	s3, s8, s10
	fmul	s1, s3, s1
	tst	w9, #0x1
	fcsel	s2, s0, s2, ne
	csel	w26, wzr, wzr, ne
	fcsel	s1, s0, s1, ne
	b	LBB0_10
LBB0_2:
	mov	w8, #1
	tbz	w9, #0, LBB0_4
; %bb.3:
	fmov	s0, #0.50000000
	movi	d1, #0000000000000000
	movi	d2, #0000000000000000
	mov	w26, #1
	b	LBB0_9
LBB0_4:
	fmul	s2, s10, s9
	fsub	s0, s9, s10
	fsub	s1, s11, s8
	fmul	s3, s1, s0
	fdiv	s0, s9, s0
	fmov	s4, #1.00000000
	mov	w26, #1
	fcmp	s0, s4
	b.le	LBB0_7
; %bb.5:
	fmov	s5, #0.50000000
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	fmul	s0, s0, s5
	add	w26, w26, #1
	fcmp	s0, s4
	b.gt	LBB0_6
LBB0_7:
	fdiv	s2, s2, s3
	fcmp	s0, #0.0
	fmov	s3, #0.50000000
	fccmp	s0, s3, #0, gt
	fdiv	s1, s8, s1
	b.pl	LBB0_9
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	fadd	s0, s0, s0
	sub	w26, w26, #1
	fcmp	s0, #0.0
	fccmp	s0, s3, #0, gt
	b.mi	LBB0_8
LBB0_9:
	lsl	w8, w8, w26
	scvtf	s3, w8
	fdiv	s2, s2, s3
	mov	w8, #30
	movk	w8, #19200, lsl #16
	fmov	s3, w8
	fmul	s0, s0, s3
	fcvtzs	w8, s0
	mov	w24, #-285212672
	bfxil	w24, w8, #0, #24
LBB0_10:
	lsr	x23, x20, #32
	fmov	w0, s2
	fmov	w25, s1
	mov	w1, #12
	mov	w2, #20
	bl	__SHIFTR
	mov	w8, #-301989888
	orr	w0, w0, w8
	bl	_GX_LOAD_BP_REG
	mov	x0, x24
	bl	_GX_LOAD_BP_REG
	mov	w0, #-268435456
	bfxil	w0, w26, #0, #5
	bl	_GX_LOAD_BP_REG
	mov	x0, x21
	mov	w1, #21
	mov	w2, #3
	bl	__SHIFTL
	mov	x21, x0
	mov	x0, x22
	mov	w1, #20
	mov	w2, #1
	bl	__SHIFTL
	mov	x22, x0
	mov	x0, x25
	mov	w1, #12
	mov	w2, #20
	bl	__SHIFTR
	orr	w8, w21, w22
	orr	w8, w8, w0
	mov	w9, #-251658240
	orr	w0, w8, w9
	bl	_GX_LOAD_BP_REG
	mov	x0, x20
	mov	w1, #16
	mov	w2, #8
	bl	__SHIFTL
	mov	x20, x0
	mov	x0, x23
	mov	w1, #8
	mov	w2, #8
	bl	__SHIFTL
	and	w8, w19, #0xff
	orr	w8, w8, w20
	orr	w8, w8, w0
	mov	w9, #-234881024
	orr	w0, w8, w9
	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	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #112            ; 16-byte Folded Reload
	b	_GX_LOAD_BP_REG
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
