	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nxp_nci_remove                 ## -- Begin function nxp_nci_remove
	.p2align	4, 0x90
_nxp_nci_remove:                        ## @nxp_nci_remove
	.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, %r14
	callq	_nci_get_drvdata
	movq	%rax, %rbx
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_NXP_NCI_MODE_FW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ESHUTDOWN@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	subl	(%rax), %esi
	movq	%r15, %rdi
	callq	_nxp_nci_fw_work_complete
LBB0_2:
	leaq	24(%rbx), %rdi
	callq	_cancel_work_sync
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	16(%r15), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	12(%r15), %edi
	movq	_NXP_NCI_MODE_COLD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	callq	*%rax
LBB0_4:
	movq	%r14, %rdi
	callq	_nci_unregister_device
	movq	%r14, %rdi
	callq	_nci_free_device
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NXP_NCI_MODE_FW,8,3            ## @NXP_NCI_MODE_FW
	.comm	_ESHUTDOWN,4,2                  ## @ESHUTDOWN
	.comm	_NXP_NCI_MODE_COLD,4,2          ## @NXP_NCI_MODE_COLD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nxp_nci_remove                 ; -- Begin function nxp_nci_remove
	.p2align	2
_nxp_nci_remove:                        ; @nxp_nci_remove
	.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	x19, x0
	bl	_nci_get_drvdata
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _NXP_NCI_MODE_FW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NXP_NCI_MODE_FW@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ESHUTDOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ESHUTDOWN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w1, w8
	mov	x0, x20
	bl	_nxp_nci_fw_work_complete
LBB0_2:
	add	x0, x20, #24
	bl	_cancel_work_sync
	add	x21, x20, #8
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x20, #12]
Lloh6:
	adrp	x9, _NXP_NCI_MODE_COLD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NXP_NCI_MODE_COLD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	blr	x8
LBB0_4:
	mov	x0, x19
	bl	_nci_unregister_device
	mov	x0, x19
	bl	_nci_free_device
	mov	x0, x21
	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
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NXP_NCI_MODE_FW,8,3            ; @NXP_NCI_MODE_FW
	.comm	_ESHUTDOWN,4,2                  ; @ESHUTDOWN
	.comm	_NXP_NCI_MODE_COLD,4,2          ; @NXP_NCI_MODE_COLD
.subsections_via_symbols
