	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcache_device_free
_bcache_device_free:                    ## @bcache_device_free
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_bch_register_lock@GOTPCREL(%rip), %rdi
	callq	_lockdep_assert_held
	movq	16(%rbx), %rax
	movl	16(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	cmpq	$0, 24(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_bcache_device_detach
LBB0_2:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.3:
	movq	_GENHD_FL_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_5
## %bb.4:
	callq	_del_gendisk
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
LBB0_5:
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, %rdi
	callq	_blk_cleanup_queue
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
LBB0_7:
	movl	4(%rdi), %edi
	callq	_first_minor_to_idx
	movq	_bcache_device_idx@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	callq	_ida_simple_remove
	movq	16(%rbx), %rdi
	callq	_put_disk
LBB0_8:
	leaq	12(%rbx), %rdi
	callq	_bioset_exit
	movl	8(%rbx), %edi
	callq	_kvfree
	movl	4(%rbx), %edi
	callq	_kvfree
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_closure_debug_destroy          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_bch_register_lock,4,2          ## @bch_register_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s stopped"

	.comm	_GENHD_FL_UP,4,2                ## @GENHD_FL_UP
	.comm	_bcache_device_idx,4,2          ## @bcache_device_idx
	.no_dead_strip	_bcache_device_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcache_device_free
_bcache_device_free:                    ; @bcache_device_free
	.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
Lloh0:
	adrp	x0, _bch_register_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _bch_register_lock@GOTPAGEOFF]
	bl	_lockdep_assert_held
	ldr	x8, [x19, #16]
	ldr	w1, [x8, #16]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_bcache_device_detach
LBB0_2:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.3:
	ldr	w8, [x0]
Lloh4:
	adrp	x9, _GENHD_FL_UP@GOTPAGE
Lloh5:
	ldr	x9, [x9, _GENHD_FL_UP@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	bl	_del_gendisk
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_8
LBB0_5:
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x8
	bl	_blk_cleanup_queue
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_8
LBB0_7:
	ldr	w0, [x0, #4]
	bl	_first_minor_to_idx
	mov	x1, x0
Lloh7:
	adrp	x0, _bcache_device_idx@GOTPAGE
Lloh8:
	ldr	x0, [x0, _bcache_device_idx@GOTPAGEOFF]
	bl	_ida_simple_remove
	ldr	x0, [x19, #16]
	bl	_put_disk
LBB0_8:
	add	x0, x19, #12
	bl	_bioset_exit
	ldr	w0, [x19, #8]
	bl	_kvfree
	ldr	w0, [x19, #4]
	bl	_kvfree
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_closure_debug_destroy
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_bch_register_lock,4,2          ; @bch_register_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s stopped"

	.comm	_GENHD_FL_UP,4,2                ; @GENHD_FL_UP
	.comm	_bcache_device_idx,4,2          ; @bcache_device_idx
	.no_dead_strip	_bcache_device_free
.subsections_via_symbols
