	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function R_CreateFogImage
LCPI0_0:
	.long	0x3f000000                      ## float 0.5
LCPI0_1:
	.long	0x437f0000                      ## float 255
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_2:
	.long	0x3f800000                      ## float 1
	.long	0x3f800000                      ## float 1
	.long	0x3f800000                      ## float 1
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_R_CreateFogImage:                      ## @R_CreateFogImage
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ri@GOTPCREL(%rip), %rax
	movq	_FOG_S@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_FOG_T@GOTPCREL(%rip), %r12
	imull	(%r12), %edi
	shll	$2, %edi
	callq	*(%rax)
	movq	%rax, %r13
	movl	(%r15), %edx
	movl	(%r12), %ecx
	testl	%edx, %edx
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	%edx, %ebx
	jge	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebx, %xmm0
	addss	%xmm2, %xmm0
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%edx, %xmm0
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	cvttss2si	%xmm1, %edi
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r14d, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2ss	%ecx, %xmm1
	addss	%xmm2, %xmm0
	divss	%xmm1, %xmm0
	cvttss2si	%xmm0, %esi
	callq	_R_FogFactor
	movss	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	movl	(%r15), %eax
	imull	%r14d, %eax
	addl	%ebx, %eax
	leal	2(,%rax,4), %eax
	cltq
	movl	$255, (%r13,%rax,4)
	movl	(%r15), %eax
	imull	%r14d, %eax
	addl	%ebx, %eax
	leal	1(,%rax,4), %eax
	cltq
	movl	$255, (%r13,%rax,4)
	movl	(%r15), %eax
	imull	%r14d, %eax
	addl	%ebx, %eax
	shll	$2, %eax
	cltq
	movl	$255, (%r13,%rax,4)
	mulss	%xmm1, %xmm0
	cvttss2si	%xmm0, %eax
	movl	(%r15), %ecx
	imull	%r14d, %ecx
	addl	%ebx, %ecx
	leal	3(,%rcx,4), %ecx
	movslq	%ecx, %rcx
	movl	%eax, (%r13,%rcx,4)
	incl	%r14d
	movl	(%r12), %ecx
	movl	(%r15), %edx
	cmpl	%ecx, %r14d
	jl	LBB0_4
	jmp	LBB0_5
LBB0_6:
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_GL_CLAMP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movl	%r8d, %r9d
	callq	_R_CreateImage
	movq	_tr@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%r13, %rdi
	movq	_ri@GOTPCREL(%rip), %rax
	callq	*8(%rax)
	movaps	LCPI0_2(%rip), %xmm0            ## xmm0 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0]
	movaps	%xmm0, -64(%rbp)
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GL_TEXTURE_BORDER_COLOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	_qglTexParameterfv
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ri,16,3                        ## @ri
	.comm	_FOG_S,4,2                      ## @FOG_S
	.comm	_FOG_T,4,2                      ## @FOG_T
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"*fog"

	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_GL_CLAMP,4,2                   ## @GL_CLAMP
	.comm	_tr,4,2                         ## @tr
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_GL_TEXTURE_BORDER_COLOR,4,2    ## @GL_TEXTURE_BORDER_COLOR
	.no_dead_strip	_R_CreateFogImage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function R_CreateFogImage
_R_CreateFogImage:                      ; @R_CreateFogImage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.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
Lloh0:
	adrp	x20, _ri@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ri@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x21, _FOG_S@GOTPAGE
Lloh3:
	ldr	x21, [x21, _FOG_S@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh4:
	adrp	x22, _FOG_T@GOTPAGE
Lloh5:
	ldr	x22, [x22, _FOG_T@GOTPAGEOFF]
	ldr	w10, [x22]
	mul	w9, w9, w10
	lsl	w0, w9, #2
	blr	x8
	mov	x19, x0
	ldr	w2, [x21]
	ldr	w3, [x22]
	cmp	w2, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w23, #0
	fmov	s8, #0.50000000
	mov	w24, #255
	mov	w25, #1132396544
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	cmp	w23, w2
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w3, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w26, #0
	scvtf	s0, w23
	fadd	s9, s0, s8
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	scvtf	s0, w2
	fdiv	s0, s9, s0
	fcvtzs	w0, s0
	scvtf	s0, w26
	fadd	s0, s0, s8
	scvtf	s1, w3
	fdiv	s0, s0, s1
	fcvtzs	w1, s0
	bl	_R_FogFactor
	ldr	w8, [x21]
	madd	w8, w8, w26, w23
	mov	w9, #2
	bfi	w9, w8, #2, #30
	str	w24, [x19, w9, sxtw #2]
	ldr	w8, [x21]
	madd	w8, w8, w26, w23
	mov	w9, #1
	bfi	w9, w8, #2, #30
	str	w24, [x19, w9, sxtw #2]
	ldr	w8, [x21]
	madd	w8, w8, w26, w23
	lsl	w8, w8, #2
	str	w24, [x19, w8, sxtw #2]
	fmov	s1, w25
	fmul	s0, s0, s1
	fcvtzs	w8, s0
	ldr	w9, [x21]
	madd	w9, w9, w26, w23
	mov	w10, #3
	bfi	w10, w9, #2, #30
	str	w8, [x19, w10, sxtw #2]
	add	w26, w26, #1
	ldr	w3, [x22]
	ldr	w2, [x21]
	cmp	w26, w3
	b.lt	LBB0_5
	b	LBB0_2
LBB0_6:
Lloh6:
	adrp	x8, _qfalse@GOTPAGE
Lloh7:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
Lloh9:
	adrp	x8, _GL_CLAMP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GL_CLAMP@GOTPAGEOFF]
Lloh11:
	ldr	w6, [x8]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x5, x4
	bl	_R_CreateImage
Lloh14:
	adrp	x8, _tr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _tr@GOTPAGEOFF]
Lloh16:
	str	w0, [x8]
	ldr	x8, [x20, #8]
	mov	x0, x19
	blr	x8
	fmov.4s	v0, #1.00000000
	str	q0, [sp]
Lloh17:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x8, _GL_TEXTURE_BORDER_COLOR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GL_TEXTURE_BORDER_COLOR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_qglTexParameterfv
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ri,16,3                        ; @ri
	.comm	_FOG_S,4,2                      ; @FOG_S
	.comm	_FOG_T,4,2                      ; @FOG_T
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"*fog"

	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_GL_CLAMP,4,2                   ; @GL_CLAMP
	.comm	_tr,4,2                         ; @tr
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_GL_TEXTURE_BORDER_COLOR,4,2    ; @GL_TEXTURE_BORDER_COLOR
	.no_dead_strip	_R_CreateFogImage
.subsections_via_symbols
