	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_ToneMap                     ## -- Begin function RB_ToneMap
	.p2align	4, 0x90
_RB_ToneMap:                            ## @RB_ToneMap
	.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
	testl	%r8d, %r8d
	je	LBB0_9
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	_RB_ToneMap.lastFrameCount(%rip), %ecx
	movq	_tr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.2:
	movl	%eax, %edx
	subl	%ecx, %edx
	jl	LBB0_4
## %bb.3:
	cmpl	$6, %edx
	jl	LBB0_8
LBB0_4:
	movl	%eax, _RB_ToneMap.lastFrameCount(%rip)
	movl	$256, %r14d                     ## imm = 0x100
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$256, %ecx                      ## imm = 0x100
	movl	$256, %r8d                      ## imm = 0x100
	callq	_VectorSet4
	movq	_tr@GOTPCREL(%rip), %rbx
	movq	32(%rbx), %rax
	movq	40(%rbx), %r9
	movq	(%rax), %rcx
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	pushq	$0
	pushq	$0
	callq	_FBO_Blit
	addq	$16, %rsp
	movq	32(%rbx), %rax
	movq	(%rax), %r13
	movq	8(%rax), %r15
	movl	$256, %ebx                      ## imm = 0x100
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %r12
	movq	_GL_COLOR_BUFFER_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_GL_LINEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r13, %rdi
	movq	%r15, %rdx
	callq	_FBO_FastBlit
	movq	%r13, %r15
	movq	%r12, %r13
	cmpl	$3, %r14d
	movl	%ebx, %r14d
	jbe	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movl	%r14d, %r8d
	callq	_VectorSet4
	shrl	%ebx
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movl	%ebx, %r8d
	callq	_VectorSet4
	cmpl	$1, %ebx
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_tr@GOTPCREL(%rip), %rax
	movq	24(%rax), %r15
	jmp	LBB0_7
LBB0_8:
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_VectorSet4
	ud2
LBB0_9:
	movq	_r_cameraExposure@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rsi
	movl	$2, %edi
	callq	_pow
	ud2
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_RB_ToneMap.lastFrameCount,4,2 ## @RB_ToneMap.lastFrameCount
	.comm	_tr,48,3                        ## @tr
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ## @GL_COLOR_BUFFER_BIT
	.comm	_GL_LINEAR,4,2                  ## @GL_LINEAR
	.comm	_glRefConfig,8,3                ## @glRefConfig
	.comm	_GLS_SRCBLEND_SRC_ALPHA,4,2     ## @GLS_SRCBLEND_SRC_ALPHA
	.comm	_GLS_DSTBLEND_ONE_MINUS_SRC_ALPHA,4,2 ## @GLS_DSTBLEND_ONE_MINUS_SRC_ALPHA
	.comm	_r_cameraExposure,8,3           ## @r_cameraExposure
	.comm	_TB_LEVELSMAP,4,2               ## @TB_LEVELSMAP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_ToneMap                     ; -- Begin function RB_ToneMap
	.p2align	2
_RB_ToneMap:                            ; @RB_ToneMap
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	w4, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	adrp	x8, _RB_ToneMap.lastFrameCount@PAGE
	ldr	w10, [x8, _RB_ToneMap.lastFrameCount@PAGEOFF]
Lloh0:
	adrp	x23, _tr@GOTPAGE
Lloh1:
	ldr	x23, [x23, _tr@GOTPAGEOFF]
	ldr	w9, [x23]
	cbz	w10, LBB0_3
; %bb.2:
	subs	w10, w9, w10
	ccmp	w10, #6, #0, ge
	b.lt	LBB0_5
LBB0_3:
	str	w9, [x8, _RB_ToneMap.lastFrameCount@PAGEOFF]
	mov	w19, #256
	mov	w1, #0
	mov	w2, #0
	mov	w3, #256
	mov	w4, #256
	bl	_VectorSet4
	ldp	x8, x5, [x23, #32]
	ldr	x3, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, #0
	mov	x6, #0
	mov	w7, #0
	bl	_FBO_Blit
	ldr	x8, [x23, #32]
	ldp	x20, x26, [x8]
Lloh2:
	adrp	x24, _GL_COLOR_BUFFER_BIT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _GL_COLOR_BUFFER_BIT@GOTPAGEOFF]
Lloh4:
	adrp	x25, _GL_LINEAR@GOTPAGE
Lloh5:
	ldr	x25, [x25, _GL_LINEAR@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w1, #0
	mov	w2, #0
	mov	x3, x19
	mov	x4, x19
	bl	_VectorSet4
	lsr	w21, w19, #1
	mov	w1, #0
	mov	w2, #0
	mov	x3, x21
	mov	x4, x21
	bl	_VectorSet4
	ldr	x8, [x23, #24]
	cmp	w21, #1
	csel	x22, x8, x26, eq
	ldr	w4, [x24]
	ldr	w5, [x25]
	mov	x0, x20
	mov	x2, x22
	bl	_FBO_FastBlit
	mov	x26, x20
	mov	x20, x22
	cmp	w19, #3
	mov	x19, x21
	b.hi	LBB0_4
LBB0_5:
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_VectorSet4
	brk	#0x1
LBB0_6:
Lloh6:
	adrp	x8, _r_cameraExposure@GOTPAGE
Lloh7:
	ldr	x8, [x8, _r_cameraExposure@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x1, [x8]
	mov	w0, #2
	bl	_pow
	brk	#0x1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_RB_ToneMap.lastFrameCount,4,2 ; @RB_ToneMap.lastFrameCount
	.comm	_tr,48,3                        ; @tr
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ; @GL_COLOR_BUFFER_BIT
	.comm	_GL_LINEAR,4,2                  ; @GL_LINEAR
	.comm	_glRefConfig,8,3                ; @glRefConfig
	.comm	_GLS_SRCBLEND_SRC_ALPHA,4,2     ; @GLS_SRCBLEND_SRC_ALPHA
	.comm	_GLS_DSTBLEND_ONE_MINUS_SRC_ALPHA,4,2 ; @GLS_DSTBLEND_ONE_MINUS_SRC_ALPHA
	.comm	_r_cameraExposure,8,3           ; @r_cameraExposure
	.comm	_TB_LEVELSMAP,4,2               ; @TB_LEVELSMAP
.subsections_via_symbols
