	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function match_colors
_match_colors:                          ## @match_colors
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-192(%rbp), %r12
	movq	%r12, %rdi
	movl	%edx, %esi
	callq	_rgb5652rgb
	leaq	-176(%rbp), %r13
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_rgb5652rgb
	leaq	-160(%rbp), %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_lerp13rgb
	leaq	-144(%rbp), %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_lerp13rgb
	movq	-192(%rbp), %xmm2               ## xmm2 = mem[0],zero
	movq	-176(%rbp), %xmm0               ## xmm0 = mem[0],zero
	psubd	%xmm0, %xmm2
	pshufd	$68, %xmm2, %xmm0               ## xmm0 = xmm2[0,1,0,1]
	pextrd	$1, %xmm2, %r8d
	movd	%xmm2, %r9d
	movl	-184(%rbp), %r13d
	subl	-168(%rbp), %r13d
	movslq	%r14d, %r10
	movd	%r13d, %xmm1
	pshufd	$0, %xmm1, %xmm1                ## xmm1 = xmm1[0,0,0,0]
	pshufd	$17, %xmm2, %xmm2               ## xmm2 = xmm2[1,0,1,0]
	movq	%r10, %rdi
	shlq	$32, %rdi
	leaq	48(%rbx), %rax
	shlq	$2, %r10
	xorl	%ecx, %ecx
	movabsq	$60129542144, %r11              ## imm = 0xE00000000
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movabsq	$4294967296, %rdx               ## imm = 0x100000000
	leaq	(%rcx,%rdx), %r15
	sarq	$30, %r15
	movabsq	$38654705664, %rdx              ## imm = 0x900000000
	leaq	(%rcx,%rdx), %r12
	sarq	$30, %r12
	movd	(%rbx,%r15), %xmm3              ## xmm3 = mem[0],zero,zero,zero
	pinsrd	$1, -32(%rax), %xmm3
	pinsrd	$2, (%rbx,%r12), %xmm3
	movabsq	$8589934592, %rdx               ## imm = 0x200000000
	addq	%rcx, %rdx
	movabsq	$21474836480, %rsi              ## imm = 0x500000000
	addq	%rcx, %rsi
	sarq	$30, %rsi
	movd	-48(%rax), %xmm4                ## xmm4 = mem[0],zero,zero,zero
	pinsrd	$1, (%rbx,%rsi), %xmm4
	movabsq	$55834574848, %rsi              ## imm = 0xD00000000
	addq	%rcx, %rsi
	sarq	$30, %rsi
	pinsrd	$2, -16(%rax), %xmm4
	pinsrd	$3, (%rbx,%rsi), %xmm4
	sarq	$30, %rdx
	movabsq	$25769803776, %rsi              ## imm = 0x600000000
	addq	%rcx, %rsi
	sarq	$30, %rsi
	movd	(%rbx,%rdx), %xmm5              ## xmm5 = mem[0],zero,zero,zero
	movabsq	$42949672960, %rdx              ## imm = 0xA00000000
	addq	%rcx, %rdx
	sarq	$30, %rdx
	pinsrd	$1, (%rbx,%rsi), %xmm5
	leaq	(%rcx,%r11), %rsi
	sarq	$30, %rsi
	pinsrd	$3, (%rax), %xmm3
	pinsrd	$2, (%rbx,%rdx), %xmm5
	pinsrd	$3, (%rbx,%rsi), %xmm5
	movl	-192(%rbp,%r14,4), %edx
	imull	%r9d, %edx
	movl	-188(%rbp,%r14,4), %esi
	imull	%r8d, %esi
	addl	%edx, %esi
	movl	-184(%rbp,%r14,4), %edx
	imull	%r13d, %edx
	addl	%esi, %edx
	movl	%edx, -128(%rbp,%r14)
	pmulld	%xmm2, %xmm3
	pmulld	%xmm0, %xmm4
	paddd	%xmm3, %xmm4
	pmulld	%xmm1, %xmm5
	paddd	%xmm4, %xmm5
	movdqa	%xmm5, -112(%rbp,%r14,4)
	addq	$4, %r14
	addq	%rdi, %rcx
	addq	%r10, %rax
	cmpq	$16, %r14
	jne	LBB0_1
## %bb.2:
	movl	-120(%rbp), %r10d
	movl	-116(%rbp), %edx
	movl	-124(%rbp), %r9d
	addl	%edx, %r9d
	sarl	%r9d
	addl	%r10d, %edx
	sarl	%edx
	addl	-128(%rbp), %r10d
	sarl	%r10d
	xorl	%edi, %edi
	leaq	_match_colors.indexMap(%rip), %r8
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	-112(%rbp,%rdi,4), %ebx
	xorl	%esi, %esi
	cmpl	%edx, %ebx
	setl	%sil
	xorl	%ecx, %ecx
	cmpl	%r9d, %ebx
	setl	%cl
	addq	%rcx, %rcx
	leaq	(%rcx,%rsi,4), %rcx
	xorl	%esi, %esi
	cmpl	%r10d, %ebx
	setl	%sil
	orq	%rcx, %rsi
	sarl	$2, %eax
	orl	(%r8,%rsi,4), %eax
	incq	%rdi
	cmpq	$16, %rdi
	jne	LBB0_3
## %bb.4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @match_colors.indexMap
_match_colors.indexMap:
	.long	0                               ## 0x0
	.long	2147483648                      ## 0x80000000
	.long	0                               ## 0x0
	.long	2147483648                      ## 0x80000000
	.long	3221225472                      ## 0xc0000000
	.long	3221225472                      ## 0xc0000000
	.long	1073741824                      ## 0x40000000
	.long	1073741824                      ## 0x40000000

	.no_dead_strip	_match_colors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function match_colors
_match_colors:                          ; @match_colors
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	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
	mov	x20, x3
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	add	x23, sp, #8
	add	x0, sp, #8
	mov	x1, x2
	bl	_rgb5652rgb
	add	x22, x23, #16
	mov	x0, x22
	mov	x1, x20
	bl	_rgb5652rgb
	add	x0, x23, #32
	add	x1, sp, #8
	mov	x2, x22
	bl	_lerp13rgb
	add	x0, x23, #48
	add	x2, sp, #8
	mov	x1, x22
	bl	_lerp13rgb
	mov	x8, #0
	mov	x9, #0
	ldp	w10, w11, [sp, #8]
	ldr	w12, [sp, #24]
	ldr	w13, [sp, #16]
	sub	w10, w10, w12
	ldp	w12, w14, [sp, #28]
	sub	w11, w11, w12
	add	x12, x23, #8
	sub	w13, w13, w14
	sbfiz	x14, x21, #32, #32
	add	x15, x19, #32
	sbfiz	x16, x21, #2, #32
	add	x17, sp, #72
	mov	x0, #4294967296
	mov	x1, #8589934592
	add	x2, sp, #88
	mov	x3, #21474836480
	mov	x4, #25769803776
	mov	x5, #38654705664
	mov	x6, #42949672960
	mov	x7, #55834574848
	mov	x20, #60129542144
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w21, [x15, #-32]
	mul	w21, w21, w10
	add	x22, x8, x0
	asr	x22, x22, #30
	ldr	w22, [x19, x22]
	madd	w21, w22, w11, w21
	add	x22, x8, x1
	asr	x22, x22, #30
	ldr	w22, [x19, x22]
	madd	w21, w22, w13, w21
	add	x22, x2, x9
	ldur	w24, [x15, #-16]
	mul	w24, w24, w10
	add	x25, x8, x3
	asr	x25, x25, #30
	ldr	w25, [x19, x25]
	madd	w24, w25, w11, w24
	add	x25, x8, x4
	asr	x25, x25, #30
	ldr	w25, [x19, x25]
	madd	w24, w25, w13, w24
	stp	w21, w24, [x22]
	ldr	w21, [x15]
	mul	w21, w21, w10
	add	x24, x8, x5
	asr	x24, x24, #30
	ldr	w24, [x19, x24]
	add	x25, x8, x6
	asr	x25, x25, #30
	ldr	w25, [x19, x25]
	madd	w21, w24, w11, w21
	madd	w21, w25, w13, w21
	ldr	w24, [x15, #16]
	mul	w24, w24, w10
	add	x25, x8, x7
	asr	x25, x25, #30
	ldr	w25, [x19, x25]
	add	x26, x8, x20
	asr	x26, x26, #30
	ldr	w26, [x19, x26]
	madd	w24, w25, w11, w24
	madd	w24, w26, w13, w24
	stp	w21, w24, [x22, #8]
	ldr	w21, [x23, x9]
	mul	w21, w21, w10
	add	x22, x12, x9
	ldp	w24, w22, [x22, #-4]
	madd	w21, w24, w11, w21
	madd	w21, w22, w13, w21
	str	w21, [x17], #4
	add	x9, x9, #16
	add	x8, x8, x14
	add	x15, x15, x16
	cmp	x9, #64
	b.ne	LBB0_1
; %bb.2:
	mov	x8, #0
	mov	w0, #0
	ldp	w11, w10, [sp, #80]
	ldp	w12, w9, [sp, #72]
	add	w9, w10, w9
	asr	w9, w9, #1
	add	w10, w11, w10
	asr	w10, w10, #1
	add	w11, w12, w11
	asr	w11, w11, #1
	add	x12, sp, #88
Lloh3:
	adrp	x13, _match_colors.indexMap@PAGE
Lloh4:
	add	x13, x13, _match_colors.indexMap@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x12, x8]
	cmp	w14, w10
	cset	w15, lt
	cmp	w14, w9
	cset	w16, lt
	lsl	x16, x16, #1
	bfi	x16, x15, #2, #1
	cmp	w14, w11
	cset	w14, lt
	orr	x14, x16, x14
	ldr	w14, [x13, x14, lsl #2]
	orr	w0, w14, w0, asr #2
	add	x8, x8, #4
	cmp	x8, #64
	b.ne	LBB0_3
; %bb.4:
	ldur	x8, [x29, #-72]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	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
	add	sp, sp, #240
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @match_colors.indexMap
_match_colors.indexMap:
	.long	0                               ; 0x0
	.long	2147483648                      ; 0x80000000
	.long	0                               ; 0x0
	.long	2147483648                      ; 0x80000000
	.long	3221225472                      ; 0xc0000000
	.long	3221225472                      ; 0xc0000000
	.long	1073741824                      ; 0x40000000
	.long	1073741824                      ; 0x40000000

	.no_dead_strip	_match_colors
.subsections_via_symbols
