	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___pblk_pipeline_flush          ## -- Begin function __pblk_pipeline_flush
	.p2align	4, 0x90
___pblk_pipeline_flush:                 ## @__pblk_pipeline_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	(%rbx), %rcx
	movq	_PBLK_STATE_RECOVERING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	je	LBB0_4
## %bb.1:
	movq	_PBLK_STATE_STOPPED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.2:
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_pblk_disk_name
	movq	(%rbx), %rsi
	movl	%eax, %edi
	callq	_trace_pblk_state
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_pblk_flush_writer
	movq	%rbx, %rdi
	callq	_pblk_wait_for_meta
	movq	%rbx, %rdi
	callq	_pblk_recov_pad
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pblk_err                       ## TAILCALL
LBB0_4:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
LBB0_3:
	movl	8(%rbx), %edi
	callq	_flush_workqueue
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pblk_line_close_meta_sync      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PBLK_STATE_RECOVERING,8,3      ## @PBLK_STATE_RECOVERING
	.comm	_PBLK_STATE_STOPPED,8,3         ## @PBLK_STATE_STOPPED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not close data on teardown(%d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___pblk_pipeline_flush          ; -- Begin function __pblk_pipeline_flush
	.p2align	2
___pblk_pipeline_flush:                 ; @__pblk_pipeline_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
	mov	x19, x0
	add	x20, x0, #12
	mov	x0, x20
	bl	_spin_lock
	ldr	x9, [x19]
Lloh0:
	adrp	x8, _PBLK_STATE_RECOVERING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PBLK_STATE_RECOVERING@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _PBLK_STATE_STOPPED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PBLK_STATE_STOPPED@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x8
	ccmp	x9, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_spin_unlock
LBB0_2:
	str	x8, [x19]
	mov	x0, x19
	bl	_pblk_disk_name
	ldr	x1, [x19]
	bl	_trace_pblk_state
	mov	x0, x20
	bl	_spin_unlock
	mov	x0, x19
	bl	_pblk_flush_writer
	mov	x0, x19
	bl	_pblk_wait_for_meta
	mov	x0, x19
	bl	_pblk_recov_pad
	cbz	w0, LBB0_4
; %bb.3:
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pblk_err
LBB0_4:
	ldr	w0, [x19, #8]
	bl	_flush_workqueue
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pblk_line_close_meta_sync
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PBLK_STATE_RECOVERING,8,3      ; @PBLK_STATE_RECOVERING
	.comm	_PBLK_STATE_STOPPED,8,3         ; @PBLK_STATE_STOPPED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not close data on teardown(%d)\n"

.subsections_via_symbols
