	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwl8k_add_interface
_mwl8k_add_interface:                   ## @mwl8k_add_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	%rdi, %r15
	movq	8(%rdi), %r12
	cmpq	$0, 32(%r12)
	je	LBB0_3
## %bb.1:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wiphy_info
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %r14
	movq	24(%r12), %rbx
	movl	(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_12
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_2
## %bb.5:
	cmpl	$0, 16(%r12)
	je	LBB0_6
LBB0_11:
	movq	%r12, %rax
	jmp	LBB0_18
LBB0_12:
	cmpl	$0, 16(%r12)
	je	LBB0_17
## %bb.13:
	cmpl	$0, (%rbx)
	je	LBB0_17
## %bb.14:
	leaq	12(%r12), %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_mwl8k_reload_firmware
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
	jmp	LBB0_17
LBB0_6:
	cmpl	$0, 4(%rbx)
	je	LBB0_11
## %bb.7:
	leaq	12(%r12), %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_8
## %bb.10:
	movl	4(%rbx), %esi
	movq	%r15, %rdi
	callq	_mwl8k_reload_firmware
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
	jmp	LBB0_11
LBB0_15:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wiphy_warn
LBB0_17:
	leaq	4(%r12), %rax
LBB0_18:
	movl	8(%r12), %ecx
	notl	%ecx
	andl	(%rax), %ecx
	je	LBB0_8
## %bb.19:
	bsfl	%ecx, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_MWL8K_VIF
	movq	%rax, %r13
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r14, 24(%r13)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
	movq	$0, 16(%r13)
	movl	12(%r13), %edi
	movl	4(%r14), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movl	$0, 4(%r13)
	movl	4(%r14), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mwl8k_cmd_set_mac_addr
	cmpl	$129, (%r14)
	jne	LBB0_21
## %bb.20:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mwl8k_cmd_set_new_stn_add_self
LBB0_21:
	movb	(%r13), %cl
	movl	$1, %eax
	shll	%cl, %eax
	orl	%eax, 8(%r12)
	addq	$8, %r13
	addq	$12, %r12
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_list_add_tail
	jmp	LBB0_22
LBB0_8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to create STA interface because sniffer mode is enabled\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"AP interface is running.\nAdding STA interface for WDS"

	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.no_dead_strip	_mwl8k_add_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwl8k_add_interface
_mwl8k_add_interface:                   ; @mwl8k_add_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	x20, x0
	ldr	x22, [x0, #8]
	ldr	x8, [x22, #32]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wiphy_info
LBB0_2:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
	ret
LBB0_5:
	mov	x19, x1
	ldr	x21, [x22, #24]
	ldr	w8, [x1]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #129
	b.ne	LBB0_2
; %bb.7:
	ldr	w8, [x22, #16]
	cbz	w8, LBB0_13
LBB0_8:
	mov	x8, x22
	b	LBB0_18
LBB0_9:
	ldr	w8, [x22, #16]
	cbz	w8, LBB0_17
; %bb.10:
	ldr	w8, [x21]
	cbz	w8, LBB0_17
; %bb.11:
	add	x0, x22, #12
	bl	_list_empty
	cbz	w0, LBB0_16
; %bb.12:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_mwl8k_reload_firmware
	cbnz	w0, LBB0_4
	b	LBB0_17
LBB0_13:
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_8
; %bb.14:
	add	x0, x22, #12
	bl	_list_empty
	cbz	w0, LBB0_22
; %bb.15:
	ldr	w1, [x21, #4]
	mov	x0, x20
	bl	_mwl8k_reload_firmware
	cbnz	w0, LBB0_4
	b	LBB0_8
LBB0_16:
	ldr	w0, [x20]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wiphy_warn
LBB0_17:
	add	x8, x22, #4
LBB0_18:
	ldr	w8, [x8]
	ldr	w9, [x22, #8]
	bics	w8, w8, w9
	b.eq	LBB0_22
; %bb.19:
	rbit	w8, w8
	clz	w23, w8
	mov	x0, x19
	bl	_MWL8K_VIF
	mov	x21, x0
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	str	w23, [x21]
	stp	xzr, x19, [x21, #16]
	ldr	w0, [x21, #12]
	ldr	w1, [x19, #4]
Lloh6:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_memcpy
	str	wzr, [x21, #4]
	ldr	w2, [x19, #4]
	mov	x0, x20
	mov	x1, x19
	bl	_mwl8k_cmd_set_mac_addr
	ldr	w8, [x19]
	cmp	w8, #129
	b.ne	LBB0_21
; %bb.20:
	mov	x0, x20
	mov	x1, x19
	bl	_mwl8k_cmd_set_new_stn_add_self
LBB0_21:
	ldr	w8, [x21], #8
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [x22, #8]
	orr	w8, w9, w8
	str	w8, [x22, #8]
	add	x1, x22, #12
	mov	x0, x21
	bl	_list_add_tail
	mov	w0, #0
	b	LBB0_4
LBB0_22:
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to create STA interface because sniffer mode is enabled\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"AP interface is running.\nAdding STA interface for WDS"

	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.no_dead_strip	_mwl8k_add_interface
.subsections_via_symbols
