	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function freecolor
_freecolor:                             ## @freecolor
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	16(%rdi), %r13
	movl	$1, %edi
	callq	_assert
	movq	_WHITE@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	je	LBB0_17
## %bb.1:
	leaq	(%rbx,%rbx,4), %r15
	leaq	(,%r15,8), %r12
	addq	%r13, %r12
	xorl	%edi, %edi
	cmpq	$0, 32(%r13,%r15,8)
	sete	%dil
	callq	_assert
	movq	(%r12), %rax
	movq	_NOSUB@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 8(%r13,%r15,8)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 16(%r13,%r15,8)
	sete	%dil
	callq	_assert
	movq	_FREECOL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13,%r15,8)
	cmpq	%rbx, (%r14)
	jne	LBB0_16
## %bb.2:
	movq	_WHITE@GOTPCREL(%rip), %r15
	cmpq	%rbx, (%r15)
	jae	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%rbx,4), %rdi
	shlq	$3, %rdi
	addq	16(%r14), %rdi
	callq	_UNUSEDCOLOR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rbx
	decq	%rbx
	movq	%rbx, (%r14)
	cmpq	(%r15), %rbx
	ja	LBB0_3
LBB0_5:
	movq	8(%r14), %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_assert
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	cmpq	%rax, %rcx
	jbe	LBB0_9
## %bb.6:
	movq	16(%r14), %rdx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rcx,%rcx,4), %rcx
	movq	(%rdx,%rcx,8), %rcx
	cmpq	%rax, %rcx
	ja	LBB0_7
## %bb.8:
	movq	%rcx, 8(%r14)
LBB0_9:
	testq	%rcx, %rcx
	jle	LBB0_17
## %bb.10:
	xorl	%edi, %edi
	cmpq	%rax, %rcx
	setb	%dil
	callq	_assert
	movq	8(%r14), %rcx
	movq	16(%r14), %rax
	leaq	(%rcx,%rcx,4), %rdx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	setb	%al
	movzbl	%al, %edi
	callq	_assert
	movq	16(%r14), %rax
	leaq	(%rbx,%rbx,4), %rdx
	movq	%rbx, %rcx
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movq	(%rax,%rdx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_17
LBB0_13:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	(%r14), %rbx
	jbe	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	leaq	(%rbx,%rbx,4), %rdx
	movq	(%rax,%rdx,8), %rbx
	leaq	(%rcx,%rcx,4), %rdx
	movq	%rbx, (%rax,%rdx,8)
	testq	%rbx, %rbx
	jne	LBB0_13
	jmp	LBB0_17
LBB0_16:
	movq	8(%r14), %rax
	movq	%rax, (%r12)
	subq	16(%r14), %r12
	sarq	$3, %r12
	movabsq	$-3689348814741910323, %rax     ## imm = 0xCCCCCCCCCCCCCCCD
	imulq	%r12, %rax
	movq	%rax, 8(%r14)
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WHITE,8,3                      ## @WHITE
	.comm	_NOSUB,8,3                      ## @NOSUB
	.comm	_FREECOL,4,2                    ## @FREECOL
	.no_dead_strip	_freecolor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function freecolor
_freecolor:                             ; @freecolor
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x0, #16]
	mov	w0, #1
	bl	_assert
Lloh0:
	adrp	x21, _WHITE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WHITE@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x8, x20
	b.eq	LBB0_17
; %bb.1:
	mov	w8, #40
	madd	x22, x20, x8, x23
	mov	w8, #40
	madd	x23, x20, x8, x23
	ldr	x8, [x23, #32]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _NOSUB@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NOSUB@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	x8, [x23, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x23, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
Lloh5:
	adrp	x8, _FREECOL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FREECOL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x23, #24]
	ldr	x8, [x19]
	cmp	x8, x20
	b.ne	LBB0_16
; %bb.2:
	ldr	x8, [x21]
	cmp	x8, x20
	b.hs	LBB0_6
; %bb.3:
	mov	w22, #40
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	madd	x0, x20, x22, x8
	bl	_UNUSEDCOLOR
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19]
	sub	x20, x8, #1
	str	x20, [x19]
	ldr	x8, [x21]
	cmp	x20, x8
	b.hi	LBB0_4
LBB0_6:
	ldr	x8, [x19, #8]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
	bl	_assert
	ldp	x9, x8, [x19]
	cmp	x8, x9
	b.ls	LBB0_10
; %bb.7:
	ldr	x10, [x19, #16]
	mov	w11, #40
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mul	x8, x8, x11
	ldr	x8, [x10, x8]
	cmp	x8, x9
	b.hi	LBB0_8
; %bb.9:
	str	x8, [x19, #8]
LBB0_10:
	cmp	x8, #1
	b.lt	LBB0_17
; %bb.11:
	cmp	x8, x9
	cset	w0, lo
	bl	_assert
	ldp	x9, x8, [x19, #8]
	mov	w10, #40
	mul	x10, x9, x10
	ldr	x20, [x8, x10]
	cbz	x20, LBB0_17
; %bb.12:
	mov	w21, #40
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	mul	x10, x20, x21
	ldr	x20, [x8, x10]
	mul	x10, x9, x21
	str	x20, [x8, x10]
	cbz	x20, LBB0_17
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19]
	cmp	x20, x10
	b.hi	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	cset	w0, lo
	bl	_assert
	ldr	x8, [x19, #16]
	mul	x9, x20, x21
	ldr	x10, [x8, x9]
	mov	x9, x20
	mov	x20, x10
	cbnz	x10, LBB0_14
	b	LBB0_17
LBB0_16:
	ldp	x8, x9, [x19, #8]
	str	x8, [x22]
	sub	x8, x22, x9
	asr	x8, x8, #3
	mov	x9, #-3689348814741910324
	movk	x9, #52429
	mul	x8, x8, x9
	str	x8, [x19, #8]
LBB0_17:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_WHITE,8,3                      ; @WHITE
	.comm	_NOSUB,8,3                      ; @NOSUB
	.comm	_FREECOL,4,2                    ; @FREECOL
	.no_dead_strip	_freecolor
.subsections_via_symbols
