	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_remove_interface
_ath5k_remove_interface:                ## @ath5k_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rdi), %r14
	movq	(%rsi), %r15
	movq	%r14, %rdi
	callq	_mutex_lock
	decl	28(%r14)
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.1:
	movq	%r14, %rdi
	callq	_ath5k_txbuf_free_skb
	movq	8(%r15), %rdi
	leaq	24(%r14), %rsi
	callq	_list_add_tail
	movq	_ATH_BCBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	16(%r14), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%rcx,%rdx,8)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_3
	jmp	LBB0_6
LBB0_4:
	movq	$0, (%rcx,%rdx,8)
LBB0_6:
	movq	$0, 8(%r15)
LBB0_7:
	movq	(%r15), %rax
	movq	_NL80211_IFTYPE_AP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	decl	12(%r14)
	jmp	LBB0_13
LBB0_9:
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	decl	8(%r14)
	jmp	LBB0_13
LBB0_11:
	movq	_NL80211_IFTYPE_MESH_POINT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	decl	4(%r14)
LBB0_13:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ath5k_update_bssid_mask_and_opmode
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH_BCBUF,4,2                  ## @ATH_BCBUF
	.comm	_NL80211_IFTYPE_AP,8,3          ## @NL80211_IFTYPE_AP
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ## @NL80211_IFTYPE_ADHOC
	.comm	_NL80211_IFTYPE_MESH_POINT,8,3  ## @NL80211_IFTYPE_MESH_POINT
	.no_dead_strip	_ath5k_remove_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_remove_interface
_ath5k_remove_interface:                ; @ath5k_remove_interface
	.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	x20, x1
	ldr	x19, [x0]
	ldr	x21, [x1]
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x19, #28]
	sub	w8, w8, #1
	str	w8, [x19, #28]
	ldr	x1, [x21, #8]
	cbz	x1, LBB0_7
; %bb.1:
	mov	x0, x19
	bl	_ath5k_txbuf_free_skb
	ldr	x0, [x21, #8]
	add	x1, x19, #24
	bl	_list_add_tail
Lloh0:
	adrp	x8, _ATH_BCBUF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH_BCBUF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	x9, [x19, #16]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cmp	x10, x20
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_3
	b	LBB0_6
LBB0_5:
	str	xzr, [x9]
LBB0_6:
	str	xzr, [x21, #8]
LBB0_7:
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _NL80211_IFTYPE_AP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NL80211_IFTYPE_AP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	ldr	w8, [x19, #12]
	sub	w8, w8, #1
	str	w8, [x19, #12]
	b	LBB0_13
LBB0_9:
Lloh6:
	adrp	x9, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	ldr	w8, [x19, #8]
	sub	w8, w8, #1
	str	w8, [x19, #8]
	b	LBB0_13
LBB0_11:
Lloh9:
	adrp	x9, _NL80211_IFTYPE_MESH_POINT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NL80211_IFTYPE_MESH_POINT@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	str	w8, [x19, #4]
LBB0_13:
	mov	x0, x19
	mov	x1, #0
	bl	_ath5k_update_bssid_mask_and_opmode
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH_BCBUF,4,2                  ; @ATH_BCBUF
	.comm	_NL80211_IFTYPE_AP,8,3          ; @NL80211_IFTYPE_AP
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ; @NL80211_IFTYPE_ADHOC
	.comm	_NL80211_IFTYPE_MESH_POINT,8,3  ; @NL80211_IFTYPE_MESH_POINT
	.no_dead_strip	_ath5k_remove_interface
.subsections_via_symbols
