	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_commit_ch_switch
_ath6kl_commit_ch_switch:               ## @ath6kl_commit_ch_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movl	%esi, %edi
	callq	_cpu_to_le16
	movl	%eax, 4(%rbx)
	movl	(%rbx), %esi
	cmpl	$128, %esi
	jne	LBB0_5
## %bb.1:
	leaq	4(%rbx), %r14
	cmpl	$0, 12(%rbx)
	je	LBB0_4
## %bb.2:
	movq	_ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r15), %esi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	12(%rbx), %r8
	movl	(%r15), %edi
	movl	8(%rbx), %esi
	movq	_WLAN_EID_RSN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_WMI_RSN_IE_CAPB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$4, %r9d
	callq	_ath6kl_wmi_set_ie_cmd
LBB0_4:
	movl	(%r15), %edi
	movl	8(%rbx), %esi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath6kl_wmi_ap_profile_commit   ## TAILCALL
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_ath6kl_err
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE,4,2 ## @ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE
	.comm	_WLAN_EID_RSN,4,2               ## @WLAN_EID_RSN
	.comm	_WMI_RSN_IE_CAPB,4,2            ## @WMI_RSN_IE_CAPB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"won't switch channels nw_type=%d\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_ath6kl_commit_ch_switch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_commit_ch_switch
_ath6kl_commit_ch_switch:               ; @ath6kl_commit_ch_switch
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x22, [x0, #16]
	mov	x0, x1
	bl	_cpu_to_le16
	mov	x20, x19
	str	w0, [x20, #4]!
	ldr	w1, [x19]
	cmp	w1, #128
	b.ne	LBB0_5
; %bb.1:
	mov	x21, x19
	ldr	w8, [x21, #12]!
	cbz	w8, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x22, #4]
	bl	_test_bit
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x22]
	ldr	w1, [x19, #8]
Lloh3:
	adrp	x8, _WLAN_EID_RSN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WLAN_EID_RSN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _WMI_RSN_IE_CAPB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WMI_RSN_IE_CAPB@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x4, x21
	mov	w5, #4
	bl	_ath6kl_wmi_set_ie_cmd
LBB0_4:
	ldr	w0, [x22]
	ldr	w1, [x19, #8]
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ath6kl_wmi_ap_profile_commit
LBB0_5:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_err
Lloh11:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE,4,2 ; @ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE
	.comm	_WLAN_EID_RSN,4,2               ; @WLAN_EID_RSN
	.comm	_WMI_RSN_IE_CAPB,4,2            ; @WMI_RSN_IE_CAPB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"won't switch channels nw_type=%d\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_ath6kl_commit_ch_switch
.subsections_via_symbols
