	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function tonemap
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x3d4ccccd                      ## float 0.0500000007
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_2:
	.quad	0x3fa99999a0000000              ## double 0.05000000074505806
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_tonemap:                               ## @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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	(%rdx), %r12
	movq	8(%rdx), %rdx
	movq	(%rcx), %rcx
	movslq	(%rcx), %r13
	movslq	%r8d, %rbx
	imulq	%rbx, %r13
	movq	(%rdx), %r8
	addq	%r13, %r8
	movslq	(%r12), %r10
	movslq	%r9d, %rax
	imulq	%rax, %r10
	movslq	4(%rcx), %r14
	imulq	%rbx, %r14
	movq	8(%rdx), %r9
	addq	%r14, %r9
	movslq	4(%r12), %rsi
	imulq	%rax, %rsi
	movslq	8(%rcx), %r15
	imulq	%rbx, %r15
	movq	16(%rdx), %rdi
	addq	%r15, %rdi
	movslq	8(%r12), %r11
	imulq	%rax, %r11
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rcx
	movq	8(%rdx), %rdx
	addq	(%rdx), %r13
	addq	8(%rdx), %r14
	addq	16(%rdx), %r15
	movslq	(%rcx), %rdx
	imulq	%rax, %rdx
	movslq	4(%rcx), %r12
	imulq	%rax, %r12
	movslq	8(%rcx), %rbx
	imulq	%rax, %rbx
	movq	%r10, -96(%rbp)                 ## 8-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movss	(%r10,%r8), %xmm0               ## xmm0 = mem[0],zero,zero,zero
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movss	%xmm0, (%rdx,%r13)
	movq	%r9, %r8
	movss	(%rsi,%r9), %xmm0               ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r12,%r14)
	movq	%r11, -88(%rbp)                 ## 8-byte Spill
	movss	(%r11,%rdi), %xmm1              ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, (%rbx,%r15)
	movq	(%rax), %r9
	testq	%r9, %r9
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	movq	16(%rax), %rcx
	movss	4(%rcx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	movq	%rdi, -128(%rbp)                ## 8-byte Spill
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	mulss	(%rdx,%rdi), %xmm0
	movss	(%rcx), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	mulss	(%rdx,%rdi), %xmm1
	addss	%xmm0, %xmm1
	movss	8(%rcx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	movq	%r8, -120(%rbp)                 ## 8-byte Spill
	mulss	(%rsi,%r8), %xmm0
	addss	%xmm1, %xmm0
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	xorps	%xmm1, %xmm1
	cvtsi2ss	%r9, %xmm1
	subss	%xmm1, %xmm0
	xorl	%edi, %edi
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	callq	_FFMAX
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	xorl	%edi, %edi
	callq	_FFMAX
	movss	-48(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm2
	movss	%xmm2, -48(%rbp)                ## 4-byte Spill
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movss	(%rax,%rcx), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	callq	_MIX
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movss	%xmm0, (%rax,%r13)
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movss	(%rcx,%rax), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movss	-48(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	callq	_MIX
	movss	%xmm0, (%rbx,%r15)
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movss	(%rcx,%rax), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movss	-48(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	callq	_MIX
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movaps	%xmm0, %xmm2
	movss	%xmm0, (%r12,%r14)
	movss	(%rbx,%r15), %xmm1              ## xmm1 = mem[0],zero,zero,zero
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_3
LBB0_1:
	movss	(%r12,%r14), %xmm2              ## xmm2 = mem[0],zero,zero,zero
	movq	%rax, %rbx
LBB0_3:
	movss	(%rdx,%r13), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	callq	_FFMAX3
	xorl	%edi, %edi
	callq	_FFMAX
	movaps	%xmm0, %xmm3
	movaps	%xmm0, %xmm2
	movl	8(%rbx), %eax
	addl	$-128, %eax
	cmpl	$6, %eax
	ja	LBB0_4
## %bb.5:
	movq	%rbx, %rdx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jmpq	*%rax
LBB0_12:
	movss	12(%rdx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movaps	%xmm3, %xmm1
	addss	%xmm0, %xmm1
	movaps	%xmm3, %xmm2
	divss	%xmm1, %xmm2
	xorps	%xmm1, %xmm1
	cvtss2sd	%xmm2, %xmm1
	cvtss2sd	%xmm0, %xmm0
	movsd	-56(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	addsd	%xmm2, %xmm0
	mulsd	%xmm1, %xmm0
	divsd	%xmm2, %xmm0
	xorps	%xmm2, %xmm2
	cvtsd2ss	%xmm0, %xmm2
	jmp	LBB0_15
LBB0_13:
	movss	12(%rdx), %xmm1                 ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm2, %xmm0
	movsd	-56(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	movss	%xmm3, -44(%rbp)                ## 4-byte Spill
	callq	_mobius
	jmp	LBB0_14
LBB0_6:
	movss	12(%rdx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm0
	cvtss2sd	%xmm0, %xmm0
	divsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	xorps	%xmm2, %xmm2
	cvtsd2ss	%xmm0, %xmm2
	jmp	LBB0_15
LBB0_11:
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm3, %xmm0
	movss	%xmm3, -44(%rbp)                ## 4-byte Spill
	callq	_hable
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_hable
	movss	-48(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	movss	-44(%rbp), %xmm3                ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm2
	jmp	LBB0_15
LBB0_7:
	ucomiss	LCPI0_1(%rip), %xmm3
	movss	%xmm3, -44(%rbp)                ## 4-byte Spill
	jbe	LBB0_9
## %bb.8:
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm3, %xmm0
	divsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	divss	12(%rdx), %xmm1
	callq	_pow
	jmp	LBB0_14
LBB0_10:
	movss	12(%rdx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm0
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	xorl	%edi, %edi
	movss	%xmm3, -44(%rbp)                ## 4-byte Spill
	callq	_av_clipf
LBB0_14:
	movss	-44(%rbp), %xmm3                ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm2
LBB0_15:
	divss	%xmm3, %xmm2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movss	(%rax,%r13), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm0
	movss	%xmm0, (%rax,%r13)
	movss	(%rbx,%r15), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm0
	movss	%xmm0, (%rbx,%r15)
	mulss	(%r12,%r14), %xmm2
	movss	%xmm2, (%r12,%r14)
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_9:
	movsd	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero
	divsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	divss	12(%rdx), %xmm1
	callq	_pow
	movss	-44(%rbp), %xmm3                ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm2
	mulss	%xmm3, %xmm2
	divss	LCPI0_1(%rip), %xmm2
	jmp	LBB0_15
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_15
	.long	L0_0_set_13
	.long	L0_0_set_6
	.long	L0_0_set_11
	.long	L0_0_set_7
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.no_dead_strip	_tonemap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tonemap
_tonemap:                               ; @tonemap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	d11, d10, [sp, #32]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #48]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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 w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
                                        ; kill: def $w5 killed $w5 def $x5
                                        ; kill: def $w4 killed $w4 def $x4
	fmov	d8, d0
	mov	x26, x0
	ldr	x8, [x3]
	sxtw	x9, w4
	ldpsw	x10, x11, [x8]
	mul	x10, x10, x9
	ldp	x13, x12, [x2]
	ldp	x14, x15, [x12]
	add	x22, x14, x10
	sxtw	x14, w5
	ldpsw	x16, x17, [x13]
	mul	x27, x16, x14
	mul	x11, x11, x9
	add	x16, x15, x11
	mul	x17, x17, x14
	ldr	x12, [x12, #16]
	ldrsw	x8, [x8, #8]
	mul	x8, x8, x9
	add	x2, x12, x8
	ldrsw	x9, [x13, #8]
	mul	x25, x9, x14
	ldp	x12, x9, [x1]
	ldp	x13, x15, [x9]
	add	x28, x13, x10
	add	x20, x15, x11
	ldpsw	x10, x11, [x12]
	mul	x23, x10, x14
	mul	x21, x11, x14
	ldr	x9, [x9, #16]
	add	x19, x9, x8
	ldrsw	x8, [x12, #8]
	mul	x24, x8, x14
	ldr	s0, [x22, x27]
	str	s0, [x28, x23]
	ldr	s0, [x16, x17]
	str	s0, [x20, x21]
	ldr	s1, [x2, x25]
	str	s1, [x19, x24]
	ldr	x8, [x0]
	cmp	x8, #0
	b.le	LBB0_2
; %bb.1:
	ldr	x9, [x26, #16]
	ldr	s0, [x27, x22]
	ldp	s1, s2, [x9]
	ldr	s3, [x25, x2]
	fmul	s2, s2, s3
	fmadd	s0, s1, s0, s2
	ldr	s1, [x9, #8]
	ldr	s2, [x17, x16]
	fmadd	s9, s1, s2, s0
	scvtf	s0, x8
	fsub	s0, s9, s0
	mov	w0, #0
	stp	x17, x16, [sp, #16]             ; 16-byte Folded Spill
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	bl	_FFMAX
	fmov	s10, s0
	fmov	s0, s9
	mov	w0, #0
	bl	_FFMAX
	ldr	s1, [x27, x22]
	fdiv	s10, s10, s0
	fmov	s0, s1
	fmov	s1, s9
	fmov	s2, s10
	bl	_MIX
	str	s0, [x23, x28]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	s0, [x25, x8]
	fmov	s1, s9
	fmov	s2, s10
	bl	_MIX
	str	s0, [x24, x19]
	ldp	x9, x8, [sp, #16]               ; 16-byte Folded Reload
	ldr	s0, [x9, x8]
	fmov	s1, s9
	fmov	s2, s10
	bl	_MIX
	fmov	s2, s0
	str	s0, [x21, x20]
	ldr	s1, [x24, x19]
	b	LBB0_3
LBB0_2:
	ldr	s2, [x21, x20]
LBB0_3:
	ldr	s0, [x23, x28]
	bl	_FFMAX3
	mov	w0, #0
	bl	_FFMAX
	fmov	s9, s0
	ldr	w8, [x26, #8]
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_14
; %bb.4:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	ldr	s0, [x26, #12]
	fadd	s1, s9, s0
	fdiv	s1, s9, s1
	fcvt	d1, s1
	fcvt	d0, s0
	fadd	d0, d0, d8
	fmul	d0, d0, d1
	b	LBB0_8
LBB0_6:
	ldr	s1, [x26, #12]
	fmov	d2, d8
	bl	_mobius
	b	LBB0_14
LBB0_7:
	ldr	s0, [x26, #12]
	fmul	s0, s9, s0
	fcvt	d0, s0
LBB0_8:
	fdiv	d0, d0, d8
	fcvt	s0, d0
	b	LBB0_14
LBB0_9:
	fcvt	d0, s9
	bl	_hable
	fmov	s10, s0
	fmov	d0, d8
	bl	_hable
	fdiv	s0, s10, s0
	b	LBB0_14
LBB0_10:
	mov	w8, #52429
	movk	w8, #15692, lsl #16
	fmov	s0, w8
	fcmp	s9, s0
	b.le	LBB0_13
; %bb.11:
	fcvt	d0, s9
	fdiv	d0, d0, d8
	fcvt	s0, d0
	ldr	s1, [x26, #12]
	fmov	s2, #1.00000000
	fdiv	s1, s2, s1
	bl	_pow
	b	LBB0_14
LBB0_12:
	ldr	s0, [x26, #12]
	fmul	s0, s9, s0
	fmov	s1, #1.00000000
	mov	w0, #0
	bl	_av_clipf
	b	LBB0_14
LBB0_13:
	mov	x8, #2684354560
	movk	x8, #39321, lsl #32
	movk	x8, #16297, lsl #48
	fmov	d0, x8
	fdiv	d0, d0, d8
	fcvt	s0, d0
	ldr	s1, [x26, #12]
	fmov	s2, #1.00000000
	fdiv	s1, s2, s1
	bl	_pow
	fmul	s0, s9, s0
	mov	w8, #52429
	movk	w8, #15692, lsl #16
	fmov	s1, w8
	fdiv	s0, s0, s1
LBB0_14:
	fdiv	s0, s0, s9
	ldr	s1, [x23, x28]
	fmul	s1, s1, s0
	str	s1, [x23, x28]
	ldr	s1, [x24, x19]
	fmul	s1, s0, s1
	str	s1, [x24, x19]
	ldr	s1, [x21, x20]
	fmul	s0, s0, s1
	str	s0, [x21, x20]
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_14-LBB0_5)>>2
	.byte	(LBB0_6-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_9-LBB0_5)>>2
	.byte	(LBB0_10-LBB0_5)>>2
	.byte	(LBB0_12-LBB0_5)>>2
                                        ; -- End function
	.no_dead_strip	_tonemap
.subsections_via_symbols
