	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_async_pmem_flush               ## -- Begin function async_pmem_flush
	.p2align	4, 0x90
_async_pmem_flush:                      ## @async_pmem_flush
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	%rsi, %rbx
	cmpl	$-1, (%rsi)
	je	LBB0_5
## %bb.2:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_bio_alloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_bio_copy_dev
	movq	_REQ_PREFLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movl	$-1, (%r15)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_bio_chain
	movq	%r15, %rdi
	callq	_submit_bio
	jmp	LBB0_9
LBB0_5:
	callq	_virtio_pmem_flush
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_REQ_PREFLUSH,4,2               ## @REQ_PREFLUSH
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_async_pmem_flush               ; -- Begin function async_pmem_flush
	.p2align	2
_async_pmem_flush:                      ; @async_pmem_flush
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x1, LBB0_4
; %bb.1:
	mov	x19, x1
	ldr	w8, [x1]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_bio_alloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x20, x0
	mov	x1, x19
	bl	_bio_copy_dev
Lloh3:
	adrp	x8, _REQ_PREFLUSH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REQ_PREFLUSH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #-1
	stp	w9, w8, [x20]
	mov	x0, x20
	mov	x1, x19
	bl	_bio_chain
	mov	x0, x20
	bl	_submit_bio
	mov	w0, #0
	b	LBB0_8
LBB0_4:
	bl	_virtio_pmem_flush
	cbz	x0, LBB0_8
; %bb.5:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_REQ_PREFLUSH,4,2               ; @REQ_PREFLUSH
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
