	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wip_save_work
_wip_save_work:                         ## @wip_save_work
	.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
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r13
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movq	(%r13), %rax
	incq	%rax
	movq	(%r15), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_3
## %bb.1:
	leaq	16(%r15), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pthread_cond_wait
	movq	(%r13), %rax
	incq	%rax
	movq	(%r15), %rcx
	cmpq	%rcx, %rax
	jl	LBB0_2
LBB0_3:
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	sete	%dil
	callq	_assert
	movl	32(%r13), %edi
	movq	8(%r15), %rsi
	callq	_fifo_add
	incq	(%r13)
	incl	%r12d
	movl	%r12d, %eax
	cltd
	idivl	8(%r13)
	movslq	%edx, %rdi
	shlq	$2, %rdi
	addq	24(%r13), %rdi
	callq	_pthread_cond_signal
	movq	$0, 8(%r15)
	movslq	16(%r13), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 16(%r13)
	movq	%rax, (%r15)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_wip_save_work
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wip_save_work
_wip_save_work:                         ; @wip_save_work
	.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	x22, x2
	mov	x19, x1
	mov	x21, x0
	add	x20, x0, #12
	mov	x0, x20
	bl	_pthread_mutex_lock
	ldr	x8, [x21]
	add	x8, x8, #1
	ldr	x9, [x19]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.1:
	add	x23, x19, #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x20
	bl	_pthread_cond_wait
	ldr	x8, [x21]
	add	x8, x8, #1
	ldr	x9, [x19]
	cmp	x8, x9
	b.lt	LBB0_2
LBB0_3:
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	w0, [x21, #32]
	ldr	x1, [x19, #8]
	bl	_fifo_add
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	ldr	x8, [x21, #24]
	add	w9, w22, #1
	ldr	w10, [x21, #8]
	sdiv	w11, w9, w10
	msub	w9, w11, w10, w9
	add	x0, x8, w9, sxtw #2
	bl	_pthread_cond_signal
	ldrsw	x8, [x21, #16]
	add	w9, w8, #1
	str	w9, [x21, #16]
	stp	x8, xzr, [x19]
	mov	x0, x20
	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
	b	_pthread_mutex_unlock
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_wip_save_work
.subsections_via_symbols
