	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_mac_channel_switch      ## -- Begin function il4965_mac_channel_switch
	.p2align	4, 0x90
_il4965_mac_channel_switch:             ## @il4965_mac_channel_switch
	.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, %r14
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	movq	(%rdx), %r12
	leaq	L_.str(%rip), %rdi
	callq	_D_MAC80211
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_il_is_rfkill
	testq	%rax, %rax
	jne	LBB0_19
## %bb.1:
	movq	_S_EXIT_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%rbx), %r15
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_19
## %bb.2:
	movq	_S_SCANNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_19
## %bb.3:
	movq	_S_CHANNEL_SWITCH_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
LBB0_19:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	leaq	L_.str.2(%rip), %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_D_MAC80211                     ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	callq	_il_is_associated
	testl	%eax, %eax
	je	LBB0_19
## %bb.5:
	movq	24(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_19
## %bb.6:
	movq	(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	68(%rbx), %edi
	callq	_le16_to_cpu
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %rax
	je	LBB0_19
## %bb.7:
	movl	8(%r12), %esi
	movq	%rbx, %rdi
	callq	_il_get_channel_info
	movq	%rax, %rdi
	callq	_il_is_channel_valid
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	leaq	32(%rbx), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irq
	movl	(%r13), %eax
	movl	%eax, 64(%rbx)
	movq	%r14, %rdi
	callq	_cfg80211_get_chandef_type
                                        ## kill: def $eax killed $eax def $rax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_15
## %bb.10:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_11:
	movl	$0, 56(%rbx)
	movq	_IEEE80211_HT_PARAM_CHA_SEC_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	jmp	LBB0_15
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_D_MAC80211
	jmp	LBB0_19
LBB0_13:
	movq	_IEEE80211_HT_PARAM_CHA_SEC_ABOVE@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	movq	_IEEE80211_HT_PARAM_CHA_SEC_BELOW@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	movl	$1, 56(%rbx)
LBB0_15:
	leaq	64(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	48(%rbx), %edi
	callq	_le16_to_cpu
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	cmpq	%r13, %rax
	je	LBB0_17
## %bb.16:
	movq	$0, 40(%rbx)
LBB0_17:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_il_set_rxon_channel
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_il_set_rxon_ht
	movl	8(%r12), %esi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_il_set_flags_for_band
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irq
	movq	%rbx, %rdi
	callq	_il_set_rate
	movq	_S_CHANNEL_SWITCH_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
	movq	%r13, %rdi
	callq	_cpu_to_le16
	movq	%rax, 8(%rbx)
	movq	24(%rbx), %rax
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	_S_CHANNEL_SWITCH_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_clear_bit
	movq	$0, 8(%rbx)
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	callq	_ieee80211_chswitch_done
	jmp	LBB0_19
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_13
	.long	L0_0_set_12
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enter\n"

	.comm	_S_EXIT_PENDING,4,2             ## @S_EXIT_PENDING
	.comm	_S_SCANNING,4,2                 ## @S_SCANNING
	.comm	_S_CHANNEL_SWITCH_PENDING,4,2   ## @S_CHANNEL_SWITCH_PENDING
L_.str.1:                               ## @.str.1
	.asciz	"invalid channel\n"

	.comm	_IEEE80211_HT_PARAM_CHA_SEC_NONE,4,2 ## @IEEE80211_HT_PARAM_CHA_SEC_NONE
	.comm	_IEEE80211_HT_PARAM_CHA_SEC_BELOW,4,2 ## @IEEE80211_HT_PARAM_CHA_SEC_BELOW
	.comm	_IEEE80211_HT_PARAM_CHA_SEC_ABOVE,4,2 ## @IEEE80211_HT_PARAM_CHA_SEC_ABOVE
L_.str.2:                               ## @.str.2
	.asciz	"leave\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_mac_channel_switch      ; -- Begin function il4965_mac_channel_switch
	.p2align	2
_il4965_mac_channel_switch:             ; @il4965_mac_channel_switch
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x24, x0
	ldr	x19, [x0, #8]
	ldr	x22, [x2]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_MAC80211
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	bl	_il_is_rfkill
	cbnz	x0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _S_EXIT_PENDING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _S_EXIT_PENDING@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x21, x19, #16
	mov	x1, x21
	bl	_test_bit
	cbnz	x0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _S_SCANNING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _S_SCANNING@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cbnz	x0, LBB0_4
; %bb.3:
Lloh8:
	adrp	x27, _S_CHANNEL_SWITCH_PENDING@GOTPAGE
Lloh9:
	ldr	x27, [x27, _S_CHANNEL_SWITCH_PENDING@GOTPAGEOFF]
	ldr	w0, [x27]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_D_MAC80211
LBB0_5:
	mov	x0, x19
	bl	_il_is_associated
	cbz	w0, LBB0_4
; %bb.6:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.7:
	ldr	x23, [x22]
	ldr	w0, [x19, #68]
	bl	_le16_to_cpu
	cmp	x0, x23
	b.eq	LBB0_4
; %bb.8:
	ldr	w1, [x22, #8]
	mov	x0, x19
	mov	x2, x23
	bl	_il_get_channel_info
	bl	_il_is_channel_valid
	cbz	w0, LBB0_12
; %bb.9:
	add	x26, x19, #64
	add	x25, x19, #32
	mov	x0, x25
	bl	_spin_lock_irq
	ldr	w8, [x24]
	str	w8, [x19, #64]
	mov	x0, x20
	bl	_cfg80211_get_chandef_type
	sub	w8, w0, #128
	cmp	w8, #3
	b.hi	LBB0_16
; %bb.10:
Lloh12:
	adrp	x9, lJTI0_0@PAGE
Lloh13:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_11
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_11:
Lloh14:
	adrp	x8, _IEEE80211_HT_PARAM_CHA_SEC_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IEEE80211_HT_PARAM_CHA_SEC_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	stp	wzr, w8, [x19, #56]
	b	LBB0_16
LBB0_12:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_D_MAC80211
	b	LBB0_4
LBB0_13:
Lloh19:
	adrp	x8, _IEEE80211_HT_PARAM_CHA_SEC_ABOVE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IEEE80211_HT_PARAM_CHA_SEC_ABOVE@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh21:
	adrp	x8, _IEEE80211_HT_PARAM_CHA_SEC_BELOW@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IEEE80211_HT_PARAM_CHA_SEC_BELOW@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w9, w8, [x19, #56]
LBB0_16:
	ldr	w0, [x19, #48]
	bl	_le16_to_cpu
	cmp	x0, x23
	b.eq	LBB0_18
; %bb.17:
	str	xzr, [x19, #40]
LBB0_18:
	mov	x0, x19
	mov	x1, x22
	bl	_il_set_rxon_channel
	mov	x0, x19
	mov	x1, x26
	bl	_il_set_rxon_ht
	ldr	w1, [x22, #8]
	ldr	w2, [x19, #4]
	mov	x0, x19
	bl	_il_set_flags_for_band
	mov	x0, x25
	bl	_spin_unlock_irq
	mov	x0, x19
	bl	_il_set_rate
	ldr	w0, [x27]
	mov	x1, x21
	bl	_set_bit
	mov	x0, x23
	bl	_cpu_to_le16
	str	x0, [x19, #8]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	cbz	x0, LBB0_4
; %bb.19:
	ldr	w0, [x27]
	mov	x1, x21
	bl	_clear_bit
	str	xzr, [x19, #8]
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_ieee80211_chswitch_done
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_13-LBB0_11)>>2
	.byte	(LBB0_14-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enter\n"

	.comm	_S_EXIT_PENDING,4,2             ; @S_EXIT_PENDING
	.comm	_S_SCANNING,4,2                 ; @S_SCANNING
	.comm	_S_CHANNEL_SWITCH_PENDING,4,2   ; @S_CHANNEL_SWITCH_PENDING
l_.str.1:                               ; @.str.1
	.asciz	"invalid channel\n"

	.comm	_IEEE80211_HT_PARAM_CHA_SEC_NONE,4,2 ; @IEEE80211_HT_PARAM_CHA_SEC_NONE
	.comm	_IEEE80211_HT_PARAM_CHA_SEC_BELOW,4,2 ; @IEEE80211_HT_PARAM_CHA_SEC_BELOW
	.comm	_IEEE80211_HT_PARAM_CHA_SEC_ABOVE,4,2 ; @IEEE80211_HT_PARAM_CHA_SEC_ABOVE
l_.str.2:                               ; @.str.2
	.asciz	"leave\n"

.subsections_via_symbols
