	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flush_pending_writes
_flush_pending_writes:                  ## @flush_pending_writes
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_spin_lock_irq
	cmpq	$0, 32(%r14)
	je	LBB0_10
## %bb.1:
	leaq	32(%r14), %rdi
	callq	_bio_list_get
	movq	%rax, %rbx
	leaq	24(%r14), %rdi
	callq	_plugger_remove_plug
	movq	$0, 16(%r14)
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_bitmap_unplug
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_wake_up
	movl	$1, %r14d
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.2:
	movq	_BIO_DISCARD@GOTPCREL(%rip), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	callq	_generic_make_request
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rbx
	testq	%r12, %r12
	je	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %r12
	movq	$0, 8(%rbx)
	movl	(%r15), %eax
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%rbx), %edi
	callq	_bdev_get_queue
	movl	%eax, %edi
	callq	_blk_queue_discard
	testl	%eax, %eax
	sete	%al
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%al, %edi
	callq	_unlikely
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%esi, %esi
	callq	_bio_endio
	jmp	LBB0_9
LBB0_10:
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BIO_DISCARD,4,2                ## @BIO_DISCARD
	.no_dead_strip	_flush_pending_writes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flush_pending_writes
_flush_pending_writes:                  ; @flush_pending_writes
	.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, x0
	bl	_spin_lock_irq
	mov	x0, x20
	ldr	x8, [x0, #32]!
	cbz	x8, LBB0_9
; %bb.1:
	bl	_bio_list_get
	mov	x19, x0
	add	x0, x20, #24
	bl	_plugger_remove_plug
	str	xzr, [x20, #16]
	mov	x0, x20
	bl	_spin_unlock_irq
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_bitmap_unplug
	add	x0, x20, #4
	bl	_wake_up
	cbz	x19, LBB0_8
; %bb.2:
Lloh0:
	adrp	x20, _BIO_DISCARD@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BIO_DISCARD@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #0
	bl	_unlikely
	cbz	x0, LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	w1, #0
	bl	_bio_endio
	mov	x19, x21
	cbz	x21, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x19, #8]
	str	xzr, [x19, #8]
	ldr	w8, [x19]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #4]
	bl	_bdev_get_queue
	bl	_blk_queue_discard
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_4
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_generic_make_request
	mov	x19, x21
	cbnz	x21, LBB0_5
LBB0_8:
	mov	w0, #1
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	bl	_spin_unlock_irq
	mov	w0, #0
LBB0_10:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_BIO_DISCARD,4,2                ; @BIO_DISCARD
	.no_dead_strip	_flush_pending_writes
.subsections_via_symbols
