	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function bt3c_pccard_detach
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_bt3c_pccard_detach:                    ## @bt3c_pccard_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movslq	%eax, %rbx
	movq	64(%rbx), %rdi
	callq	_swi_remove
	movq	$0, 64(%rbx)
	movq	48(%rbx), %rsi
	movq	56(%rbx), %rdx
	movl	%r14d, %edi
	callq	_bus_teardown_intr
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	40(%rbx), %rdx
	movq	48(%rbx), %rcx
	movl	%r14d, %edi
	callq	_bus_release_resource
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rbx)
	movq	$0, 56(%rbx)
	movq	_SYS_RES_IOPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%rbx), %rdx
	movq	32(%rbx), %rcx
	movl	%r14d, %edi
	callq	_bus_release_resource
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	xorl	%esi, %esi
	callq	_NG_NODE_SET_PRIVATE
	movq	16(%rbx), %rdi
	callq	_ng_rmnode_self
	movq	$0, 16(%rbx)
LBB0_3:
	movl	8(%rbx), %edi
	callq	_NG_FREE_M
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_IF_DRAIN
	movq	%rbx, %rdi
	callq	_IF_DRAIN
	movq	%r14, %rdi
	callq	_mtx_destroy
	movq	%rbx, %rdi
	callq	_mtx_destroy
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_SYS_RES_IOPORT,4,2             ## @SYS_RES_IOPORT
	.no_dead_strip	_bt3c_pccard_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bt3c_pccard_detach
_bt3c_pccard_detach:                    ; @bt3c_pccard_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	x20, x0
	bl	_device_get_softc
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_4
; %bb.1:
	sxtw	x19, w0
	ldr	x0, [x19, #64]
	bl	_swi_remove
	str	xzr, [x19, #64]
	ldp	x1, x2, [x19, #48]
	mov	x0, x20
	bl	_bus_teardown_intr
Lloh0:
	adrp	x8, _SYS_RES_IRQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	x2, x3, [x19, #40]
	mov	x0, x20
	bl	_bus_release_resource
	stp	xzr, xzr, [x19, #48]
	str	xzr, [x19, #40]
Lloh3:
	adrp	x8, _SYS_RES_IOPORT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYS_RES_IOPORT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldp	x2, x3, [x19, #24]
	mov	x0, x20
	bl	_bus_release_resource
	stp	xzr, xzr, [x19, #24]
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x1, #0
	bl	_NG_NODE_SET_PRIVATE
	ldr	x0, [x19, #16]
	bl	_ng_rmnode_self
	str	xzr, [x19, #16]
LBB0_3:
	ldr	w0, [x19, #8]
	bl	_NG_FREE_M
	add	x20, x19, #4
	mov	x0, x20
	bl	_IF_DRAIN
	mov	x0, x19
	bl	_IF_DRAIN
	mov	x0, x20
	bl	_mtx_destroy
	mov	x0, x19
	bl	_mtx_destroy
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_SYS_RES_IOPORT,4,2             ; @SYS_RES_IOPORT
	.no_dead_strip	_bt3c_pccard_detach
.subsections_via_symbols
