	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcache_device_detach
_bcache_device_detach:                  ## @bcache_device_detach
	.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
	movq	%rdi, %rbx
	movq	_bch_register_lock@GOTPCREL(%rip), %rdi
	callq	_lockdep_assert_held
	movq	8(%rbx), %rdi
	addq	$24, %rdi
	callq	_atomic_dec
	movq	_BCACHE_DEV_DETACHING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%rbx), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	movq	16(%rax), %r14
	movslq	(%rbx), %r15
	leaq	(%r14,%r15,8), %rdi
	xorl	%esi, %esi
	callq	_SET_UUID_FLASH_ONLY
	movl	4(%r14,%r15,8), %edi
	movq	_invalid_uuid@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edx
	callq	_memcpy
	xorl	%eax, %eax
	callq	_ktime_get_real_seconds
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, (%r14,%r15,8)
	movq	8(%rbx), %rdi
	callq	_bch_uuid_write
LBB0_2:
	movq	%rbx, %rdi
	callq	_bcache_device_unlink
	movq	8(%rbx), %rax
	movq	8(%rax), %rax
	movslq	(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	8(%rbx), %rdi
	callq	_closure_put
	movq	$0, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bch_register_lock,4,2          ## @bch_register_lock
	.comm	_BCACHE_DEV_DETACHING,4,2       ## @BCACHE_DEV_DETACHING
	.comm	_invalid_uuid,4,2               ## @invalid_uuid
	.no_dead_strip	_bcache_device_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcache_device_detach
_bcache_device_detach:                  ; @bcache_device_detach
	.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, #8]
	add	x0, x8, #24
	bl	_atomic_dec
Lloh2:
	adrp	x8, _BCACHE_DEV_DETACHING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BCACHE_DEV_DETACHING@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
	ldrsw	x9, [x19]
	add	x20, x8, x9, lsl #3
	mov	x0, x20
	mov	w1, #0
	bl	_SET_UUID_FLASH_ONLY
	ldr	w0, [x20, #4]
Lloh5:
	adrp	x8, _invalid_uuid@GOTPAGE
Lloh6:
	ldr	x8, [x8, _invalid_uuid@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #16
	bl	_memcpy
	bl	_ktime_get_real_seconds
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_cpu_to_le32
	str	w0, [x20]
	ldr	x0, [x19, #8]
	bl	_bch_uuid_write
LBB0_2:
	mov	x0, x19
	bl	_bcache_device_unlink
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldrsw	x9, [x19]
	str	xzr, [x8, x9, lsl #3]
	ldr	x0, [x19, #8]
	bl	_closure_put
	str	xzr, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_bch_register_lock,4,2          ; @bch_register_lock
	.comm	_BCACHE_DEV_DETACHING,4,2       ; @BCACHE_DEV_DETACHING
	.comm	_invalid_uuid,4,2               ; @invalid_uuid
	.no_dead_strip	_bcache_device_detach
.subsections_via_symbols
