	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function pick_color
LCPI0_0:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_pick_color:                            ## @pick_color
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movslq	(%rdi), %r15
	movq	_CHANNEL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jle	LBB0_11
## %bb.1:
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movss	%xmm1, -48(%rbp)                ## 4-byte Spill
	movss	%xmm2, -52(%rbp)                ## 4-byte Spill
	movq	_color_table@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rdi
	movaps	%xmm3, -80(%rbp)                ## 16-byte Spill
	callq	_FF_ARRAY_ELEMS
	movaps	-80(%rbp), %xmm4                ## 16-byte Reload
	movl	$1, %r13d
	cmpl	$3, %eax
	jl	LBB0_5
## %bb.2:
	movl	$1, %r13d
	movl	$16, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rdi
	movss	(%rdi,%rbx), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm4, %xmm0
	jae	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	callq	_FF_ARRAY_ELEMS
	movaps	-80(%rbp), %xmm4                ## 16-byte Reload
	decl	%eax
	cltq
	addq	$16, %rbx
	cmpq	%rax, %r13
	jl	LBB0_3
LBB0_5:
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rax
	movslq	%r13d, %rcx
	decq	%rcx
	shlq	$4, %rcx
	movss	(%rax,%rcx), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm4, %xmm0
	jae	LBB0_6
## %bb.7:
	movl	%r13d, %edx
	shlq	$4, %rdx
	movss	(%rax,%rdx), %xmm1              ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm4
	jae	LBB0_8
## %bb.9:
	subss	%xmm0, %xmm4
	subss	%xmm0, %xmm1
	divss	%xmm1, %xmm4
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	subss	%xmm4, %xmm0
	movsd	4(%rax,%rcx), %xmm2             ## xmm2 = mem[0],zero
	movsd	4(%rax,%rdx), %xmm1             ## xmm1 = mem[0],zero
	movsldup	%xmm4, %xmm3                    ## xmm3 = xmm4[0,0,2,2]
	mulps	%xmm1, %xmm3
	movsldup	%xmm0, %xmm1                    ## xmm1 = xmm0[0,0,2,2]
	mulps	%xmm2, %xmm1
	mulss	12(%rax,%rdx), %xmm4
	addps	%xmm3, %xmm1
	mulss	12(%rax,%rcx), %xmm0
	addss	%xmm4, %xmm0
	jmp	LBB0_10
LBB0_11:
	mulss	%xmm3, %xmm0
	movss	%xmm0, (%r14)
	mulss	%xmm3, %xmm1
	movss	%xmm1, 4(%r14)
	mulss	%xmm3, %xmm2
	movaps	%xmm2, %xmm0
	jmp	LBB0_12
LBB0_6:
	movsd	4(%rax,%rcx), %xmm1             ## xmm1 = mem[0],zero
	movss	12(%rax,%rcx), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	jmp	LBB0_10
LBB0_8:
	movsd	4(%rax,%rdx), %xmm1             ## xmm1 = mem[0],zero
	movss	12(%rax,%rdx), %xmm0            ## xmm0 = mem[0],zero,zero,zero
LBB0_10:
	movss	-44(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm2
	movss	%xmm2, (%r14)
	movshdup	%xmm1, %xmm1                    ## xmm1 = xmm1[1,1,3,3]
	mulss	-48(%rbp), %xmm1                ## 4-byte Folded Reload
	movss	%xmm1, 4(%r14)
	mulss	-52(%rbp), %xmm0                ## 4-byte Folded Reload
LBB0_12:
	movss	%xmm0, 8(%r14)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHANNEL,4,2                    ## @CHANNEL
	.comm	_color_table,8,3                ## @color_table
	.no_dead_strip	_pick_color
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pick_color
_pick_color:                            ; @pick_color
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x1
	fmov	s9, s3
	fmov	s8, s2
                                        ; kill: def $s1 killed $s1 def $q1
                                        ; kill: def $s0 killed $s0 def $q0
	ldrsw	x20, [x0]
Lloh0:
	adrp	x8, _CHANNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	b.le	LBB0_9
; %bb.1:
	stp	q0, q1, [sp]                    ; 32-byte Folded Spill
Lloh3:
	adrp	x21, _color_table@GOTPAGE
Lloh4:
	ldr	x21, [x21, _color_table@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x0, [x8, x20, lsl #3]
	bl	_FF_ARRAY_ELEMS
	mov	w22, #1
	cmp	w0, #3
	b.lt	LBB0_6
; %bb.2:
	mov	w23, #16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x0, [x8, x20, lsl #3]
	ldr	s0, [x0, x23]
	fcmp	s0, s9
	b.ge	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	bl	_FF_ARRAY_ELEMS
	sub	w8, w0, #1
	add	x23, x23, #16
	cmp	x22, w8, sxtw
	b.lt	LBB0_3
LBB0_5:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
LBB0_6:
	ldp	q6, q5, [sp]                    ; 32-byte Folded Reload
	ldr	x8, [x21]
	ldr	x8, [x8, x20, lsl #3]
	sxtw	x9, w22
	sub	x9, x9, #1
	lsl	x10, x9, #4
	ldr	s0, [x8, x10]
	fcmp	s0, s9
	b.ge	LBB0_10
; %bb.7:
	mov	w10, w22
	lsl	x11, x10, #4
	ldr	s1, [x8, x11]
	fcmp	s1, s9
	b.ls	LBB0_11
; %bb.8:
	fsub	s2, s9, s0
	fsub	s0, s1, s0
	fdiv	s1, s2, s0
	add	x9, x8, x9, lsl #4
	fmov	s0, #1.00000000
	fsub	s2, s0, s1
	add	x8, x8, x10, lsl #4
	ldur	d3, [x9, #4]
	ldur	d0, [x8, #4]
	fmul.2s	v0, v0, v1[0]
	fmla.2s	v0, v3, v2[0]
	ldr	s3, [x9, #12]
	ldr	s4, [x8, #12]
	fmul	s1, s1, s4
	fmadd	s1, s3, s2, s1
	b	LBB0_13
LBB0_9:
	fmul	s0, s0, s9
	str	s0, [x19]
	fmul	s0, s1, s9
	str	s0, [x19, #4]
	fmul	s0, s8, s9
	b	LBB0_14
LBB0_10:
	add	x8, x8, x9, lsl #4
	b	LBB0_12
LBB0_11:
	add	x8, x8, x10, lsl #4
LBB0_12:
	ldur	d0, [x8, #4]
	ldr	s1, [x8, #12]
LBB0_13:
	mov.s	v6[1], v5[0]
	fmul.2s	v0, v0, v6
	str	d0, [x19]
	fmul	s0, s1, s8
LBB0_14:
	str	s0, [x19, #8]
	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	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CHANNEL,4,2                    ; @CHANNEL
	.comm	_color_table,8,3                ; @color_table
	.no_dead_strip	_pick_color
.subsections_via_symbols
