	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function load_color_refs
LCPI0_0:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_1:
	.quad	8                               ## 0x8
	.quad	8                               ## 0x8
LCPI0_2:
	.quad	16                              ## 0x10
	.quad	16                              ## 0x10
LCPI0_3:
	.quad	24                              ## 0x18
	.quad	24                              ## 0x18
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_load_color_refs:                       ## @load_color_refs
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	%esi, %edi
	movl	$8, %esi
	callq	_av_malloc_array
	testq	%rax, %rax
	je	LBB0_25
## %bb.1:
	movq	_HIST_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	testl	%r10d, %r10d
	jle	LBB0_25
## %bb.2:
	leaq	48(%rax), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	24(%rax), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [8,8]
	movdqa	LCPI0_2(%rip), %xmm2            ## xmm2 = [16,16]
	movdqa	LCPI0_3(%rip), %xmm3            ## xmm3 = [24,24]
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	cmpq	%r10, %r13
	je	LBB0_25
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_18 Depth 2
                                        ##     Child Loop BB0_22 Depth 2
	movq	%r13, %rcx
	shlq	$4, %rcx
	movl	(%r14,%rcx), %r12d
	testl	%r12d, %r12d
	jle	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%r14,%rcx), %rsi
	addq	$8, %rsi
	movslq	%r15d, %r15
	cmpl	$4, %r12d
	jb	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	%r14, %rcx
	addq	$16, %rcx
	leaq	(%rax,%r15,8), %rdx
	cmpq	%rcx, %rdx
	jae	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%r15,%r12), %rcx
	leaq	(%rax,%rcx,8), %rcx
	cmpq	%rcx, %rsi
	jae	LBB0_10
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r11d, %r11d
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r11, %rcx
	notq	%rcx
	addq	%r12, %rcx
	movq	%r12, %rdi
	andq	$3, %rdi
	je	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%rax,%r15,8), %rbx
	leaq	(,%r11,4), %rdx
	negq	%rdi
	xorl	%r8d, %r8d
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rsi), %r9
	addq	%rdx, %r9
	movq	%r9, (%rbx)
	addq	$8, %rbx
	decq	%r8
	addq	$4, %rdx
	cmpq	%r8, %rdi
	jne	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=1
	subq	%r8, %r15
	subq	%r8, %r11
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$3, %rcx
	jb	LBB0_3
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r15,8), %rdx
	movq	%r11, %r8
	subq	%r12, %r8
	shlq	$2, %r11
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_22:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rsi), %rcx
	addq	%r11, %rcx
	addq	%rbx, %rcx
	movq	%rcx, -24(%rdx,%rbx,2)
	movq	(%rsi), %rcx
	addq	%r11, %rcx
	addq	%rbx, %rcx
	addq	$4, %rcx
	movq	%rcx, -16(%rdx,%rbx,2)
	movq	(%rsi), %rcx
	addq	%r11, %rcx
	addq	%rbx, %rcx
	addq	$8, %rcx
	movq	%rcx, -8(%rdx,%rbx,2)
	movq	(%rsi), %rcx
	addq	%r11, %rcx
	addq	%rbx, %rcx
	addq	$12, %rcx
	movq	%rcx, (%rdx,%rbx,2)
	addq	$-4, %rdi
	addq	$16, %rbx
	cmpq	%rdi, %r8
	jne	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_4 Depth=1
	subq	%rdi, %r15
	jmp	LBB0_3
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, %r11d
	andl	$-4, %r11d
	leaq	-4(%r11), %rdx
	movq	%rdx, %rcx
	shrq	$2, %rcx
	incq	%rcx
	testq	%rdx, %rdx
	je	LBB0_24
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rcx, %rbx
	andq	$-2, %rbx
	movq	(%rsi), %xmm4                   ## xmm4 = mem[0],zero
	pshufd	$68, %xmm4, %xmm5               ## xmm5 = xmm4[0,1,0,1]
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%r15,8), %rdi
	xorl	%edx, %edx
	movdqa	%xmm0, %xmm4
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqa	%xmm4, %xmm6
	psllq	$2, %xmm6
	paddq	%xmm5, %xmm6
	movdqa	%xmm6, %xmm7
	paddq	%xmm1, %xmm7
	movdqu	%xmm6, -48(%rdi,%rdx,8)
	movdqu	%xmm7, -32(%rdi,%rdx,8)
	movdqa	%xmm6, %xmm7
	paddq	%xmm2, %xmm7
	paddq	%xmm3, %xmm6
	movdqu	%xmm7, -16(%rdi,%rdx,8)
	movdqu	%xmm6, (%rdi,%rdx,8)
	addq	$8, %rdx
	paddq	%xmm1, %xmm4
	addq	$-2, %rbx
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	testb	$1, %cl
	je	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	%r15, %rdx
	movq	(%rsi), %xmm5                   ## xmm5 = mem[0],zero
	pshufd	$68, %xmm5, %xmm5               ## xmm5 = xmm5[0,1,0,1]
	psllq	$2, %xmm4
	paddq	%xmm5, %xmm4
	movdqu	%xmm4, (%rax,%rdx,8)
	paddq	%xmm1, %xmm4
	movdqu	%xmm4, 16(%rax,%rdx,8)
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	%r11, %r15
	cmpq	%r12, %r11
	je	LBB0_3
	jmp	LBB0_16
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	movdqa	%xmm0, %xmm4
	testb	$1, %cl
	jne	LBB0_14
	jmp	LBB0_15
LBB0_25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HIST_SIZE,4,2                  ## @HIST_SIZE
	.no_dead_strip	_load_color_refs
.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 load_color_refs
lCPI0_0:
	.quad	0                               ; 0x0
	.quad	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_load_color_refs:                       ; @load_color_refs
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	x0, x1
	mov	w1, #8
	bl	_av_malloc_array
	cbz	x0, LBB0_15
; %bb.1:
Lloh0:
	adrp	x8, _HIST_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HIST_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.2:
	mov	x9, #0
	mov	w13, #0
	add	x10, x0, #32
Lloh3:
	adrp	x11, lCPI0_0@PAGE
Lloh4:
	ldr	q0, [x11, lCPI0_0@PAGEOFF]
	mov	w11, #24
	dup.2d	v1, x11
	mov	w11, #16
	dup.2d	v2, x11
	mov	w11, #8
	dup.2d	v3, x11
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
                                        ; kill: def $w13 killed $w13 killed $x13 def $x13
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #1
	cmp	x9, x8
	b.eq	LBB0_15
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	add	x11, x19, x9, lsl #4
	mov	x14, x11
	ldr	w12, [x14], #16
	cmp	w12, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x11, #8
	sxtw	x15, w13
	cmp	w12, #8
	b.lo	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x13, x0, x15, lsl #3
	cmp	x13, x14
	b.hs	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x13, x15, x12
	add	x13, x0, x13, lsl #3
	cmp	x11, x13
	b.hs	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x14, #0
	mov	x13, x15
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	lsl	x15, x14, #2
	sub	x12, x12, x14
	mov	x14, x13
LBB0_11:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x16, [x11]
	add	x13, x14, #1
	add	x16, x16, x15
	str	x16, [x0, x14, lsl #3]
	add	x15, x15, #4
	mov	x14, x13
	subs	x12, x12, #1
	b.ne	LBB0_11
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	and	x14, x12, #0xfffffff8
	add	x13, x14, x15
	ld1r.2d	{ v4 }, [x11]
	add	x15, x10, x15, lsl #3
	mov	x16, x14
	mov.16b	v5, v0
LBB0_13:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	shl.2d	v6, v5, #2
	add.2d	v7, v4, v6
	add.2d	v6, v6, v4
	add.2d	v16, v6, v3
	add.2d	v17, v6, v2
	add.2d	v6, v6, v1
	stp	q7, q16, [x15, #-32]
	stp	q17, q6, [x15], #64
	add.2d	v5, v5, v3
	subs	x16, x16, #8
	b.ne	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	x14, x12
	b.eq	LBB0_3
	b	LBB0_10
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HIST_SIZE,4,2                  ; @HIST_SIZE
	.no_dead_strip	_load_color_refs
.subsections_via_symbols
