	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __delete_device
___delete_device:                       ## @__delete_device
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	%esi, -12(%rbp)
	leaq	-24(%rbp), %rcx
	xorl	%edx, %edx
	callq	___open_device
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	-24(%rbp), %rdi
	cmpl	$2, (%rdi)
	jl	LBB0_3
## %bb.2:
	callq	___close_device
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_3:
	addq	$4, %rdi
	callq	_list_del
	movq	-24(%rbp), %rdi
	callq	_kfree
	leaq	12(%rbx), %rdi
	leaq	8(%rbx), %rcx
	movl	8(%rbx), %esi
	leaq	-12(%rbp), %rdx
	callq	_dm_btree_remove
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	leaq	4(%rbx), %rdi
	movl	(%rbx), %esi
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rcx
	callq	_dm_btree_remove
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	___delete_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __delete_device
___delete_device:                       ; @__delete_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	str	w1, [sp, #12]
	mov	x3, sp
	mov	w2, #0
	bl	___open_device
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x0, [sp]
	ldr	w8, [x0]
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.2:
	bl	___close_device
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	add	x0, x0, #4
	bl	_list_del
	ldr	x0, [sp]
	bl	_kfree
	mov	x3, x19
	ldr	w1, [x3, #8]!
	add	x0, x3, #4
	add	x2, sp, #12
	bl	_dm_btree_remove
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x19
	ldr	w1, [x0], #4
	add	x2, sp, #12
	mov	x3, x19
	bl	_dm_btree_remove
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	___delete_device
.subsections_via_symbols
