	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsi_mac80211_remove_interface
_rsi_mac80211_remove_interface:         ## @rsi_mac80211_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	(%rdi), %r13
	movq	16(%r13), %r14
	movq	_INFO_ZONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_rsi_dbg
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, (%r13)
	jle	LBB0_8
## %bb.1:
	movl	4(%r12), %edi
	callq	_rsi_map_intf_mode
	movl	%eax, %r15d
	movq	_RSI_OPMODE_UNSUPPORTED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_2
## %bb.9:
	movq	_ERR_ZONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_rsi_dbg
	jmp	LBB0_8
LBB0_2:
	movq	_RSI_MAX_VIFS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rcx
	movq	(%rcx,%rbx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r12, %rcx
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %edx
	movq	_VAP_DELETE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %ecx
	callq	_rsi_set_vap_capabilities
	decq	(%r13)
	movq	8(%r13), %rax
	movq	$0, (%rax,%rbx,8)
	movq	_RSI_MAX_VIFS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INFO_ZONE,4,2                  ## @INFO_ZONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Remove Interface Called\n"

	.comm	_RSI_OPMODE_UNSUPPORTED,4,2     ## @RSI_OPMODE_UNSUPPORTED
	.comm	_ERR_ZONE,4,2                   ## @ERR_ZONE
L_.str.1:                               ## @.str.1
	.asciz	"Opmode error : %d\n"

	.comm	_RSI_MAX_VIFS,4,2               ## @RSI_MAX_VIFS
	.comm	_VAP_DELETE,4,2                 ## @VAP_DELETE
	.no_dead_strip	_rsi_mac80211_remove_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsi_mac80211_remove_interface
_rsi_mac80211_remove_interface:         ; @rsi_mac80211_remove_interface
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	ldr	x23, [x0]
	ldr	x19, [x23, #16]
Lloh0:
	adrp	x8, _INFO_ZONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INFO_ZONE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_rsi_dbg
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.1:
	ldr	w0, [x20, #4]
	bl	_rsi_map_intf_mode
	mov	x21, x0
Lloh5:
	adrp	x8, _RSI_OPMODE_UNSUPPORTED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RSI_OPMODE_UNSUPPORTED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _ERR_ZONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERR_ZONE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	str	x21, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_rsi_dbg
	b	LBB0_8
LBB0_3:
Lloh13:
	adrp	x24, _RSI_MAX_VIFS@GOTPAGE
Lloh14:
	ldr	x24, [x24, _RSI_MAX_VIFS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x22, #0
Lloh15:
	adrp	x25, _VAP_DELETE@GOTPAGE
Lloh16:
	ldr	x25, [x25, _VAP_DELETE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23, #8]
	ldr	x9, [x9, x22, lsl #3]
	cmp	x9, #0
	ccmp	x9, x20, #0, ne
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w2, [x20]
	ldr	w4, [x25]
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	bl	_rsi_set_vap_capabilities
	ldp	x8, x9, [x23]
	sub	x8, x8, #1
	str	x8, [x23]
	str	xzr, [x9, x22, lsl #3]
	ldr	w8, [x24]
	b	LBB0_5
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_mutex_unlock
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_INFO_ZONE,4,2                  ; @INFO_ZONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Remove Interface Called\n"

	.comm	_RSI_OPMODE_UNSUPPORTED,4,2     ; @RSI_OPMODE_UNSUPPORTED
	.comm	_ERR_ZONE,4,2                   ; @ERR_ZONE
l_.str.1:                               ; @.str.1
	.asciz	"Opmode error : %d\n"

	.comm	_RSI_MAX_VIFS,4,2               ; @RSI_MAX_VIFS
	.comm	_VAP_DELETE,4,2                 ; @VAP_DELETE
	.no_dead_strip	_rsi_mac80211_remove_interface
.subsections_via_symbols
