	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cfg80211_mgd_wext_siwap        ## -- Begin function cfg80211_mgd_wext_siwap
	.p2align	4, 0x90
_cfg80211_mgd_wext_siwap:               ## @cfg80211_mgd_wext_siwap
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r13
	movq	(%rdi), %r14
	movl	32(%r14), %edi
	callq	_wiphy_to_dev
	movq	%rax, %r15
	movq	8(%rbx), %r12
	movq	(%r14), %rax
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	movq	_ARPHRD_ETHER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	%r15, %rbx
	movq	%r12, %rdi
	callq	_is_zero_ether_addr
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	_is_broadcast_ether_addr
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	xorl	%r12d, %r12d
LBB0_6:
	movq	%rbx, %rdi
	callq	_cfg80211_lock_rdev
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_mutex_lock
	addq	$4, %r15
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_wdev_lock
	movq	8(%r14), %rax
	movq	_CFG80211_SME_IDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
LBB0_13:
	testq	%r12, %r12
	je	LBB0_14
## %bb.15:
	movq	24(%r14), %rdi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rsi
	callq	_memcpy
	movq	24(%r14), %rax
	jmp	LBB0_16
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_18:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	16(%r14), %rsi
	testq	%r12, %r12
	je	LBB0_8
## %bb.10:
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.11:
	movq	%r12, %rdi
	callq	_ether_addr_equal
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_17
	jmp	LBB0_12
LBB0_14:
	xorl	%eax, %eax
LBB0_16:
	movq	%rax, 16(%r14)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_cfg80211_mgd_wext_connect
	movl	%eax, %r15d
	jmp	LBB0_17
LBB0_8:
	testq	%rsi, %rsi
	je	LBB0_9
LBB0_12:
	movq	_WLAN_REASON_DEAUTH_LEAVING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	xorl	%ecx, %ecx
	callq	___cfg80211_disconnect
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_17
	jmp	LBB0_13
LBB0_9:
	xorl	%r15d, %r15d
LBB0_17:
	movq	%r14, %rdi
	callq	_wdev_unlock
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_cfg80211_unlock_rdev
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_IFTYPE_STATION,8,3     ## @NL80211_IFTYPE_STATION
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ARPHRD_ETHER,8,3               ## @ARPHRD_ETHER
	.comm	_CFG80211_SME_IDLE,8,3          ## @CFG80211_SME_IDLE
	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ## @WLAN_REASON_DEAUTH_LEAVING
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cfg80211_mgd_wext_siwap        ; -- Begin function cfg80211_mgd_wext_siwap
	.p2align	2
_cfg80211_mgd_wext_siwap:               ; @cfg80211_mgd_wext_siwap
	.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	x23, x2
	mov	x22, x0
	ldr	x20, [x0]
	ldr	w0, [x20, #32]
	bl	_wiphy_to_dev
	mov	x19, x0
	ldr	x21, [x23, #8]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
	cbnz	x0, LBB0_8
; %bb.1:
	ldr	x8, [x23]
Lloh3:
	adrp	x9, _ARPHRD_ETHER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ARPHRD_ETHER@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
	mov	x0, x21
	bl	_is_zero_ether_addr
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_is_broadcast_ether_addr
	cbz	x0, LBB0_5
LBB0_4:
	mov	x21, #0
LBB0_5:
	mov	x0, x19
	bl	_cfg80211_lock_rdev
	mov	x0, x19
	bl	_mutex_lock
	add	x23, x19, #4
	mov	x0, x23
	bl	_mutex_lock
	mov	x0, x20
	bl	_wdev_lock
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _CFG80211_SME_IDLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CFG80211_SME_IDLE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_6:
	cbz	x21, LBB0_14
; %bb.7:
	ldr	x0, [x20, #24]
Lloh9:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_memcpy
	ldr	x8, [x20, #24]
	b	LBB0_15
LBB0_8:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x22
	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_10:
	ldr	x1, [x20, #16]
	cbz	x21, LBB0_16
; %bb.11:
	cbz	x1, LBB0_17
; %bb.12:
	mov	x0, x21
	bl	_ether_addr_equal
	cbz	x0, LBB0_17
LBB0_13:
	mov	w22, #0
	b	LBB0_18
LBB0_14:
	mov	x8, #0
LBB0_15:
	str	x8, [x20, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_cfg80211_mgd_wext_connect
	mov	x22, x0
	b	LBB0_18
LBB0_16:
	cbz	x1, LBB0_13
LBB0_17:
Lloh15:
	adrp	x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
	bl	___cfg80211_disconnect
	mov	x22, x0
	cbz	w0, LBB0_6
LBB0_18:
	mov	x0, x20
	bl	_wdev_unlock
	mov	x0, x23
	bl	_mutex_unlock
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x19
	bl	_cfg80211_unlock_rdev
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_IFTYPE_STATION,8,3     ; @NL80211_IFTYPE_STATION
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ARPHRD_ETHER,8,3               ; @ARPHRD_ETHER
	.comm	_CFG80211_SME_IDLE,8,3          ; @CFG80211_SME_IDLE
	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ; @WLAN_REASON_DEAUTH_LEAVING
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
.subsections_via_symbols
