	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function fill_in_tongue
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_1:
	.quad	0x0000000000000000              ## double 0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_fill_in_tongue:                        ## @fill_in_tongue
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -184(%rbp)                 ## 8-byte Spill
	movl	%r8d, -84(%rbp)                 ## 4-byte Spill
                                        ## kill: def $ecx killed $ecx def $rcx
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -144(%rbp)                ## 8-byte Spill
	movq	%rdi, -160(%rbp)                ## 8-byte Spill
	movq	%rcx, -152(%rbp)                ## 8-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_19
## %bb.1:
	movl	%esi, %edx
	movq	-144(%rbp), %rax                ## 8-byte Reload
	decl	%eax
	cvtsi2sd	%eax, %xmm1
	movsd	%xmm1, -104(%rbp)               ## 8-byte Spill
	movq	-152(%rbp), %rax                ## 8-byte Reload
	leal	-1(%rax), %eax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	movsd	%xmm1, -168(%rbp)               ## 8-byte Spill
	movl	24(%rbp), %ebx
	xorps	%xmm1, %xmm1
	cvtsi2ssl	-84(%rbp), %xmm1        ## 4-byte Folded Reload
	mulss	%xmm0, %xmm1
	cvttss2si	%xmm1, %eax
	movl	%eax, -124(%rbp)                ## 4-byte Spill
	xorl	%r14d, %r14d
	xorps	%xmm0, %xmm0
	movsd	%xmm0, -96(%rbp)                ## 8-byte Spill
                                        ## implicit-def: $xmm0
                                        ## kill: killed $xmm0
	xorl	%r15d, %r15d
	movl	%esi, -116(%rbp)                ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movsd	-96(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addsd	LCPI0_0(%rip), %xmm0
	movsd	%xmm0, -96(%rbp)                ## 8-byte Spill
	movl	-120(%rbp), %r15d               ## 4-byte Reload
	incl	%r15d
	movl	-116(%rbp), %edx                ## 4-byte Reload
	movq	-176(%rbp), %r14                ## 8-byte Reload
	addl	%edx, %r14d
	cmpl	-152(%rbp), %r15d               ## 4-byte Folded Reload
	je	LBB0_19
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	leaq	-88(%rbp), %rax
	movq	%rax, (%rsp)
	movq	-160(%rbp), %rdi                ## 8-byte Reload
	movq	-144(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r15d, %ecx
	leaq	-132(%rbp), %r8
	leaq	-128(%rbp), %r9
	callq	_find_tongue
	cmpl	$0, -132(%rbp)
	movq	%r14, -176(%rbp)                ## 8-byte Spill
	movl	%r15d, -120(%rbp)               ## 4-byte Spill
	je	LBB0_18
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-128(%rbp), %ecx
	cmpl	-88(%rbp), %ecx
	jg	LBB0_18
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ecx, %r13
	movsd	-96(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	divsd	-168(%rbp), %xmm0               ## 8-byte Folded Reload
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	movsd	%xmm1, -112(%rbp)               ## 8-byte Spill
	decq	%r13
	leal	(%r14,%rcx,4), %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14d, %xmm0
	movsd	-64(%rbp), %xmm1                ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	cvttsd2si	%xmm1, %eax
	movsd	-56(%rbp), %xmm1                ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	cvttsd2si	%xmm1, %ecx
	mulsd	-48(%rbp), %xmm0
	cvttsd2si	%xmm0, %edx
	movslq	%r15d, %r15
	movq	-160(%rbp), %rsi                ## 8-byte Reload
	movl	%eax, (%rsi,%r15,4)
	leal	1(%r15), %eax
	cltq
	movl	%ecx, (%rsi,%rax,4)
	leal	2(%r15), %eax
	cltq
	movl	%edx, (%rsi,%rax,4)
	leal	3(%r15), %eax
	cltq
	movl	$65535, (%rsi,%rax,4)           ## imm = 0xFFFF
	movslq	-88(%rbp), %rax
	incq	%r13
	movq	-200(%rbp), %rcx                ## 8-byte Reload
	incl	%ecx
	addl	$4, %r15d
	cmpq	%rax, %r13
	movl	24(%rbp), %ebx
	jge	LBB0_18
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_LUV@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	movq	%rcx, -200(%rbp)                ## 8-byte Spill
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	divsd	-104(%rbp), %xmm0               ## 8-byte Folded Reload
	movsd	-112(%rbp), %xmm1               ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	leaq	-80(%rbp), %rdi
	leaq	-72(%rbp), %rsi
	callq	_upvp_to_xy
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	movq	_UCS@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	divsd	-104(%rbp), %xmm0               ## 8-byte Folded Reload
	movsd	-112(%rbp), %xmm1               ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	leaq	-80(%rbp), %rdi
	leaq	-72(%rbp), %rsi
	callq	_uv_to_xy
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	movsd	-80(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	-72(%rbp), %xmm1                ## xmm1 = mem[0],zero
	movapd	%xmm0, %xmm2
	addsd	%xmm1, %xmm2
	movsd	LCPI0_0(%rip), %xmm3            ## xmm3 = mem[0],zero
	subsd	%xmm2, %xmm3
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	16(%rbp), %rdi
	movsd	%xmm3, -192(%rbp)               ## 8-byte Spill
	movapd	%xmm3, %xmm2
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rsi
	leaq	-56(%rbp), %r14
	movq	%r14, %rdx
	leaq	-48(%rbp), %r12
	movq	%r12, %rcx
	callq	_xyz_to_rgb
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_constrain_rgb
	testq	%rax, %rax
	movl	-124(%rbp), %r14d               ## 4-byte Reload
	cmovel	-84(%rbp), %r14d                ## 4-byte Folded Reload
	movsd	-64(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	-56(%rbp), %xmm1                ## xmm1 = mem[0],zero
	movsd	-48(%rbp), %xmm2                ## xmm2 = mem[0],zero
	callq	_FFMAX3
	ucomisd	LCPI0_1(%rip), %xmm0
	jbe	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=2
	movsd	-64(%rbp), %xmm1                ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	%xmm1, -64(%rbp)
	movsd	-56(%rbp), %xmm1                ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	%xmm1, -56(%rbp)
	movsd	-48(%rbp), %xmm1                ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	%xmm1, -48(%rbp)
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=2
	cmpl	$0, 32(%rbp)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=2
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	leaq	-64(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_gamma_correct_rgb
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	_XYY@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	divsd	-104(%rbp), %xmm0               ## 8-byte Folded Reload
	movsd	%xmm0, -80(%rbp)
	movsd	-112(%rbp), %xmm4               ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	movsd	%xmm4, -72(%rbp)
	movapd	%xmm4, %xmm1
	addsd	%xmm0, %xmm1
	movsd	LCPI0_0(%rip), %xmm3            ## xmm3 = mem[0],zero
	subsd	%xmm1, %xmm3
	movapd	%xmm4, %xmm1
	jmp	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=2
	xorl	%edi, %edi
	callq	_av_assert0
	movsd	-80(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	-72(%rbp), %xmm1                ## xmm1 = mem[0],zero
	movsd	-192(%rbp), %xmm3               ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	jmp	LBB0_13
LBB0_19:
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LUV,4,2                        ## @LUV
	.comm	_UCS,4,2                        ## @UCS
	.comm	_XYY,4,2                        ## @XYY
	.no_dead_strip	_fill_in_tongue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_in_tongue
_fill_in_tongue:                        ; @fill_in_tongue
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	d13, d12, [sp, #96]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #112]            ; 16-byte Folded Spill
	stp	d9, d8, [sp, #128]              ; 16-byte Folded Spill
	stp	x28, x27, [sp, #144]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
	.cfi_offset b12, -136
	.cfi_offset b13, -144
	str	x5, [sp, #32]                   ; 8-byte Folded Spill
	stp	w3, w2, [sp, #16]               ; 8-byte Folded Spill
	subs	w8, w3, #1
	b.lt	LBB0_19
; %bb.1:
	mov	x19, x7
	mov	x20, x6
	mov	x22, x4
	mov	x2, x1
	mov	x26, x0
	mov	w27, #0
	mov	w21, #0
	ldr	w24, [x29, #16]
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	sub	w9, w9, #1
	scvtf	d10, w9
	scvtf	d11, w8
	scvtf	s1, w4
	fmul	s0, s1, s0
	fcvtzs	w23, s0
	movi	d12, #0000000000000000
	fmov	d13, #1.00000000
                                        ; implicit-def: $d8
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	fadd	d12, d12, d13
	ldp	w21, w27, [sp, #24]             ; 8-byte Folded Reload
	add	w21, w21, #1
	ldp	w2, w8, [sp, #12]               ; 8-byte Folded Reload
	add	w27, w27, w2
	cmp	w21, w8
	b.eq	LBB0_19
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	add	x4, sp, #92
	add	x5, sp, #88
	add	x6, sp, #84
	mov	x0, x26
	ldr	w1, [sp, #20]                   ; 4-byte Folded Reload
	mov	x3, x21
	bl	_find_tongue
	ldr	w8, [sp, #92]
	stp	w21, w27, [sp, #24]             ; 8-byte Folded Spill
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	w8, w25, [sp, #84]
	cmp	w25, w8
	b.gt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x8, w25
	fdiv	d0, d12, d11
	fsub	d9, d13, d0
	sub	x21, x8, #1
	add	w28, w27, w25, lsl #2
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	scvtf	d0, w27
	ldr	d1, [sp, #56]
	fmul	d1, d1, d0
	fcvtzs	w8, d1
	ldr	d1, [sp, #48]
	fmul	d1, d1, d0
	fcvtzs	w9, d1
	ldr	d1, [sp, #40]
	fmul	d0, d1, d0
	fcvtzs	w10, d0
	str	w8, [x26, w28, sxtw #2]
	add	w8, w28, #1
	str	w9, [x26, w8, sxtw #2]
	add	w8, w28, #2
	str	w10, [x26, w8, sxtw #2]
	add	w8, w28, #3
	mov	w9, #65535
	str	w9, [x26, w8, sxtw #2]
	ldrsw	x8, [sp, #84]
	add	x21, x21, #1
	add	w25, w25, #1
	add	w28, w28, #4
	cmp	x21, x8
	b.ge	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
Lloh0:
	adrp	x8, _LUV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LUV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	scvtf	d0, w25
	fdiv	d0, d0, d10
	add	x0, sp, #72
	add	x1, sp, #64
	fmov	d1, d9
	bl	_upvp_to_xy
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=2
Lloh3:
	adrp	x8, _UCS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UCS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	scvtf	d0, w25
	fdiv	d0, d0, d10
	add	x0, sp, #72
	add	x1, sp, #64
	fmov	d1, d9
	bl	_uv_to_xy
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=2
	ldp	d1, d0, [sp, #64]
	fadd	d2, d0, d1
	fsub	d8, d13, d2
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=2
	add	x1, sp, #56
	add	x2, sp, #48
	add	x3, sp, #40
	mov	x0, x20
	fmov	d2, d8
	bl	_xyz_to_rgb
	add	x0, sp, #56
	add	x1, sp, #48
	add	x2, sp, #40
	bl	_constrain_rgb
	cmp	x0, #0
	csel	w27, w22, w23, eq
	ldp	d1, d0, [sp, #48]
	ldr	d2, [sp, #40]
	bl	_FFMAX3
	fcmp	d0, #0.0
	b.le	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	d1, [sp, #56]
	fdiv	d2, d1, d0
	ldr	d1, [sp, #48]
	fdiv	d1, d1, d0
	stp	d1, d2, [sp, #48]
	ldr	d1, [sp, #40]
	fdiv	d0, d1, d0
	str	d0, [sp, #40]
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=2
	cbz	w24, LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=2
	add	x1, sp, #56
	add	x2, sp, #48
	add	x3, sp, #40
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	bl	_gamma_correct_rgb
	b	LBB0_6
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=2
Lloh6:
	adrp	x8, _XYY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XYY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=2
	scvtf	d0, w25
	fdiv	d0, d0, d10
	stp	d9, d0, [sp, #64]
	fadd	d1, d9, d0
	fsub	d8, d13, d1
	fmov	d1, d9
	b	LBB0_12
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	w0, #0
	bl	_av_assert0
	ldp	d1, d0, [sp, #64]
	b	LBB0_12
LBB0_19:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #144]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #128]              ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #112]            ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LUV,4,2                        ; @LUV
	.comm	_UCS,4,2                        ; @UCS
	.comm	_XYY,4,2                        ; @XYY
	.no_dead_strip	_fill_in_tongue
.subsections_via_symbols
