	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fw_core_remove_card            ## -- Begin function fw_core_remove_card
	.p2align	4, 0x90
_fw_core_remove_card:                   ## @fw_core_remove_card
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_dummy_driver_template@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -32(%rbp)
	movq	16(%rdi), %rax
	movq	_PHY_LINK_ACTIVE@GOTPCREL(%rip), %rcx
	movq	_PHY_CONTENDER@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	$4, %esi
	xorl	%ecx, %ecx
	callq	*8(%rax)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_fw_core_initiate_bus_reset
	movq	_card_mutex@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	24(%rbx), %rdi
	callq	_list_del_init
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	16(%rbx), %rax
	movl	4(%rax), %ecx
	movl	%ecx, -28(%rbp)
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_fw_destroy_nodes
	movq	%rbx, %rdi
	callq	_fw_card_put
	leaq	8(%rbx), %rdi
	callq	_wait_for_completion
	leaq	4(%rbx), %rdi
	callq	_list_empty
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	%rbx, %rdi
	callq	_del_timer_sync
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dummy_driver_template,16,3     ## @dummy_driver_template
	.comm	_PHY_LINK_ACTIVE,4,2            ## @PHY_LINK_ACTIVE
	.comm	_PHY_CONTENDER,4,2              ## @PHY_CONTENDER
	.comm	_card_mutex,4,2                 ## @card_mutex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fw_core_remove_card            ; -- Begin function fw_core_remove_card
	.p2align	2
_fw_core_remove_card:                   ; @fw_core_remove_card
	.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	x8, _dummy_driver_template@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dummy_driver_template@GOTPAGEOFF]
Lloh2:
	ldr	q0, [x8]
	str	q0, [sp]
	ldr	x8, [x0, #16]
Lloh3:
	adrp	x9, _PHY_LINK_ACTIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PHY_LINK_ACTIVE@GOTPAGEOFF]
	ldr	x8, [x8, #8]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _PHY_CONTENDER@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PHY_CONTENDER@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w2, w10, w9
	mov	w1, #4
	mov	w3, #0
	blr	x8
	mov	x0, x19
	mov	w1, #1
	bl	_fw_core_initiate_bus_reset
Lloh9:
	adrp	x20, _card_mutex@GOTPAGE
Lloh10:
	ldr	x20, [x20, _card_mutex@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #24
	bl	_list_del_init
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x8, [x19, #16]
	ldr	d0, [x8]
	str	d0, [sp]
	mov	x8, sp
	str	x8, [x19, #16]
	mov	x0, x19
	bl	_fw_destroy_nodes
	mov	x0, x19
	bl	_fw_card_put
	add	x0, x19, #8
	bl	_wait_for_completion
	add	x0, x19, #4
	bl	_list_empty
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	x0, x19
	bl	_del_timer_sync
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_dummy_driver_template,16,3     ; @dummy_driver_template
	.comm	_PHY_LINK_ACTIVE,4,2            ; @PHY_LINK_ACTIVE
	.comm	_PHY_CONTENDER,4,2              ; @PHY_CONTENDER
	.comm	_card_mutex,4,2                 ; @card_mutex
.subsections_via_symbols
