	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function newcolor
_newcolor:                              ## @newcolor
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_CISERR
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_COLORLESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_2:
	cmpq	$0, (%r14)
	je	LBB0_4
## %bb.3:
	movl	$1, %edi
	callq	_assert
	movq	(%r14), %rax
	xorl	%edi, %edi
	cmpq	8(%r14), %rax
	setb	%dil
	callq	_assert
	movq	(%r14), %rax
	movq	24(%r14), %r15
	leaq	(%rax,%rax,2), %r12
	shlq	$4, %r12
	leaq	(%r15,%r12), %rbx
	movq	%rbx, %rdi
	callq	_UNUSEDCOLOR
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 24(%r15,%r12)
	sete	%dil
	callq	_assert
	movq	(%r15,%r12), %rax
	movq	%rax, (%r14)
	movq	24(%r14), %rax
	jmp	LBB0_16
LBB0_4:
	movslq	16(%r14), %rcx
	movq	8(%r14), %rax
	leaq	-1(%rax), %rdx
	cmpq	%rcx, %rdx
	ja	LBB0_15
## %bb.5:
	movq	_MAX_COLOR@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rbx
	cmpl	%ebx, %ecx
	jne	LBB0_8
## %bb.6:
	movq	_REG_ECOLORS@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	addq	%rax, %rax
	incq	%rbx
	cmpq	%rbx, %rax
	cmovbq	%rax, %rbx
	movq	24(%r14), %rdi
	movq	%rbx, %rax
	shlq	$4, %rax
	leaq	(%rax,%rax,2), %rsi
	cmpq	32(%r14), %rdi
	je	LBB0_9
## %bb.11:
	callq	_REALLOC
	movq	%rax, %r12
	jmp	LBB0_12
LBB0_9:
	movq	%rsi, %rdi
	callq	_MALLOC
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_VS
	movl	%eax, %r15d
	movq	32(%r14), %rdi
	callq	_VS
	movl	8(%r14), %ecx
	shll	$4, %ecx
	leal	(%rcx,%rcx,2), %edx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_memcpy
LBB0_12:
	testq	%r12, %r12
	je	LBB0_13
## %bb.14:
	movq	%r12, 24(%r14)
	movq	%rbx, 8(%r14)
	movslq	16(%r14), %rax
	decq	%rbx
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	seta	%dil
	callq	_assert
	movslq	16(%r14), %rcx
LBB0_15:
	incq	%rcx
	movl	%ecx, 16(%r14)
	movq	24(%r14), %rax
	leaq	(%rcx,%rcx,2), %rbx
	shlq	$4, %rbx
	addq	%rax, %rbx
LBB0_16:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	_NOSUB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rbx)
	movq	$0, 24(%rbx)
	movq	_CHR_MIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rbx)
	movq	$0, 8(%rbx)
	subq	%rax, %rbx
	shrq	$4, %rbx
	imull	$-1431655765, %ebx, %eax        ## imm = 0xAAAAAAAB
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_REG_ESPACE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edi
	callq	_CERR
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_COLORLESS,4,2                  ## @COLORLESS
	.comm	_MAX_COLOR,4,2                  ## @MAX_COLOR
	.comm	_REG_ECOLORS,4,2                ## @REG_ECOLORS
	.comm	_REG_ESPACE,4,2                 ## @REG_ESPACE
	.comm	_NOSUB,8,3                      ## @NOSUB
	.comm	_CHR_MIN,4,2                    ## @CHR_MIN
	.no_dead_strip	_newcolor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function newcolor
_newcolor:                              ; @newcolor
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_CISERR
	cbz	x0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _COLORLESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COLORLESS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_2:
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w0, #1
	bl	_assert
	ldp	x8, x9, [x19]
	cmp	x8, x9
	cset	w0, lo
	bl	_assert
	ldr	x8, [x19, #24]
	ldr	x9, [x19]
	mov	w10, #48
	madd	x20, x9, x10, x8
	mov	x0, x20
	bl	_UNUSEDCOLOR
	bl	_assert
	ldr	x8, [x20, #24]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x20]
	str	x8, [x19]
	ldr	x8, [x19, #24]
	b	LBB0_14
LBB0_4:
	ldrsw	x9, [x19, #16]
	ldr	x8, [x19, #8]
	sub	x10, x8, #1
	cmp	x10, x9
	b.ls	LBB0_6
; %bb.5:
	add	w9, w9, #1
	str	w9, [x19, #16]
	ldr	x8, [x19, #24]
	mov	w10, #48
	smaddl	x20, w9, w10, x8
	b	LBB0_14
LBB0_6:
Lloh3:
	adrp	x10, _MAX_COLOR@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MAX_COLOR@GOTPAGEOFF]
Lloh5:
	ldrsw	x10, [x10]
	cmp	w9, w10
	b.ne	LBB0_8
; %bb.7:
Lloh6:
	adrp	x8, _REG_ECOLORS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_ECOLORS@GOTPAGEOFF]
	b	LBB0_17
LBB0_8:
	lsl	x8, x8, #1
	add	x9, x10, #1
	cmp	x8, x9
	csinc	x22, x8, x10, lo
	ldp	x0, x8, [x19, #24]
	add	x9, x22, x22, lsl #1
	lsl	x1, x9, #4
	cmp	x0, x8
	b.eq	LBB0_10
; %bb.9:
	bl	_REALLOC
	mov	x20, x0
	b	LBB0_12
LBB0_10:
	mov	x0, x1
	bl	_MALLOC
	cbz	x0, LBB0_16
; %bb.11:
	mov	x20, x0
	bl	_VS
	mov	x21, x0
	ldr	x0, [x19, #32]
	bl	_VS
	mov	x1, x0
	ldr	w8, [x19, #8]
	add	w8, w8, w8, lsl #1
	lsl	w2, w8, #4
	mov	x0, x21
	bl	_memcpy
LBB0_12:
	cbz	x20, LBB0_16
; %bb.13:
	str	x20, [x19, #24]
	str	x22, [x19, #8]
	ldrsw	x8, [x19, #16]
	sub	x9, x22, #1
	cmp	x9, x8
	cset	w0, hi
	bl	_assert
	ldrsw	x8, [x19, #16]
	add	x9, x8, #1
	str	w9, [x19, #16]
	ldr	x8, [x19, #24]
	mov	w10, #48
	madd	x20, x9, x10, x8
LBB0_14:
	str	xzr, [x20, #40]
Lloh8:
	adrp	x9, _NOSUB@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NOSUB@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	stp	xzr, xzr, [x20, #24]
Lloh11:
	adrp	x10, _CHR_MIN@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CHR_MIN@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	str	w10, [x20, #16]
	stp	x9, xzr, [x20]
	sub	x8, x20, x8
	lsr	x8, x8, #4
	mov	w9, #43691
	movk	w9, #43690, lsl #16
	mul	w0, w8, w9
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh14:
	adrp	x8, _REG_ESPACE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_ESPACE@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	bl	_CERR
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_COLORLESS,4,2                  ; @COLORLESS
	.comm	_MAX_COLOR,4,2                  ; @MAX_COLOR
	.comm	_REG_ECOLORS,4,2                ; @REG_ECOLORS
	.comm	_REG_ESPACE,4,2                 ; @REG_ESPACE
	.comm	_NOSUB,8,3                      ; @NOSUB
	.comm	_CHR_MIN,4,2                    ; @CHR_MIN
	.no_dead_strip	_newcolor
.subsections_via_symbols
