	.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_SetColorMappings
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x437f0000                      ## float 255
LCPI0_2:
	.long	0x3f000000                      ## float 0.5
LCPI0_3:
	.long	0x40400000                      ## float 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_4:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_5:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
LCPI0_6:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
LCPI0_7:
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_R_SetColorMappings
	.p2align	4, 0x90
_R_SetColorMappings:                    ## @R_SetColorMappings
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_glConfig@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	$0, 8(%rdx)
	movl	(%rdx), %eax
	movl	16(%rdx), %edx
	je	LBB0_2
## %bb.1:
	movq	_r_overBrightBits@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	testl	%edx, %edx
	cmovel	%edx, %ecx
	movq	_tr@GOTPCREL(%rip), %r14
	movl	%ecx, (%r14)
	cmpl	$17, %eax
	jl	LBB0_4
## %bb.3:
	movl	$2, %eax
	cmpl	$2, %ecx
	jle	LBB0_5
	jmp	LBB0_7
LBB0_4:
	movl	$1, %eax
	cmpl	$1, %ecx
	jg	LBB0_7
LBB0_5:
	testl	%ecx, %ecx
	jns	LBB0_8
## %bb.6:
	xorl	%eax, %eax
LBB0_7:
	movl	%eax, (%r14)
	movl	%eax, %ecx
LBB0_8:
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	cvtsi2ss	%eax, %xmm0
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	movss	%xmm1, 4(%r14)
	mulss	LCPI0_1(%rip), %xmm1
	cvttss2si	%xmm1, %eax
	movl	%eax, 8(%r14)
	movq	_r_intensity@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$1, (%rax)
	jg	LBB0_10
## %bb.9:
	movq	_ri@GOTPCREL(%rip), %rax
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	*(%rax)
LBB0_10:
	movq	_r_gamma@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	LCPI0_2(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jbe	LBB0_12
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_14
LBB0_12:
	ucomiss	LCPI0_3(%rip), %xmm0
	jbe	LBB0_15
## %bb.13:
	leaq	L_.str.4(%rip), %rsi
LBB0_14:
	movq	_ri@GOTPCREL(%rip), %rax
	leaq	L_.str.2(%rip), %rdi
	callq	*(%rax)
LBB0_15:
	movq	(%rbx), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movl	(%r14), %ebx
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	divss	%xmm0, %xmm2
	movss	%xmm2, -44(%rbp)                ## 4-byte Spill
	xorl	%r12d, %r12d
	movl	$255, %r13d
	movq	_s_gammatable@GOTPCREL(%rip), %r14
	xorl	%r15d, %r15d
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_16 Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r15d, %xmm0
	divss	LCPI0_1(%rip), %xmm0
	cvttss2si	%xmm0, %edi
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_pow
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movl	%eax, %ecx
	shll	$8, %ecx
	subl	%eax, %ecx
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ecx, %xmm0
	addss	LCPI0_2(%rip), %xmm0
	cvttss2si	%xmm0, %eax
	movss	-48(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
LBB0_27:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	%ebx, %ecx
	shll	%cl, %eax
	testl	%eax, %eax
	cmovlel	%r12d, %eax
	cmpl	$255, %eax
	cmovael	%r13d, %eax
	movq	(%r14), %rdi
	movl	%eax, (%rdi,%r15,4)
	incq	%r15
	cmpq	$256, %r15                      ## imm = 0x100
	je	LBB0_18
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	ucomiss	%xmm1, %xmm0
	jne	LBB0_26
	jp	LBB0_26
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%r15d, %eax
	jmp	LBB0_27
LBB0_18:
	movq	_r_intensity@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_s_intensitytable@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	4(%rcx), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_22
## %bb.19:
	leaq	1024(%rax), %rdx
	cmpq	%rdx, %rcx
	jae	LBB0_22
## %bb.20:
	xorl	%edx, %edx
	movl	$255, %esi
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %ebx
	imull	%edx, %ebx
	cmpl	$255, %ebx
	cmovgel	%esi, %ebx
	movl	%ebx, (%rax,%rdx,4)
	leal	1(%rdx), %ebx
	imull	(%rcx), %ebx
	cmpl	$255, %ebx
	cmovgel	%esi, %ebx
	movl	%ebx, 4(%rax,%rdx,4)
	addq	$2, %rdx
	cmpq	$256, %rdx                      ## imm = 0x100
	jne	LBB0_21
	jmp	LBB0_24
LBB0_22:
	movd	(%rcx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqa	LCPI0_4(%rip), %xmm1            ## xmm1 = [0,1,2,3]
	xorl	%ecx, %ecx
	movdqa	LCPI0_5(%rip), %xmm2            ## xmm2 = [4,4,4,4]
	movdqa	LCPI0_6(%rip), %xmm3            ## xmm3 = [255,255,255,255]
	movdqa	LCPI0_7(%rip), %xmm4            ## xmm4 = [8,8,8,8]
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm1, %xmm5
	paddd	%xmm2, %xmm5
	movdqa	%xmm0, %xmm6
	pmulld	%xmm1, %xmm6
	pmulld	%xmm0, %xmm5
	pminsd	%xmm3, %xmm6
	pminsd	%xmm3, %xmm5
	movdqu	%xmm6, (%rax,%rcx,4)
	movdqu	%xmm5, 16(%rax,%rcx,4)
	addq	$8, %rcx
	paddd	%xmm4, %xmm1
	cmpq	$256, %rcx                      ## imm = 0x100
	jne	LBB0_23
LBB0_24:
	movq	_glConfig@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_28
## %bb.25:
	movq	%rdi, %rsi
	movq	%rdi, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_GLimp_SetGamma                 ## TAILCALL
LBB0_28:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_r_overBrightBits,8,3           ## @r_overBrightBits
	.comm	_tr,12,2                        ## @tr
	.comm	_glConfig,24,3                  ## @glConfig
	.comm	_r_intensity,8,3                ## @r_intensity
	.comm	_ri,8,3                         ## @ri
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r_intensity"

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

	.comm	_r_gamma,8,3                    ## @r_gamma
L_.str.2:                               ## @.str.2
	.asciz	"r_gamma"

L_.str.3:                               ## @.str.3
	.asciz	"0.5"

L_.str.4:                               ## @.str.4
	.asciz	"3.0"

	.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
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function R_SetColorMappings
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_R_SetColorMappings
	.p2align	2
_R_SetColorMappings:                    ; @R_SetColorMappings
	.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
Lloh0:
	adrp	x8, _r_overBrightBits@GOTPAGE
Lloh1:
	ldr	x8, [x8, _r_overBrightBits@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh3:
	adrp	x19, _glConfig@GOTPAGE
Lloh4:
	ldr	x19, [x19, _glConfig@GOTPAGEOFF]
	ldr	x9, [x19, #8]
	cmp	x9, #0
	ldr	w9, [x19, #16]
	ccmp	w9, #0, #4, ne
	csel	w8, wzr, w8, eq
Lloh5:
	adrp	x21, _tr@GOTPAGE
Lloh6:
	ldr	x21, [x21, _tr@GOTPAGEOFF]
	str	w8, [x21]
	ldr	w9, [x19]
	cmp	w9, #17
	b.lt	LBB0_3
; %bb.1:
	cmp	w8, #2
	b.le	LBB0_5
; %bb.2:
	mov	w8, #2
	b	LBB0_7
LBB0_3:
	cmp	w8, #1
	b.le	LBB0_5
; %bb.4:
	mov	w8, #1
	b	LBB0_7
LBB0_5:
	tbz	w8, #31, LBB0_8
; %bb.6:
	mov	w8, #0
LBB0_7:
	str	w8, [x21]
LBB0_8:
	mov	w9, #1
	lsl	w8, w9, w8
	scvtf	s0, w8
	fmov	s1, #1.00000000
	fdiv	s0, s1, s0
	str	s0, [x21, #4]
	mov	w8, #1132396544
	fmov	s1, w8
	fmul	s0, s0, s1
	fcvtzs	w8, s0
Lloh7:
	adrp	x20, _r_intensity@GOTPAGE
Lloh8:
	ldr	x20, [x20, _r_intensity@GOTPAGEOFF]
	str	w8, [x21, #8]
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh9:
	adrp	x22, _ri@GOTPAGE
Lloh10:
	ldr	x22, [x22, _ri@GOTPAGEOFF]
	cmp	w8, #1
	b.gt	LBB0_10
; %bb.9:
	ldr	x8, [x22]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	blr	x8
LBB0_10:
Lloh15:
	adrp	x23, _r_gamma@GOTPAGE
Lloh16:
	ldr	x23, [x23, _r_gamma@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	s0, [x8]
	fmov	s1, #0.50000000
	fcmp	s0, s1
	b.pl	LBB0_12
; %bb.11:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_12:
	fmov	s1, #3.00000000
	fcmp	s0, s1
	b.le	LBB0_15
; %bb.13:
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_14:
	ldr	x8, [x22]
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	blr	x8
LBB0_15:
	mov	x22, #0
	ldr	x8, [x23]
	ldr	s9, [x8]
	ldr	w21, [x21]
	fmov	s10, #1.00000000
	fdiv	s8, s10, s9
	mov	w23, #255
Lloh23:
	adrp	x24, _s_gammatable@GOTPAGE
Lloh24:
	ldr	x24, [x24, _s_gammatable@GOTPAGEOFF]
	mov	w25, #1132396544
	fmov	s11, #0.50000000
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=1
	scvtf	s0, w22
	fmov	s1, w25
	fdiv	s0, s0, s1
	fcvtzs	w0, s0
	fmov	s0, s8
	bl	_pow
	lsl	w8, w0, #8
	sub	w8, w8, w0
	scvtf	s0, w8
	fadd	s0, s0, s11
	fcvtzs	w8, s0
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	lsl	w8, w8, w21
	cmp	w8, #0
	csel	w8, w8, wzr, gt
	cmp	w8, #255
	csel	w8, w8, w23, lo
	ldr	x0, [x24]
	str	w8, [x0, x22, lsl #2]
	add	x22, x22, #1
	cmp	x22, #256
	b.eq	LBB0_20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	fcmp	s9, s10
	b.ne	LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x8, x22
	b	LBB0_17
LBB0_20:
Lloh25:
	adrp	x8, _s_intensitytable@GOTPAGE
Lloh26:
	ldr	x8, [x8, _s_intensitytable@GOTPAGEOFF]
	ldr	x10, [x20]
Lloh27:
	ldr	x8, [x8]
	add	x9, x8, #1024
	add	x11, x10, #4
	cmp	x8, x11
	ccmp	x10, x9, #2, lo
	b.lo	LBB0_23
; %bb.21:
	mov	x9, #0
	ld1r.4s	{ v0 }, [x10]
Lloh28:
	adrp	x10, lCPI0_0@PAGE
Lloh29:
	ldr	q1, [x10, lCPI0_0@PAGEOFF]
	movi.4s	v2, #4
	movi.4s	v3, #8
	movi.4s	v4, #12
	movi.2d	v5, #0x0000ff000000ff
	movi.4s	v6, #16
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	add.4s	v7, v1, v2
	add.4s	v16, v1, v3
	add.4s	v17, v1, v4
	mul.4s	v18, v0, v1
	mul.4s	v7, v0, v7
	mul.4s	v16, v0, v16
	mul.4s	v17, v0, v17
	smin.4s	v18, v18, v5
	smin.4s	v7, v7, v5
	smin.4s	v16, v16, v5
	smin.4s	v17, v17, v5
	add	x10, x8, x9
	stp	q18, q7, [x10]
	stp	q16, q17, [x10, #32]
	add.4s	v1, v1, v6
	add	x9, x9, #64
	cmp	x9, #1024
	b.ne	LBB0_22
	b	LBB0_25
LBB0_23:
	mov	x9, #0
	mov	w11, #255
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10]
	mul	w12, w12, w9
	cmp	w12, #255
	csel	w12, w12, w11, lt
	str	w12, [x8, x9, lsl #2]
	add	x9, x9, #1
	cmp	x9, #256
	b.ne	LBB0_24
LBB0_25:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_27
; %bb.26:
	mov	x1, x0
	mov	x2, x0
	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	_GLimp_SetGamma
LBB0_27:
	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
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdr	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_r_overBrightBits,8,3           ; @r_overBrightBits
	.comm	_tr,12,2                        ; @tr
	.comm	_glConfig,24,3                  ; @glConfig
	.comm	_r_intensity,8,3                ; @r_intensity
	.comm	_ri,8,3                         ; @ri
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r_intensity"

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

	.comm	_r_gamma,8,3                    ; @r_gamma
l_.str.2:                               ; @.str.2
	.asciz	"r_gamma"

l_.str.3:                               ; @.str.3
	.asciz	"0.5"

l_.str.4:                               ; @.str.4
	.asciz	"3.0"

	.comm	_s_gammatable,8,3               ; @s_gammatable
	.comm	_s_intensitytable,8,3           ; @s_intensitytable
.subsections_via_symbols
