	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function finalize_phase_one
_finalize_phase_one:                    ## @finalize_phase_one
	.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	%rdi, %r12
	movl	(%rdi), %eax
	movl	$-1, %r13d
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	8(%r12), %rcx
	movq	24(%r12), %rdx
	incq	%rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, (%rdx)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rsi
	addq	$24, %rdx
	cmpq	%rsi, %rax
	jne	LBB0_2
	jmp	LBB0_5
LBB0_4:
	movl	%esi, %r13d
LBB0_5:
	xorl	%edi, %edi
	cmpl	$-1, %r13d
	setne	%dil
	callq	_assert
	movl	(%r12), %ecx
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.6:
	movl	%r13d, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	incl	%ebx
	movl	(%r12), %ecx
	leal	(%rcx,%r13), %eax
	cmpl	%eax, %ebx
	jge	LBB0_13
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movq	24(%r12), %r15
	movslq	%edx, %rax
	leaq	(%rax,%rax,2), %r14
	cmpq	$0, 8(%r15,%r14,8)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	16(%r15,%r14,8), %r8d
	movl	$2, %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_debug
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	$2, %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_debug
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	(%r15,%r14,8), %rax
	addq	$8, %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	16(%r12), %edi
	callq	_fifo_add
	movq	24(%r12), %rax
	movq	$0, 8(%rax,%r14,8)
	jmp	LBB0_12
LBB0_13:
	movslq	20(%r12), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 20(%r12)
	movq	%rax, 8(%r12)
	movl	16(%r12), %edi
	callq	_fifo_len
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_debug                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clearing slot %d (%d) (saving %d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"clearing slot %d (%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"phase one done: donequeue has %d items\n"

	.no_dead_strip	_finalize_phase_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function finalize_phase_one
_finalize_phase_one:                    ; @finalize_phase_one
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x23, #0
	ldr	x9, [x19, #24]
	ldr	x10, [x19, #8]
	add	x10, x10, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9]
	cmp	x11, x10
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	add	x9, x9, #24
	cmp	x8, x23
	b.ne	LBB0_2
LBB0_4:
	mov	w23, #-1
LBB0_5:
	cmn	w23, #1
	cset	w0, ne
	bl	_assert
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.6:
	mov	w24, #24
Lloh0:
	adrp	x20, l_.str.1@PAGE
Lloh1:
	add	x20, x20, l_.str.1@PAGEOFF
	mov	x25, x23
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w25, w25, #1
	ldr	w8, [x19]
	add	w9, w8, w23
	cmp	w25, w9
	b.ge	LBB0_13
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sdiv	w9, w25, w8
	msub	w9, w9, w8, w25
	ldr	x8, [x19, #24]
	sxtw	x22, w9
	smaddl	x26, w9, w24, x8
	ldr	x9, [x26, #8]!
	cbz	x9, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	madd	x8, x22, x24, x8
	ldr	w8, [x8, #16]
	stp	x25, x8, [sp]
	mov	w0, #2
	mov	x1, x21
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x8, x25
	str	x8, [sp]
	mov	w0, #2
	mov	x1, x20
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x2, x22
	bl	_debug
	ldr	x1, [x26]
	cbz	x1, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x19, #16]
	bl	_fifo_add
	ldr	x8, [x19, #24]
	madd	x8, x22, x24, x8
	str	xzr, [x8, #8]
	b	LBB0_7
LBB0_13:
	ldp	w0, w8, [x19, #16]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	w9, w8, #1
	str	w9, [x19, #20]
	str	x8, [x19, #8]
	bl	_fifo_len
	mov	x2, x0
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	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
	add	sp, sp, #96
	b	_debug
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clearing slot %d (%d) (saving %d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"clearing slot %d (%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"phase one done: donequeue has %d items\n"

	.no_dead_strip	_finalize_phase_one
.subsections_via_symbols
