	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carl9170_op_remove_interface
_carl9170_op_remove_interface:          ## @carl9170_op_remove_interface
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	(%rsi), %r15
	movq	(%rdi), %rbx
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	xorl	%edi, %edi
	cmpl	$0, (%r15)
	sete	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	decl	(%rbx)
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movq	%rbx, %rdi
	callq	_carl9170_get_main_vif
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r15), %r13d
	movl	8(%r15), %edi
	movl	$0, (%r15)
	callq	_WARN_ON
	movl	$0, 8(%r15)
	leaq	24(%r15), %rdi
	callq	_list_del_rcu
	movq	24(%rbx), %rax
	movl	(%rax,%r13,4), %edi
	xorl	%esi, %esi
	callq	_RCU_INIT_POINTER
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	cmpq	%r12, -48(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_2
## %bb.5:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_carl9170_mod_virtual_mac
	jmp	LBB0_6
LBB0_2:
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_carl9170_get_main_vif
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_carl9170_init_interface
LBB0_6:
	movl	%eax, %edi
	callq	_WARN_ON
LBB0_7:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_carl9170_update_beacon
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_carl9170_flush_cab
	leaq	16(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_bh
	movq	16(%r15), %rdi
	callq	_dev_kfree_skb_any
	movq	$0, 16(%r15)
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	leaq	12(%rbx), %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_bitmap_release_region
	movq	%rbx, %rdi
	callq	_carl9170_set_beacon_timers
	cmpl	$1, (%rbx)
	jne	LBB0_9
## %bb.8:
	movq	_PS_OFF_VIF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 8(%rbx)
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_synchronize_rcu                ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	callq	_carl9170_set_operating_mode
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_PS_OFF_VIF,4,2                 ## @PS_OFF_VIF
	.no_dead_strip	_carl9170_op_remove_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carl9170_op_remove_interface
_carl9170_op_remove_interface:          ; @carl9170_op_remove_interface
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	ldr	x24, [x1]
	ldr	x20, [x0]
	add	x19, x20, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x24]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_8
; %bb.1:
	ldr	w8, [x20]
	sub	w8, w8, #1
	str	w8, [x20]
	bl	_rcu_read_lock
	mov	x0, x20
	bl	_carl9170_get_main_vif
	mov	x23, x0
	str	wzr, [x24]
	ldp	w21, w0, [x24, #4]
	bl	_WARN_ON
	str	wzr, [x24, #8]
	add	x0, x24, #24
	bl	_list_del_rcu
	ldr	x8, [x20, #24]
	ldr	w0, [x8, x21, lsl #2]
	mov	x1, #0
	bl	_RCU_INIT_POINTER
	bl	_rcu_read_unlock
	cmp	x23, x22
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	mov	x2, #0
	bl	_carl9170_mod_virtual_mac
	b	LBB0_5
LBB0_3:
	ldr	w8, [x20]
	cbz	w8, LBB0_9
; %bb.4:
	mov	x0, x20
	bl	_carl9170_get_main_vif
	mov	x1, x0
	mov	x0, x20
	bl	_carl9170_init_interface
LBB0_5:
	bl	_WARN_ON
LBB0_6:
	mov	x0, x20
	mov	w1, #0
	bl	_carl9170_update_beacon
	mov	x0, x20
	mov	x1, x21
	bl	_carl9170_flush_cab
	add	x22, x20, #16
	mov	x0, x22
	bl	_spin_lock_bh
	ldr	x0, [x24, #16]
	bl	_dev_kfree_skb_any
	str	xzr, [x24, #16]
	mov	x0, x22
	bl	_spin_unlock_bh
	add	x0, x20, #12
	mov	x1, x21
	mov	w2, #0
	bl	_bitmap_release_region
	mov	x0, x20
	bl	_carl9170_set_beacon_timers
	ldr	w8, [x20]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.7:
Lloh0:
	adrp	x8, _PS_OFF_VIF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PS_OFF_VIF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	bic	w8, w9, w8
	str	w8, [x20, #8]
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_synchronize_rcu
LBB0_9:
	mov	x0, x20
	bl	_carl9170_set_operating_mode
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PS_OFF_VIF,4,2                 ; @PS_OFF_VIF
	.no_dead_strip	_carl9170_op_remove_interface
.subsections_via_symbols
