	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ca8210_remove
_ca8210_remove:                         ## @ca8210_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, %r15
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
	movq	8(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	cmpq	$0, 8(%rbx)
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_ca8210_unregister_ext_clock
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ca8210_config_extern_clk
LBB0_3:
	movl	(%rbx), %edi
	movl	(%r15), %esi
	callq	_free_irq
	movq	%rbx, %rdi
	callq	_kfree
	movq	$0, 8(%r15)
LBB0_4:
	movq	%r15, %rdi
	callq	_spi_get_drvdata
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movq	%rax, %r14
	movl	16(%rax), %ecx
	movl	20(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movl	(%r15), %edi
	callq	_ca8210_dev_com_clear
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.6:
	cmpq	$0, 8(%r14)
	je	LBB0_8
## %bb.7:
	callq	_ieee802154_unregister_hw
	movq	(%r14), %rdi
LBB0_8:
	callq	_ieee802154_free_hw
	movq	$0, (%r14)
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_info
LBB0_9:
	movq	_CONFIG_IEEE802154_CA8210_DEBUGFS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_ca8210_test_interface_clear
LBB0_11:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Removing ca8210\n"

L_.str.1:                               ## @.str.1
	.asciz	"sync_down = %d, sync_up = %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unregistered & freed ieee802154_hw.\n"

	.comm	_CONFIG_IEEE802154_CA8210_DEBUGFS,4,2 ## @CONFIG_IEEE802154_CA8210_DEBUGFS
	.no_dead_strip	_ca8210_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ca8210_remove
_ca8210_remove:                         ; @ca8210_remove
	.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
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	ldr	x20, [x19, #8]
	cbz	x20, LBB0_4
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ca8210_unregister_ext_clock
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_ca8210_config_extern_clk
LBB0_3:
	ldr	w0, [x20]
	ldr	w1, [x19]
	bl	_free_irq
	mov	x0, x20
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_4:
	mov	x0, x19
	bl	_spi_get_drvdata
	cbz	x0, LBB0_11
; %bb.5:
	mov	x20, x0
	ldp	w9, w8, [x0, #16]
	stp	x8, x9, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	w0, [x19]
	bl	_ca8210_dev_com_clear
	ldr	x0, [x20]
	cbz	x0, LBB0_9
; %bb.6:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
; %bb.7:
	bl	_ieee802154_unregister_hw
	ldr	x0, [x20]
LBB0_8:
	bl	_ieee802154_free_hw
	str	xzr, [x20]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_info
LBB0_9:
Lloh6:
	adrp	x8, _CONFIG_IEEE802154_CA8210_DEBUGFS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CONFIG_IEEE802154_CA8210_DEBUGFS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_ca8210_test_interface_clear
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Removing ca8210\n"

l_.str.1:                               ; @.str.1
	.asciz	"sync_down = %d, sync_up = %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unregistered & freed ieee802154_hw.\n"

	.comm	_CONFIG_IEEE802154_CA8210_DEBUGFS,4,2 ; @CONFIG_IEEE802154_CA8210_DEBUGFS
	.no_dead_strip	_ca8210_remove
.subsections_via_symbols
