	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wil_cfg80211_change_iface
_wil_cfg80211_change_iface:             ## @wil_cfg80211_change_iface
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_wiphy_to_wil
	movq	%rax, %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_ndev_to_vif
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_vif_to_wdev
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_wil_dbg_misc
	cmpq	$0, (%r12)
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_wil_cfg80211_validate_change_iface
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_wil_err
	jmp	LBB0_21
LBB0_3:
	movq	%rbx, %r12
	movq	%r15, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_wil_has_other_active_ifaces
	movb	$1, %cl
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_17
LBB0_4:
	movq	%r12, %rbx
LBB0_5:
	leal	-128(%r14), %eax
	cmpl	$3, %eax
	jb	LBB0_10
## %bb.6:
	cmpl	$132, %r14d
	je	LBB0_10
## %bb.7:
	cmpl	$131, %r14d
	jne	LBB0_20
## %bb.8:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, (%r15)
LBB0_10:
	cmpq	$0, (%r13)
	je	LBB0_16
## %bb.11:
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_wil_has_active_ifaces
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	callq	_wil_vif_prepare_stop
LBB0_14:
	movq	(%r13), %rsi
	movq	%r15, %rdi
	callq	_wmi_port_delete
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.15:
	movq	(%r13), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_wmi_port_allocate
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_21
LBB0_16:
	movl	%r14d, (%rbx)
	xorl	%r12d, %r12d
	jmp	LBB0_21
LBB0_17:
	movq	%rbx, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_4
## %bb.18:
	movq	%r15, %rdi
	callq	_wil_is_recovery_blocked
	testl	%eax, %eax
	jne	LBB0_4
## %bb.23:
	movq	%r12, %rbx
	movl	(%r12), %edi
	movl	%r14d, %esi
	callq	_wil_is_safe_switch
	testl	%eax, %eax
	jne	LBB0_5
## %bb.24:
	leaq	L_.str.2(%rip), %rsi
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_wil_dbg_misc
	movq	%r15, %rdi
	addq	$4, %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	___wil_down
	movq	%r15, %rdi
	callq	___wil_up
	movl	%eax, %r12d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	testl	%r12d, %r12d
	jne	LBB0_21
	jmp	LBB0_5
LBB0_20:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_21:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"change_iface: type=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"iface validation failed, err=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"interface is up. resetting...\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_wil_cfg80211_change_iface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wil_cfg80211_change_iface
_wil_cfg80211_change_iface:             ; @wil_cfg80211_change_iface
	.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	x24, x3
	mov	x19, x2
	mov	x21, x1
	mov	x25, x0
	bl	_wiphy_to_wil
	mov	x20, x0
	mov	x0, x21
	bl	_ndev_to_vif
	mov	x23, x0
	bl	_vif_to_wdev
	mov	x22, x0
	str	x19, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_wil_dbg_misc
	ldr	x8, [x25]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x19
	bl	_wil_cfg80211_validate_change_iface
	cbz	w0, LBB0_3
; %bb.2:
	mov	x25, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x25
	bl	_wil_err
	b	LBB0_21
LBB0_3:
	mov	w25, #1
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	mov	w3, #0
	bl	_wil_has_other_active_ifaces
	cbnz	w0, LBB0_8
; %bb.4:
	mov	x0, x21
	bl	_netif_running
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_wil_is_recovery_blocked
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_wil_is_safe_switch
	cbz	w0, LBB0_22
LBB0_7:
	mov	w25, #1
LBB0_8:
	sub	w8, w19, #128
	cmp	w8, #3
	b.lo	LBB0_13
; %bb.9:
	cmp	w19, #132
	b.eq	LBB0_13
; %bb.10:
	cmp	w19, #131
	b.ne	LBB0_20
; %bb.11:
	ldr	w8, [x24]
	cbz	w8, LBB0_13
; %bb.12:
	str	w8, [x20]
LBB0_13:
	ldr	x8, [x23]
	cbz	x8, LBB0_19
; %bb.14:
	mov	x0, x20
	mov	w1, #1
	mov	w2, #0
	bl	_wil_has_active_ifaces
	cbz	x0, LBB0_19
; %bb.15:
	cbz	w25, LBB0_17
; %bb.16:
	mov	x0, x23
	bl	_wil_vif_prepare_stop
LBB0_17:
	ldr	x1, [x23]
	mov	x0, x20
	bl	_wmi_port_delete
	mov	x25, x0
	cbnz	w0, LBB0_21
; %bb.18:
	ldr	x1, [x23]
	ldr	w2, [x21]
	mov	x0, x20
	mov	x3, x19
	bl	_wmi_port_allocate
	mov	x25, x0
	cbnz	w0, LBB0_21
LBB0_19:
	mov	w25, #0
	str	w19, [x22]
	b	LBB0_21
LBB0_20:
Lloh4:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_21:
	mov	x0, x25
	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
	ret
LBB0_22:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_wil_dbg_misc
	add	x26, x20, #4
	mov	x0, x26
	bl	_mutex_lock
	mov	x0, x20
	bl	___wil_down
	mov	x0, x20
	bl	___wil_up
	mov	x25, x0
	mov	x0, x26
	bl	_mutex_unlock
	cbnz	w25, LBB0_21
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"change_iface: type=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"iface validation failed, err=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"interface is up. resetting...\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_wil_cfg80211_change_iface
.subsections_via_symbols
