	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function BarrierDetachImpl
_BarrierDetachImpl:                     ## @BarrierDetachImpl
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpl	$0, 28(%rbx)
	sete	%dil
	callq	_Assert
	leaq	20(%rbx), %r14
	movq	%r14, %rdi
	callq	_SpinLockAcquire
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	setg	%dil
	callq	_Assert
	movq	(%rbx), %rax
	leaq	-1(%rax), %r12
	movq	%r12, (%rbx)
	testl	%r15d, %r15d
	jne	LBB0_2
## %bb.1:
	cmpq	$2, %rax
	jl	LBB0_3
LBB0_2:
	cmpq	%r12, 8(%rbx)
	jne	LBB0_3
## %bb.4:
	movq	$0, 8(%rbx)
	incl	24(%rbx)
	movq	%r14, %rdi
	callq	_SpinLockRelease
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_ConditionVariableBroadcast
	jmp	LBB0_5
LBB0_3:
	movq	%r14, %rdi
	callq	_SpinLockRelease
LBB0_5:
	xorl	%eax, %eax
	testq	%r12, %r12
	sete	%al
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_BarrierDetachImpl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function BarrierDetachImpl
_BarrierDetachImpl:                     ; @BarrierDetachImpl
	.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	x21, x1
	mov	x19, x0
	ldr	w8, [x0, #28]
	cmp	w8, #0
	cset	w0, eq
	bl	_Assert
	add	x20, x19, #20
	mov	x0, x20
	bl	_SpinLockAcquire
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, gt
	bl	_Assert
	ldr	x8, [x19]
	sub	x22, x8, #1
	str	x22, [x19]
	cbnz	w21, LBB0_2
; %bb.1:
	cmp	x8, #2
	b.lt	LBB0_4
LBB0_2:
	ldr	x8, [x19, #8]
	cmp	x8, x22
	b.ne	LBB0_4
; %bb.3:
	str	xzr, [x19, #8]
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	mov	x0, x20
	bl	_SpinLockRelease
	add	x0, x19, #16
	bl	_ConditionVariableBroadcast
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_SpinLockRelease
LBB0_5:
	cmp	x22, #0
	cset	w0, eq
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_BarrierDetachImpl
.subsections_via_symbols
