	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cfg80211_mgd_wext_siwfreq      ## -- Begin function cfg80211_mgd_wext_siwfreq
	.p2align	4, 0x90
_cfg80211_mgd_wext_siwfreq:             ## @cfg80211_mgd_wext_siwfreq
	.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	%rdx, %rbx
	movq	%rdi, %r13
	movq	(%rdi), %r15
	movq	32(%r15), %rdi
	callq	_wiphy_to_dev
	movq	%rax, %r14
	movq	(%r15), %rax
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	32(%r15), %rdi
	movq	%rbx, %rsi
	callq	_cfg80211_wext_freq
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_19
## %bb.3:
	je	LBB0_4
## %bb.5:
	movq	32(%r15), %rdi
	movl	%ebx, %esi
	callq	_ieee80211_get_channel
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movq	%rax, %r12
	movq	_IEEE80211_CHAN_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	jne	LBB0_1
	jmp	LBB0_7
LBB0_4:
	xorl	%r12d, %r12d
LBB0_7:
	movq	%r14, %rdi
	callq	_cfg80211_lock_rdev
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	4(%r14), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_wdev_lock
	movq	8(%r15), %rax
	movq	_CFG80211_SME_IDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_11:
	movq	%r12, 24(%r15)
	testq	%r12, %r12
	je	LBB0_16
## %bb.12:
	cmpq	$0, 16(%r15)
	je	LBB0_13
LBB0_16:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_cfg80211_mgd_wext_connect
LBB0_17:
	movl	%eax, %r13d
	jmp	LBB0_18
LBB0_8:
	cmpq	%r12, 24(%r15)
	je	LBB0_9
## %bb.10:
	xorl	%ecx, %ecx
	cmpq	$0, 16(%r15)
	sete	%cl
	movq	_WLAN_REASON_DEAUTH_LEAVING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	___cfg80211_disconnect
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_18
	jmp	LBB0_11
LBB0_9:
	xorl	%r13d, %r13d
	jmp	LBB0_18
LBB0_13:
	movl	%ebx, -72(%rbp)
	movq	_NL80211_CHAN_WIDTH_20_NOHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	%r14, %rdi
	addq	$8, %rdi
	movl	%ebx, %esi
	callq	_ieee80211_get_channel
	movq	%rax, -64(%rbp)
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	-72(%rbp), %rsi
	movq	%r14, %rdi
	callq	_cfg80211_set_monitor_channel
	jmp	LBB0_17
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_18:
	movq	%r15, %rdi
	callq	_wdev_unlock
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_cfg80211_unlock_rdev
	movl	%r13d, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_IFTYPE_STATION,8,3     ## @NL80211_IFTYPE_STATION
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IEEE80211_CHAN_DISABLED,4,2    ## @IEEE80211_CHAN_DISABLED
	.comm	_CFG80211_SME_IDLE,8,3          ## @CFG80211_SME_IDLE
	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ## @WLAN_REASON_DEAUTH_LEAVING
	.comm	_NL80211_CHAN_WIDTH_20_NOHT,4,2 ## @NL80211_CHAN_WIDTH_20_NOHT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cfg80211_mgd_wext_siwfreq      ; -- Begin function cfg80211_mgd_wext_siwfreq
	.p2align	2
_cfg80211_mgd_wext_siwfreq:             ; @cfg80211_mgd_wext_siwfreq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x2
	mov	x23, x0
	ldr	x20, [x0]
	ldr	x0, [x20, #32]
	bl	_wiphy_to_dev
	mov	x19, x0
	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
	cbz	x0, LBB0_3
LBB0_1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_2:
	mov	x0, x21
	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
	add	sp, sp, #96
	ret
LBB0_3:
	ldr	x0, [x20, #32]
	mov	x1, x21
	bl	_cfg80211_wext_freq
	mov	x21, x0
	tbnz	w0, #31, LBB0_2
; %bb.4:
	cbz	w21, LBB0_7
; %bb.5:
	ldr	x0, [x20, #32]
	mov	x1, x21
	bl	_ieee80211_get_channel
	cbz	x0, LBB0_1
; %bb.6:
	mov	x24, x0
	ldr	w8, [x0]
Lloh6:
	adrp	x9, _IEEE80211_CHAN_DISABLED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IEEE80211_CHAN_DISABLED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_1
	b	LBB0_8
LBB0_7:
	mov	x24, #0
LBB0_8:
	mov	x0, x19
	bl	_cfg80211_lock_rdev
	mov	x0, x19
	bl	_mutex_lock
	add	x22, x19, #4
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x20
	bl	_wdev_lock
	ldr	x8, [x20, #8]
Lloh9:
	adrp	x9, _CFG80211_SME_IDLE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CFG80211_SME_IDLE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
LBB0_9:
	str	x24, [x20, #24]
	cbz	x24, LBB0_11
; %bb.10:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_16
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_cfg80211_mgd_wext_connect
LBB0_12:
	mov	x23, x0
	b	LBB0_19
LBB0_13:
	ldr	x8, [x20, #24]
	cmp	x8, x24
	b.eq	LBB0_15
; %bb.14:
	ldr	x8, [x20, #16]
	cmp	x8, #0
	cset	w3, eq
Lloh12:
	adrp	x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x23
	bl	___cfg80211_disconnect
	mov	x23, x0
	cbnz	w0, LBB0_19
	b	LBB0_9
LBB0_15:
	mov	w23, #0
	b	LBB0_19
LBB0_16:
Lloh15:
	adrp	x8, _NL80211_CHAN_WIDTH_20_NOHT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NL80211_CHAN_WIDTH_20_NOHT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w21, [sp, #8]
	str	w8, [sp, #24]
	add	x0, x19, #8
	mov	x1, x21
	bl	_ieee80211_get_channel
	str	x0, [sp, #16]
	cbz	x0, LBB0_18
; %bb.17:
	add	x1, sp, #8
	mov	x0, x19
	bl	_cfg80211_set_monitor_channel
	b	LBB0_12
LBB0_18:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_19:
	mov	x0, x20
	bl	_wdev_unlock
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x19
	bl	_cfg80211_unlock_rdev
	mov	x21, x23
	b	LBB0_2
	.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
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_IFTYPE_STATION,8,3     ; @NL80211_IFTYPE_STATION
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IEEE80211_CHAN_DISABLED,4,2    ; @IEEE80211_CHAN_DISABLED
	.comm	_CFG80211_SME_IDLE,8,3          ; @CFG80211_SME_IDLE
	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ; @WLAN_REASON_DEAUTH_LEAVING
	.comm	_NL80211_CHAN_WIDTH_20_NOHT,4,2 ; @NL80211_CHAN_WIDTH_20_NOHT
.subsections_via_symbols
