	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ffs_rawread_sync
_ffs_rawread_sync:                      ## @ffs_rawread_sync
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_BO_LOCK
	movq	%r12, %rdi
	callq	_VI_LOCK
	cmpq	$0, 8(%r12)
	jg	LBB0_4
## %bb.1:
	cmpq	$0, 16(%r12)
	jle	LBB0_2
LBB0_4:
	movq	%r12, %rdi
	callq	_VI_UNLOCK
	movq	%r14, %rdi
	callq	_BO_UNLOCK
	movq	_V_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rsi
	movq	%r12, %rdi
	callq	_vn_start_write
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_VOP_ISLOCKED
	movq	_LK_EXCLUSIVE@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.5:
	xorl	%ebx, %ebx
	cmpq	%rcx, %rax
	setne	%bl
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_VOP_UNLOCK
	movq	_V_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rsi
	movq	%r12, %rdi
	callq	_vn_start_write
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
	cmpq	%rcx, %rax
	je	LBB0_9
## %bb.7:
	movl	$1, %ebx
	movq	_LK_UPGRADE@GOTPCREL(%rip), %r15
LBB0_8:
	movq	(%r15), %rsi
	movq	%r12, %rdi
	callq	_VOP_LOCK
LBB0_9:
	movq	%r12, %rdi
	callq	_VI_LOCK
	movq	_VI_DOOMED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.10:
	movq	%r12, %rdi
	callq	_VI_UNLOCK
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.11:
	movq	_LK_DOWNGRADE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_VOP_LOCK
LBB0_12:
	movq	-40(%rbp), %rdi
	callq	_vn_finished_write
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_33
LBB0_13:
	movq	24(%r12), %r15
	testq	%r15, %r15
	je	LBB0_16
## %bb.14:
	movq	%r15, %rdi
	callq	_vm_object_mightbedirty
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%r12, %rdi
	callq	_VI_UNLOCK
	movq	%r15, %rdi
	callq	_VM_OBJECT_WLOCK
	movq	_OBJPC_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_vm_object_page_clean
	movq	%r15, %rdi
	callq	_VM_OBJECT_WUNLOCK
	jmp	LBB0_17
LBB0_16:
	movq	%r12, %rdi
	callq	_VI_UNLOCK
LBB0_17:
	movq	%r14, %rdi
	callq	_BO_LOCK
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_bufobj_wwait
	testl	%eax, %eax
	je	LBB0_22
## %bb.18:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_BO_UNLOCK
	testl	%ebx, %ebx
	je	LBB0_21
LBB0_20:
	movq	_LK_DOWNGRADE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_VOP_LOCK
LBB0_21:
	movq	-40(%rbp), %rdi
	callq	_vn_finished_write
	jmp	LBB0_33
LBB0_2:
	movq	24(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_31
## %bb.3:
	callq	_vm_object_mightbedirty
	testq	%rax, %rax
	jne	LBB0_4
LBB0_31:
	movq	%r12, %rdi
	callq	_VI_UNLOCK
	movq	%r14, %rdi
	callq	_BO_UNLOCK
	jmp	LBB0_32
LBB0_22:
	cmpq	$0, 16(%r12)
	jle	LBB0_28
## %bb.23:
	movq	%r14, %rdi
	callq	_BO_UNLOCK
	movq	_MNT_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_ffs_syncvnode
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	movl	%eax, %r15d
	testl	%ebx, %ebx
	jne	LBB0_20
	jmp	LBB0_21
LBB0_25:
	movq	%r14, %rdi
	callq	_BO_LOCK
	cmpq	$0, (%r14)
	jg	LBB0_27
## %bb.26:
	cmpq	$0, 16(%r12)
	jle	LBB0_28
LBB0_27:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_28:
	movq	%r14, %rdi
	callq	_BO_UNLOCK
	testl	%ebx, %ebx
	je	LBB0_30
## %bb.29:
	movq	_LK_DOWNGRADE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_VOP_LOCK
LBB0_30:
	movq	-40(%rbp), %rdi
	callq	_vn_finished_write
LBB0_32:
	xorl	%r15d, %r15d
LBB0_33:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V_NOWAIT,4,2                   ## @V_NOWAIT
	.comm	_LK_EXCLUSIVE,8,3               ## @LK_EXCLUSIVE
	.comm	_V_WAIT,4,2                     ## @V_WAIT
	.comm	_LK_UPGRADE,8,3                 ## @LK_UPGRADE
	.comm	_VI_DOOMED,4,2                  ## @VI_DOOMED
	.comm	_LK_DOWNGRADE,8,3               ## @LK_DOWNGRADE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_OBJPC_SYNC,4,2                 ## @OBJPC_SYNC
	.comm	_MNT_WAIT,4,2                   ## @MNT_WAIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ffs_rawread_sync: dirty bufs"

	.no_dead_strip	_ffs_rawread_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ffs_rawread_sync
_ffs_rawread_sync:                      ; @ffs_rawread_sync
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_BO_LOCK
	mov	x0, x19
	bl	_VI_LOCK
	ldr	x8, [x19, #8]
	cmp	x8, #0
	b.gt	LBB0_2
; %bb.1:
	ldr	x8, [x19, #16]
	cmp	x8, #0
	b.le	LBB0_20
LBB0_2:
	mov	x0, x19
	bl	_VI_UNLOCK
	mov	x0, x20
	bl	_BO_UNLOCK
Lloh0:
	adrp	x8, _V_NOWAIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V_NOWAIT@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_vn_start_write
	mov	x21, x0
	mov	x0, x19
	bl	_VOP_ISLOCKED
Lloh3:
	adrp	x8, _LK_EXCLUSIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LK_EXCLUSIVE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	cbz	x21, LBB0_4
; %bb.3:
	cset	w22, ne
	mov	x0, x19
	mov	w1, #0
	bl	_VOP_UNLOCK
Lloh6:
	adrp	x8, _V_WAIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V_WAIT@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_vn_start_write
Lloh9:
	adrp	x8, _LK_EXCLUSIVE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LK_EXCLUSIVE@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	b.ne	LBB0_6
; %bb.5:
	mov	w22, #0
	b	LBB0_8
LBB0_6:
	mov	w22, #1
Lloh11:
	adrp	x8, _LK_UPGRADE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LK_UPGRADE@GOTPAGEOFF]
LBB0_7:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_VOP_LOCK
LBB0_8:
	mov	x0, x19
	bl	_VI_LOCK
	ldr	w8, [x19]
Lloh13:
	adrp	x9, _VI_DOOMED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _VI_DOOMED@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.9:
	mov	x0, x19
	bl	_VI_UNLOCK
	cbz	w22, LBB0_11
; %bb.10:
Lloh16:
	adrp	x8, _LK_DOWNGRADE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LK_DOWNGRADE@GOTPAGEOFF]
Lloh18:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_VOP_LOCK
LBB0_11:
	ldr	x0, [sp, #8]
	bl	_vn_finished_write
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w21, [x8]
	b	LBB0_33
LBB0_12:
	ldr	x21, [x19, #24]
	cbz	x21, LBB0_15
; %bb.13:
	mov	x0, x21
	bl	_vm_object_mightbedirty
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_VI_UNLOCK
	mov	x0, x21
	bl	_VM_OBJECT_WLOCK
Lloh22:
	adrp	x8, _OBJPC_SYNC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _OBJPC_SYNC@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	bl	_vm_object_page_clean
	mov	x0, x21
	bl	_VM_OBJECT_WUNLOCK
	b	LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_VI_UNLOCK
LBB0_16:
	mov	x0, x20
	bl	_BO_LOCK
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	bl	_bufobj_wwait
	cbz	w0, LBB0_23
; %bb.17:
	mov	x21, x0
	mov	x0, x20
	bl	_BO_UNLOCK
	cbz	w22, LBB0_19
LBB0_18:
Lloh25:
	adrp	x8, _LK_DOWNGRADE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LK_DOWNGRADE@GOTPAGEOFF]
Lloh27:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_VOP_LOCK
LBB0_19:
	ldr	x0, [sp, #8]
	bl	_vn_finished_write
	b	LBB0_33
LBB0_20:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_22
; %bb.21:
	bl	_vm_object_mightbedirty
	cbnz	x0, LBB0_2
LBB0_22:
	mov	x0, x19
	bl	_VI_UNLOCK
	mov	x0, x20
	bl	_BO_UNLOCK
	b	LBB0_32
LBB0_23:
	ldr	x8, [x19, #16]
	cmp	x8, #1
	b.lt	LBB0_29
; %bb.24:
	mov	x0, x20
	bl	_BO_UNLOCK
Lloh28:
	adrp	x8, _MNT_WAIT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MNT_WAIT@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_ffs_syncvnode
	cbz	w0, LBB0_26
; %bb.25:
	mov	x21, x0
	cbnz	w22, LBB0_18
	b	LBB0_19
LBB0_26:
	mov	x0, x20
	bl	_BO_LOCK
	ldr	x8, [x20]
	cmp	x8, #0
	b.gt	LBB0_28
; %bb.27:
	ldr	x8, [x19, #16]
	cmp	x8, #1
	b.lt	LBB0_29
LBB0_28:
Lloh31:
	adrp	x0, l_.str@PAGE
Lloh32:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_29:
	mov	x0, x20
	bl	_BO_UNLOCK
	cbz	w22, LBB0_31
; %bb.30:
Lloh33:
	adrp	x8, _LK_DOWNGRADE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _LK_DOWNGRADE@GOTPAGEOFF]
Lloh35:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_VOP_LOCK
LBB0_31:
	ldr	x0, [sp, #8]
	bl	_vn_finished_write
LBB0_32:
	mov	w21, #0
LBB0_33:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_V_NOWAIT,4,2                   ; @V_NOWAIT
	.comm	_LK_EXCLUSIVE,8,3               ; @LK_EXCLUSIVE
	.comm	_V_WAIT,4,2                     ; @V_WAIT
	.comm	_LK_UPGRADE,8,3                 ; @LK_UPGRADE
	.comm	_VI_DOOMED,4,2                  ; @VI_DOOMED
	.comm	_LK_DOWNGRADE,8,3               ; @LK_DOWNGRADE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_OBJPC_SYNC,4,2                 ; @OBJPC_SYNC
	.comm	_MNT_WAIT,4,2                   ; @MNT_WAIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ffs_rawread_sync: dirty bufs"

	.no_dead_strip	_ffs_rawread_sync
.subsections_via_symbols
