	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function gl_fog_index_pixels
LCPI0_0:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_1:
	.quad	0x8000000000000000              ## double -0
	.quad	0x8000000000000000              ## double -0
LCPI0_2:
	.long	1127219200                      ## 0x43300000
	.long	1160773632                      ## 0x45300000
	.long	0                               ## 0x0
	.long	0                               ## 0x0
LCPI0_3:
	.quad	0x4330000000000000              ## double 4503599627370496
	.quad	0x4530000000000000              ## double 1.9342813113834067E+25
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_4:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_5:
	.quad	0x43e0000000000000              ## double 9.2233720368547758E+18
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_gl_fog_index_pixels
	.p2align	4, 0x90
_gl_fog_index_pixels:                   ## @gl_fog_index_pixels
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movsd	80(%rax), %xmm2                 ## xmm2 = mem[0],zero
	movsd	112(%rax), %xmm3                ## xmm3 = mem[0],zero
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	divss	56(%rdi), %xmm0
	movsd	48(%rdi), %xmm4                 ## xmm4 = mem[0],zero
	cvtss2sd	%xmm0, %xmm5
	movl	8(%rdi), %eax
	cmpl	$128, %eax
	movsd	%xmm2, -64(%rbp)                ## 8-byte Spill
	movsd	%xmm4, -56(%rbp)                ## 8-byte Spill
	movsd	%xmm5, -48(%rbp)                ## 8-byte Spill
	je	LBB0_6
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_9
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_13
## %bb.3:
	testq	%r12, %r12
	je	LBB0_12
## %bb.4:
	xorpd	LCPI0_1(%rip), %xmm3
	xorl	%ebx, %ebx
	movapd	%xmm3, -80(%rbp)                ## 16-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sdl	(%r15,%rbx,4), %xmm0
	subsd	%xmm4, %xmm0
	mulsd	%xmm5, %xmm0
	addsd	%xmm2, %xmm0
	movapd	%xmm3, %xmm1
	divsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm2
	movapd	LCPI0_1(%rip), %xmm3            ## xmm3 = [-0.0E+0,-0.0E+0]
	xorpd	%xmm3, %xmm2
	maxsd	%xmm1, %xmm2
	movsd	40(%r14), %xmm0                 ## xmm0 = mem[0],zero
	xorpd	%xmm3, %xmm0
	mulsd	%xmm2, %xmm0
	callq	_exp
	xorpd	%xmm1, %xmm1
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	callq	_CLAMP
	movsd	-48(%rbp), %xmm5                ## 8-byte Reload
                                        ## xmm5 = mem[0],zero
	movsd	-56(%rbp), %xmm4                ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	movapd	-80(%rbp), %xmm3                ## 16-byte Reload
	movsd	(%r13,%rbx,8), %xmm1            ## xmm1 = mem[0],zero
	unpcklps	LCPI0_2(%rip), %xmm1            ## xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
	subpd	LCPI0_3(%rip), %xmm1
	movapd	%xmm1, %xmm2
	unpckhpd	%xmm1, %xmm2                    ## xmm2 = xmm2[1],xmm1[1]
	addsd	%xmm1, %xmm2
	movsd	LCPI0_4(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	mulsd	32(%r14), %xmm1
	addsd	%xmm2, %xmm1
	movsd	-64(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	cvttsd2si	%xmm1, %rax
	movq	%rax, %rcx
	sarq	$63, %rcx
	subsd	LCPI0_5(%rip), %xmm1
	cvttsd2si	%xmm1, %rdx
	andq	%rcx, %rdx
	orq	%rax, %rdx
	movq	%rdx, (%r13,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_5
	jmp	LBB0_12
LBB0_6:
	testq	%r12, %r12
	je	LBB0_12
## %bb.7:
	movsd	16(%r14), %xmm1                 ## xmm1 = mem[0],zero
	movss	24(%r14), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm1, -96(%rbp)                ## 8-byte Spill
	subsd	%xmm0, %xmm1
	movsd	LCPI0_4(%rip), %xmm0            ## xmm0 = mem[0],zero
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -104(%rbp)               ## 8-byte Spill
	xorpd	LCPI0_1(%rip), %xmm3
	xorl	%ebx, %ebx
	movapd	%xmm3, -80(%rbp)                ## 16-byte Spill
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sdl	(%r15,%rbx,4), %xmm0
	subsd	%xmm4, %xmm0
	mulsd	%xmm5, %xmm0
	addsd	%xmm2, %xmm0
	movapd	%xmm3, %xmm1
	divsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm2
	xorpd	LCPI0_1(%rip), %xmm2
	maxsd	%xmm1, %xmm2
	movsd	-96(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	subsd	%xmm2, %xmm0
	mulsd	-104(%rbp), %xmm0               ## 8-byte Folded Reload
	xorpd	%xmm1, %xmm1
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	callq	_CLAMP
	movsd	-48(%rbp), %xmm5                ## 8-byte Reload
                                        ## xmm5 = mem[0],zero
	movsd	-56(%rbp), %xmm4                ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	movapd	-80(%rbp), %xmm3                ## 16-byte Reload
	movsd	(%r13,%rbx,8), %xmm1            ## xmm1 = mem[0],zero
	unpcklps	LCPI0_2(%rip), %xmm1            ## xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
	subpd	LCPI0_3(%rip), %xmm1
	movapd	%xmm1, %xmm2
	unpckhpd	%xmm1, %xmm2                    ## xmm2 = xmm2[1],xmm1[1]
	addsd	%xmm1, %xmm2
	movsd	LCPI0_4(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	mulsd	32(%r14), %xmm1
	addsd	%xmm2, %xmm1
	movsd	-64(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	cvttsd2si	%xmm1, %rax
	movq	%rax, %rcx
	sarq	$63, %rcx
	subsd	LCPI0_5(%rip), %xmm1
	cvttsd2si	%xmm1, %rdx
	andq	%rcx, %rdx
	orq	%rax, %rdx
	movq	%rdx, (%r13,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_8
	jmp	LBB0_12
LBB0_9:
	testq	%r12, %r12
	je	LBB0_12
## %bb.10:
	movsd	40(%r14), %xmm0                 ## xmm0 = mem[0],zero
	movapd	LCPI0_1(%rip), %xmm1            ## xmm1 = [-0.0E+0,-0.0E+0]
	xorpd	%xmm0, %xmm1
	xorpd	LCPI0_1(%rip), %xmm3
	mulsd	%xmm0, %xmm1
	movapd	%xmm1, -96(%rbp)                ## 16-byte Spill
	xorl	%ebx, %ebx
	movapd	%xmm3, -80(%rbp)                ## 16-byte Spill
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sdl	(%r15,%rbx,4), %xmm0
	subsd	%xmm4, %xmm0
	mulsd	%xmm5, %xmm0
	addsd	%xmm2, %xmm0
	movapd	%xmm3, %xmm1
	divsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm2
	xorpd	LCPI0_1(%rip), %xmm2
	maxsd	%xmm1, %xmm2
	movapd	-96(%rbp), %xmm0                ## 16-byte Reload
	mulsd	%xmm2, %xmm0
	mulsd	%xmm2, %xmm0
	callq	_exp
	xorpd	%xmm1, %xmm1
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	callq	_CLAMP
	movsd	-48(%rbp), %xmm5                ## 8-byte Reload
                                        ## xmm5 = mem[0],zero
	movsd	-56(%rbp), %xmm4                ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	movapd	-80(%rbp), %xmm3                ## 16-byte Reload
	movsd	(%r13,%rbx,8), %xmm1            ## xmm1 = mem[0],zero
	unpcklps	LCPI0_2(%rip), %xmm1            ## xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
	subpd	LCPI0_3(%rip), %xmm1
	movapd	%xmm1, %xmm2
	unpckhpd	%xmm1, %xmm2                    ## xmm2 = xmm2[1],xmm1[1]
	addsd	%xmm1, %xmm2
	movsd	LCPI0_4(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	mulsd	32(%r14), %xmm1
	addsd	%xmm2, %xmm1
	movsd	-64(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	cvttsd2si	%xmm1, %rax
	movq	%rax, %rcx
	sarq	$63, %rcx
	subsd	LCPI0_5(%rip), %xmm1
	cvttsd2si	%xmm1, %rdx
	andq	%rcx, %rdx
	orq	%rax, %rdx
	movq	%rdx, (%r13,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_11
LBB0_12:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gl_problem                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad fog mode in gl_fog_index_pixels"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gl_fog_index_pixels            ; -- Begin function gl_fog_index_pixels
	.p2align	2
_gl_fog_index_pixels:                   ; @gl_fog_index_pixels
	.cfi_startproc
; %bb.0:
	stp	d15, d14, [sp, #-112]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	d13, d12, [sp, #16]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #32]             ; 16-byte Folded Spill
	stp	d9, d8, [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 b8, -56
	.cfi_offset b9, -64
	.cfi_offset b10, -72
	.cfi_offset b11, -80
	.cfi_offset b12, -88
	.cfi_offset b13, -96
	.cfi_offset b14, -104
	.cfi_offset b15, -112
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	d8, [x8, #80]
	ldr	d0, [x8, #112]
	ldr	d9, [x0, #48]
	ldr	s1, [x0, #56]
	fmov	s2, #1.00000000
	fdiv	s1, s2, s1
	fcvt	d10, s1
	ldr	w8, [x0, #8]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_13
; %bb.3:
	cbz	x22, LBB0_12
; %bb.4:
	fneg	d11, d0
	fmov	d12, #1.00000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21], #4
	scvtf	d0, w8
	fsub	d0, d0, d9
	fmul	d0, d0, d10
	fadd	d0, d8, d0
	fdiv	d0, d11, d0
	fneg	d1, d0
	fcmp	d0, #0.0
	fcsel	d0, d1, d0, mi
	ldr	d1, [x20, #40]
	fneg	d1, d1
	fmul	d0, d0, d1
	bl	_exp
	movi	d1, #0000000000000000
	fmov	s2, #1.00000000
	bl	_CLAMP
	ldr	d1, [x19]
	ucvtf	d1, d1
	fsub	d0, d12, d0
	ldr	d2, [x20, #32]
	fmadd	d0, d0, d2, d1
	fcvtzu	x8, d0
	str	x8, [x19], #8
	subs	x22, x22, #1
	b.ne	LBB0_5
	b	LBB0_12
LBB0_6:
	cbz	x22, LBB0_12
; %bb.7:
	ldr	d11, [x20, #16]
	ldr	s1, [x20, #24]
	fcvt	d1, s1
	fsub	d1, d11, d1
	fmov	d12, #1.00000000
	fdiv	d13, d12, d1
	fneg	d14, d0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21], #4
	scvtf	d0, w8
	fsub	d0, d0, d9
	fmul	d0, d0, d10
	fadd	d0, d8, d0
	fdiv	d0, d14, d0
	fneg	d1, d0
	fcmp	d0, #0.0
	fcsel	d0, d1, d0, mi
	fsub	d0, d11, d0
	fmul	d0, d13, d0
	movi	d1, #0000000000000000
	fmov	s2, #1.00000000
	bl	_CLAMP
	ldr	d1, [x19]
	ucvtf	d1, d1
	fsub	d0, d12, d0
	ldr	d2, [x20, #32]
	fmadd	d0, d0, d2, d1
	fcvtzu	x8, d0
	str	x8, [x19], #8
	subs	x22, x22, #1
	b.ne	LBB0_8
	b	LBB0_12
LBB0_9:
	cbz	x22, LBB0_12
; %bb.10:
	ldr	d1, [x20, #40]
	fneg	d2, d1
	fmul	d11, d1, d2
	fneg	d12, d0
	fmov	d13, #1.00000000
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21], #4
	scvtf	d0, w8
	fsub	d0, d0, d9
	fmul	d0, d0, d10
	fadd	d0, d8, d0
	fdiv	d0, d12, d0
	fneg	d1, d0
	fcmp	d0, #0.0
	fcsel	d0, d1, d0, mi
	fmul	d1, d11, d0
	fmul	d0, d0, d1
	bl	_exp
	movi	d1, #0000000000000000
	fmov	s2, #1.00000000
	bl	_CLAMP
	ldr	d1, [x19]
	ucvtf	d1, d1
	fsub	d0, d13, d0
	ldr	d2, [x20, #32]
	fmadd	d0, d0, d2, d1
	fcvtzu	x8, d0
	str	x8, [x19], #8
	subs	x22, x22, #1
	b.ne	LBB0_11
LBB0_12:
	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	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #32]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #16]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp], #112            ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	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	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #32]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #16]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp], #112            ; 16-byte Folded Reload
	b	_gl_problem
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad fog mode in gl_fog_index_pixels"

.subsections_via_symbols
