	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function StartBufferIO
_StartBufferIO:                         ## @StartBufferIO
	.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	_InProgressBuf@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpq	$0, (%r15)
	sete	%dil
	callq	_Assert
	movq	%rbx, %rdi
	callq	_BufferDescriptorGetIOLock
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_LWLockAcquire
	movq	%rbx, %rdi
	callq	_LockBufHdr
	movq	_BM_IO_IN_PROGRESS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	testl	%eax, %esi
	je	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_UnlockBufHdr
	movq	%rbx, %rdi
	callq	_BufferDescriptorGetIOLock
	movl	%eax, %edi
	callq	_LWLockRelease
	movq	%rbx, %rdi
	callq	_WaitIO
	movq	%rbx, %rdi
	callq	_BufferDescriptorGetIOLock
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_LWLockAcquire
	movq	%rbx, %rdi
	callq	_LockBufHdr
	jmp	LBB0_2
LBB0_3:
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.4:
	movq	_BM_VALID@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
LBB0_7:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_UnlockBufHdr
	movq	%rbx, %rdi
	callq	_BufferDescriptorGetIOLock
	movl	%eax, %edi
	callq	_LWLockRelease
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_6:
	movq	_BM_DIRTY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
LBB0_5:
	orl	%eax, %esi
	movq	%rbx, %rdi
	callq	_UnlockBufHdr
	movq	%rbx, (%r15)
	movq	_IsForInput@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	movl	$1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InProgressBuf,8,3              ## @InProgressBuf
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_BM_IO_IN_PROGRESS,4,2          ## @BM_IO_IN_PROGRESS
	.comm	_BM_VALID,4,2                   ## @BM_VALID
	.comm	_BM_DIRTY,4,2                   ## @BM_DIRTY
	.comm	_IsForInput,4,2                 ## @IsForInput
	.no_dead_strip	_StartBufferIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function StartBufferIO
_StartBufferIO:                         ; @StartBufferIO
	.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
Lloh0:
	adrp	x21, _InProgressBuf@GOTPAGE
Lloh1:
	ldr	x21, [x21, _InProgressBuf@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w0, eq
	bl	_Assert
	mov	x0, x19
	bl	_BufferDescriptorGetIOLock
Lloh2:
	adrp	x22, _LW_EXCLUSIVE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _LW_EXCLUSIVE@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_LWLockAcquire
	mov	x0, x19
	bl	_LockBufHdr
	mov	x1, x0
Lloh4:
	adrp	x23, _BM_IO_IN_PROGRESS@GOTPAGE
Lloh5:
	ldr	x23, [x23, _BM_IO_IN_PROGRESS@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_UnlockBufHdr
	mov	x0, x19
	bl	_BufferDescriptorGetIOLock
	bl	_LWLockRelease
	mov	x0, x19
	bl	_WaitIO
	mov	x0, x19
	bl	_BufferDescriptorGetIOLock
	ldr	w1, [x22]
	bl	_LWLockAcquire
	mov	x0, x19
	bl	_LockBufHdr
	mov	x1, x0
	b	LBB0_1
LBB0_3:
	cbz	w20, LBB0_6
; %bb.4:
Lloh6:
	adrp	x9, _BM_VALID@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BM_VALID@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w1
	b.eq	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_UnlockBufHdr
	mov	x0, x19
	bl	_BufferDescriptorGetIOLock
	bl	_LWLockRelease
	mov	w0, #0
	b	LBB0_8
LBB0_6:
Lloh9:
	adrp	x9, _BM_DIRTY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BM_DIRTY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w1
	b.eq	LBB0_5
LBB0_7:
	orr	w1, w8, w1
	mov	x0, x19
	bl	_UnlockBufHdr
	str	x19, [x21]
Lloh12:
	adrp	x8, _IsForInput@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IsForInput@GOTPAGEOFF]
Lloh14:
	str	w20, [x8]
	mov	w0, #1
LBB0_8:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_InProgressBuf,8,3              ; @InProgressBuf
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_BM_IO_IN_PROGRESS,4,2          ; @BM_IO_IN_PROGRESS
	.comm	_BM_VALID,4,2                   ; @BM_VALID
	.comm	_BM_DIRTY,4,2                   ; @BM_DIRTY
	.comm	_IsForInput,4,2                 ; @IsForInput
	.no_dead_strip	_StartBufferIO
.subsections_via_symbols
