	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_for_in_progress
_wait_for_in_progress:                  ## @wait_for_in_progress
	.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	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_cow_threshold@GOTPCREL(%rip), %r13
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	setg	%dil
	callq	_unlikely
	movl	$1, %r12d
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	setg	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_wait@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DECLARE_WAITQUEUE
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	___add_wait_queue
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___set_current_state
	movq	%r15, %rdi
	callq	_spin_unlock
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movq	__origins_lock@GOTPCREL(%rip), %rdi
	callq	_up_read
LBB0_4:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_io_schedule
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_remove_wait_queue
	jmp	LBB0_6
LBB0_5:
	movq	%r15, %rdi
	callq	_spin_unlock
LBB0_6:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cow_threshold,8,3              ## @cow_threshold
	.comm	_wait,4,2                       ## @wait
	.comm	_current,4,2                    ## @current
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.comm	__origins_lock,4,2              ## @_origins_lock
	.no_dead_strip	_wait_for_in_progress
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_for_in_progress
_wait_for_in_progress:                  ; @wait_for_in_progress
	.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	x20, x1
	mov	x21, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _cow_threshold@GOTPAGE
Lloh1:
	ldr	x22, [x22, _cow_threshold@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.1:
	add	x19, x21, #8
	mov	x0, x19
	bl	_spin_lock
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, gt
	bl	_likely
	cbz	x0, LBB0_5
; %bb.2:
Lloh2:
	adrp	x21, _wait@GOTPAGE
Lloh3:
	ldr	x21, [x21, _wait@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh4:
	adrp	x8, _current@GOTPAGE
Lloh5:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_DECLARE_WAITQUEUE
	mov	x0, x19
	mov	x1, x21
	bl	___add_wait_queue
Lloh7:
	adrp	x8, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	___set_current_state
	mov	x0, x19
	bl	_spin_unlock
	cbz	w20, LBB0_4
; %bb.3:
Lloh10:
	adrp	x0, __origins_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, __origins_lock@GOTPAGEOFF]
	bl	_up_read
LBB0_4:
	bl	_io_schedule
Lloh12:
	adrp	x1, _wait@GOTPAGE
Lloh13:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	mov	x0, x19
	bl	_remove_wait_queue
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_spin_unlock
LBB0_6:
	mov	w0, #1
LBB0_7:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_cow_threshold,8,3              ; @cow_threshold
	.comm	_wait,4,2                       ; @wait
	.comm	_current,4,2                    ; @current
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.comm	__origins_lock,4,2              ; @_origins_lock
	.no_dead_strip	_wait_for_in_progress
.subsections_via_symbols
