	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_LightScaleTexture            ## -- Begin function R_LightScaleTexture
	.p2align	4, 0x90
_R_LightScaleTexture:                   ## @R_LightScaleTexture
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.1:
	movq	_glConfig@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
LBB0_20:
	popq	%rbp
	retq
LBB0_8:
	imull	%esi, %edx
	movq	_glConfig@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.9:
	testl	%edx, %edx
	jle	LBB0_20
## %bb.10:
	movq	_s_intensitytable@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$1, %edx
	je	LBB0_6
## %bb.11:
	movl	%edx, %ecx
	andl	$-2, %ecx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rsi
	movq	8(%rdi), %r8
	movq	(%rax,%rsi,8), %rsi
	movq	%rsi, (%rdi)
	movq	(%rax,%r8,8), %rsi
	movq	%rsi, 8(%rdi)
	movq	16(%rdi), %rsi
	movq	(%rax,%rsi,8), %rsi
	movq	%rsi, 16(%rdi)
	movq	32(%rdi), %rsi
	movq	(%rax,%rsi,8), %rsi
	movq	%rsi, 32(%rdi)
	movq	40(%rdi), %rsi
	movq	(%rax,%rsi,8), %rsi
	movq	%rsi, 40(%rdi)
	movq	48(%rdi), %rsi
	movq	(%rax,%rsi,8), %rsi
	movq	%rsi, 48(%rdi)
	addq	$64, %rdi
	addl	$-2, %ecx
	jne	LBB0_12
	jmp	LBB0_6
LBB0_2:
	imull	%esi, %edx
	testl	%edx, %edx
	jle	LBB0_20
## %bb.3:
	movq	_s_gammatable@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$1, %edx
	je	LBB0_6
## %bb.4:
	movl	%edx, %ecx
	andl	$-2, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rsi
	movq	8(%rdi), %r8
	movq	(%rax,%rsi,8), %rsi
	movq	%rsi, (%rdi)
	movq	(%rax,%r8,8), %rsi
	movq	%rsi, 8(%rdi)
	movq	16(%rdi), %rsi
	movq	(%rax,%rsi,8), %rsi
	movq	%rsi, 16(%rdi)
	movq	32(%rdi), %rsi
	movq	(%rax,%rsi,8), %rsi
	movq	%rsi, 32(%rdi)
	movq	40(%rdi), %rsi
	movq	(%rax,%rsi,8), %rsi
	movq	%rsi, 40(%rdi)
	movq	48(%rdi), %rsi
	movq	(%rax,%rsi,8), %rsi
	movq	%rsi, 48(%rdi)
	addq	$64, %rdi
	addl	$-2, %ecx
	jne	LBB0_5
LBB0_6:
	testb	$1, %dl
	je	LBB0_20
## %bb.7:
	movq	(%rdi), %rcx
	movq	8(%rdi), %rdx
	movq	(%rax,%rcx,8), %rcx
	movq	%rcx, (%rdi)
	movq	(%rax,%rdx,8), %rcx
	movq	%rcx, 8(%rdi)
	movq	16(%rdi), %rcx
	movq	(%rax,%rcx,8), %rax
	jmp	LBB0_19
LBB0_13:
	testl	%edx, %edx
	jle	LBB0_20
## %bb.14:
	movq	_s_gammatable@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_s_intensitytable@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	cmpl	$1, %edx
	je	LBB0_17
## %bb.15:
	movl	%edx, %esi
	andl	$-2, %esi
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%r9,%rax,8), %rax
	movq	(%r8,%rax,8), %rax
	movq	%rax, (%rdi)
	movq	(%r9,%rcx,8), %rax
	movq	(%r8,%rax,8), %rax
	movq	%rax, 8(%rdi)
	movq	16(%rdi), %rax
	movq	(%r9,%rax,8), %rax
	movq	(%r8,%rax,8), %rax
	movq	%rax, 16(%rdi)
	movq	32(%rdi), %rax
	movq	(%r9,%rax,8), %rax
	movq	(%r8,%rax,8), %rax
	movq	%rax, 32(%rdi)
	movq	40(%rdi), %rax
	movq	(%r9,%rax,8), %rax
	movq	(%r8,%rax,8), %rax
	movq	%rax, 40(%rdi)
	movq	48(%rdi), %rax
	movq	(%r9,%rax,8), %rax
	movq	(%r8,%rax,8), %rax
	movq	%rax, 48(%rdi)
	addq	$64, %rdi
	addl	$-2, %esi
	jne	LBB0_16
LBB0_17:
	testb	$1, %dl
	je	LBB0_20
## %bb.18:
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%r9,%rax,8), %rax
	movq	(%r8,%rax,8), %rax
	movq	%rax, (%rdi)
	movq	(%r9,%rcx,8), %rax
	movq	(%r8,%rax,8), %rax
	movq	%rax, 8(%rdi)
	movq	16(%rdi), %rax
	movq	(%r9,%rax,8), %rax
	movq	(%r8,%rax,8), %rax
LBB0_19:
	movq	%rax, 16(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_glConfig,8,3                   ## @glConfig
	.comm	_s_gammatable,8,3               ## @s_gammatable
	.comm	_s_intensitytable,8,3           ## @s_intensitytable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_LightScaleTexture            ; -- Begin function R_LightScaleTexture
	.p2align	2
_R_LightScaleTexture:                   ; @R_LightScaleTexture
	.cfi_startproc
; %bb.0:
	cbz	x3, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _glConfig@GOTPAGE
Lloh1:
	ldr	x8, [x8, _glConfig@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #0
	mul	w8, w2, w1
	ccmp	w8, #1, #8, eq
	b.lt	LBB0_11
; %bb.2:
Lloh3:
	adrp	x9, _s_gammatable@GOTPAGE
Lloh4:
	ldr	x9, [x9, _s_gammatable@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x10, x11, [x0]
	ldr	x10, [x9, x10, lsl #3]
	str	x10, [x0]
	ldr	x10, [x9, x11, lsl #3]
	str	x10, [x0, #8]
	ldr	x10, [x0, #16]
	ldr	x10, [x9, x10, lsl #3]
	str	x10, [x0, #16]
	add	x0, x0, #32
	subs	w8, w8, #1
	b.ne	LBB0_3
	b	LBB0_11
LBB0_4:
	mul	w8, w2, w1
Lloh6:
	adrp	x9, _glConfig@GOTPAGE
Lloh7:
	ldr	x9, [x9, _glConfig@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cbz	x9, LBB0_8
; %bb.5:
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
Lloh9:
	adrp	x9, _s_intensitytable@GOTPAGE
Lloh10:
	ldr	x9, [x9, _s_intensitytable@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x10, x11, [x0]
	ldr	x10, [x9, x10, lsl #3]
	str	x10, [x0]
	ldr	x10, [x9, x11, lsl #3]
	str	x10, [x0, #8]
	ldr	x10, [x0, #16]
	ldr	x10, [x9, x10, lsl #3]
	str	x10, [x0, #16]
	add	x0, x0, #32
	subs	w8, w8, #1
	b.ne	LBB0_7
	b	LBB0_11
LBB0_8:
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
Lloh12:
	adrp	x9, _s_gammatable@GOTPAGE
Lloh13:
	ldr	x9, [x9, _s_gammatable@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _s_intensitytable@GOTPAGE
Lloh16:
	ldr	x10, [x10, _s_intensitytable@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldp	x11, x12, [x0]
	ldr	x11, [x10, x11, lsl #3]
	ldr	x11, [x9, x11, lsl #3]
	str	x11, [x0]
	ldr	x11, [x10, x12, lsl #3]
	ldr	x11, [x9, x11, lsl #3]
	str	x11, [x0, #8]
	ldr	x11, [x0, #16]
	ldr	x11, [x10, x11, lsl #3]
	ldr	x11, [x9, x11, lsl #3]
	str	x11, [x0, #16]
	add	x0, x0, #32
	subs	w8, w8, #1
	b.ne	LBB0_10
LBB0_11:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_glConfig,8,3                   ; @glConfig
	.comm	_s_gammatable,8,3               ; @s_gammatable
	.comm	_s_intensitytable,8,3           ; @s_intensitytable
.subsections_via_symbols
