	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_color_map
_build_color_map:                       ## @build_color_map
	.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), %rax
	movq	(%rax), %r9
	movl	(%r8), %ebx
	movl	4(%r8), %eax
	shll	$24, %ebx
	movslq	(%rcx), %rdi
	orl	(%r9,%rdi,4), %ebx
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	shll	$24, %eax
	movslq	4(%rcx), %rdi
	orl	(%r9,%rdi,4), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	8(%r8), %eax
	shll	$24, %eax
	movslq	8(%rcx), %rdi
	orl	(%r9,%rdi,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movl	12(%r8), %r14d
	shll	$24, %r14d
	movslq	12(%rcx), %rcx
	orl	(%r9,%rcx,4), %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%r15
	cmpq	$256, %r15                      ## imm = 0x100
	je	LBB0_10
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	(%rbx,%r15,4), %esi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_color_distance
	cmpl	%r12d, %eax
	jge	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%r13,%r15,4)
	movl	%eax, %r12d
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx,%r15,4), %esi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_color_distance
	cmpl	%r12d, %eax
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, (%r13,%r15,4)
	movl	%eax, %r12d
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx,%r15,4), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_color_distance
	cmpl	%r12d, %eax
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$2, (%r13,%r15,4)
	movl	%eax, %r12d
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx,%r15,4), %esi
	movl	%r14d, %edi
	callq	_color_distance
	cmpl	%r12d, %eax
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$3, (%r13,%r15,4)
	jmp	LBB0_9
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_build_color_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_color_map
_build_color_map:                       ; @build_color_map
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x25, #0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldpsw	x9, x10, [x3]
	ldr	w9, [x8, x9, lsl #2]
	ldp	w11, w12, [x4]
	orr	w21, w9, w11, lsl #24
	ldr	w9, [x8, x10, lsl #2]
	ldpsw	x10, x11, [x3, #8]
	ldr	w10, [x8, x10, lsl #2]
	orr	w22, w9, w12, lsl #24
	ldp	w9, w12, [x4, #8]
	orr	w23, w10, w9, lsl #24
	ldr	w8, [x8, x11, lsl #2]
	orr	w24, w8, w12, lsl #24
Lloh0:
	adrp	x26, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x26, [x26, _INT_MAX@GOTPAGEOFF]
	mov	w27, #3
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x25, x25, #4
	cmp	x25, #1024
	b.eq	LBB0_10
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w28, [x26]
	ldr	w1, [x19, x25]
	mov	x0, x21
	bl	_color_distance
	cmp	w0, w28
	b.ge	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	wzr, [x20, x25]
	mov	x28, x0
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x19, x25]
	mov	x0, x22
	bl	_color_distance
	cmp	w0, w28
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #1
	str	w8, [x20, x25]
	mov	x28, x0
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x19, x25]
	mov	x0, x23
	bl	_color_distance
	cmp	w0, w28
	b.ge	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #2
	str	w8, [x20, x25]
	mov	x28, x0
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x19, x25]
	mov	x0, x24
	bl	_color_distance
	cmp	w0, w28
	b.ge	LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w27, [x20, x25]
	b	LBB0_1
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_build_color_map
.subsections_via_symbols
