	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mwifiex_uap_set_channel        ## -- Begin function mwifiex_uap_set_channel
	.p2align	4, 0x90
_mwifiex_uap_set_channel:               ## @mwifiex_uap_set_channel
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	leaq	16(%rbp), %rbx
	movq	(%rdi), %rax
	movl	(%rax), %r15d
	movaps	16(%rbp), %xmm0
	movups	%xmm0, 8(%rdi)
	movq	32(%rbp), %rax
	movq	%rax, 24(%rdi)
	movq	24(%rbp), %r13
	movl	8(%r13), %edi
	callq	_ieee80211_frequency_to_channel
	movl	%eax, 4(%r14)
	movq	(%r13), %rcx
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.1:
	movq	_BAND_CONFIG_BG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%r14)
	movq	_BAND_B@GOTPCREL(%rip), %rcx
	movq	_BAND_G@GOTPCREL(%rip), %rsi
	movq	%rbx, %r8
	movl	(%rsi), %ebx
	orl	(%rcx), %ebx
	movl	(%r8), %ecx
	cmpl	$133, %ecx
	jl	LBB0_8
## %bb.2:
	movq	_BAND_GN@GOTPCREL(%rip), %rsi
	jmp	LBB0_7
LBB0_3:
	movq	_BAND_CONFIG_A@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%r14)
	movq	_BAND_A@GOTPCREL(%rip), %rsi
	movl	(%rbx), %ecx
	movq	%rbx, %r8
	xorl	%ebx, %ebx
	cmpl	$133, %ecx
	jl	LBB0_5
## %bb.4:
	movq	_BAND_AN@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ebx
LBB0_5:
	orl	(%rsi), %ebx
	cmpl	$132, %ecx
	jl	LBB0_8
## %bb.6:
	movq	_BAND_AAC@GOTPCREL(%rip), %rsi
LBB0_7:
	orl	(%rsi), %ebx
LBB0_8:
	leal	-128(%rcx), %esi
	cmpl	$7, %esi
	ja	LBB0_16
## %bb.9:
	movl	$180, %ecx
	btl	%esi, %ecx
	jb	LBB0_17
## %bb.10:
	movl	$67, %ecx
	btl	%esi, %ecx
	jae	LBB0_11
## %bb.15:
	movl	%eax, %edi
	callq	_mwifiex_get_sec_chan_offset
	shll	$4, %eax
	orl	%eax, (%r14)
	jmp	LBB0_17
LBB0_11:
	movl	16(%r8), %eax
	cmpl	8(%r13), %eax
	jge	LBB0_14
## %bb.12:
	movq	_MWIFIEX_SEC_CHAN_BELOW@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_16:
	movq	(%r12), %rdi
	movq	_WARN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_mwifiex_dbg
	jmp	LBB0_17
LBB0_14:
	movq	_MWIFIEX_SEC_CHAN_ABOVE@GOTPCREL(%rip), %rax
LBB0_13:
	orl	(%rax), %edx
	movl	%edx, (%r14)
LBB0_17:
	movq	(%r12), %rax
	movl	%ebx, (%rax)
	cmpl	%ebx, %r15d
	jne	LBB0_19
## %bb.18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	4(%rax), %edi
	callq	_mwifiex_send_domain_info_cmd_fw
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mwifiex_dnld_txpwr_table       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_BAND_2GHZ,8,3          ## @NL80211_BAND_2GHZ
	.comm	_BAND_CONFIG_BG,4,2             ## @BAND_CONFIG_BG
	.comm	_BAND_B,4,2                     ## @BAND_B
	.comm	_BAND_G,4,2                     ## @BAND_G
	.comm	_BAND_GN,4,2                    ## @BAND_GN
	.comm	_BAND_CONFIG_A,4,2              ## @BAND_CONFIG_A
	.comm	_BAND_A,4,2                     ## @BAND_A
	.comm	_BAND_AN,4,2                    ## @BAND_AN
	.comm	_BAND_AAC,4,2                   ## @BAND_AAC
	.comm	_MWIFIEX_SEC_CHAN_BELOW,4,2     ## @MWIFIEX_SEC_CHAN_BELOW
	.comm	_MWIFIEX_SEC_CHAN_ABOVE,4,2     ## @MWIFIEX_SEC_CHAN_ABOVE
	.comm	_WARN,4,2                       ## @WARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown channel width: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mwifiex_uap_set_channel        ; -- Begin function mwifiex_uap_set_channel
	.p2align	2
_mwifiex_uap_set_channel:               ; @mwifiex_uap_set_channel
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w22, [x8]
	ldr	x8, [x2, #16]
	ldr	q0, [x2]
	stur	q0, [x0, #8]
	str	x8, [x0, #24]
	ldr	x8, [x2, #8]
	ldr	w0, [x8, #8]
	bl	_ieee80211_frequency_to_channel
	str	w0, [x20, #4]
	ldr	x8, [x21, #8]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _NL80211_BAND_2GHZ@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _BAND_CONFIG_BG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BAND_CONFIG_BG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [x20]
Lloh6:
	adrp	x10, _BAND_B@GOTPAGE
Lloh7:
	ldr	x10, [x10, _BAND_B@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _BAND_G@GOTPAGE
Lloh10:
	ldr	x11, [x11, _BAND_G@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	orr	w23, w11, w10
	ldr	w3, [x21]
	cmp	w3, #133
	b.lt	LBB0_6
; %bb.2:
Lloh12:
	adrp	x10, _BAND_GN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _BAND_GN@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh14:
	adrp	x9, _BAND_CONFIG_A@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BAND_CONFIG_A@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	str	w9, [x20]
Lloh17:
	adrp	x10, _BAND_A@GOTPAGE
Lloh18:
	ldr	x10, [x10, _BAND_A@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	ldr	w3, [x21]
Lloh20:
	adrp	x11, _BAND_AN@GOTPAGE
Lloh21:
	ldr	x11, [x11, _BAND_AN@GOTPAGEOFF]
Lloh22:
	ldr	w11, [x11]
	cmp	w3, #132
	csel	w11, w11, wzr, gt
	orr	w23, w11, w10
	b.lt	LBB0_6
; %bb.4:
Lloh23:
	adrp	x10, _BAND_AAC@GOTPAGE
Lloh24:
	ldr	x10, [x10, _BAND_AAC@GOTPAGEOFF]
LBB0_5:
	ldr	w10, [x10]
	orr	w23, w10, w23
LBB0_6:
	sub	w10, w3, #128
	cmp	w10, #7
	b.hi	LBB0_12
; %bb.7:
	mov	w11, #1
	lsl	w10, w11, w10
	mov	w11, #180
	tst	w10, w11
	b.ne	LBB0_16
; %bb.8:
	mov	w11, #67
	tst	w10, w11
	b.eq	LBB0_10
; %bb.9:
	bl	_mwifiex_get_sec_chan_offset
	ldr	w8, [x20]
	orr	w8, w8, w0, lsl #4
	b	LBB0_15
LBB0_10:
	ldr	w10, [x21, #16]
	ldr	w8, [x8, #8]
	cmp	w10, w8
	b.ge	LBB0_13
; %bb.11:
Lloh25:
	adrp	x8, _MWIFIEX_SEC_CHAN_BELOW@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MWIFIEX_SEC_CHAN_BELOW@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
	ldr	x0, [x19]
Lloh27:
	adrp	x8, _WARN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WARN@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x2, l_.str@PAGE
Lloh31:
	add	x2, x2, l_.str@PAGEOFF
	bl	_mwifiex_dbg
	b	LBB0_16
LBB0_13:
Lloh32:
	adrp	x8, _MWIFIEX_SEC_CHAN_ABOVE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MWIFIEX_SEC_CHAN_ABOVE@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	orr	w8, w9, w8
LBB0_15:
	str	w8, [x20]
LBB0_16:
	ldr	x8, [x19]
	str	w23, [x8]
	cmp	w22, w23
	b.ne	LBB0_18
; %bb.17:
	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_18:
	ldr	w0, [x8, #4]
	bl	_mwifiex_send_domain_info_cmd_fw
	mov	x0, x19
	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
	b	_mwifiex_dnld_txpwr_table
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_BAND_2GHZ,8,3          ; @NL80211_BAND_2GHZ
	.comm	_BAND_CONFIG_BG,4,2             ; @BAND_CONFIG_BG
	.comm	_BAND_B,4,2                     ; @BAND_B
	.comm	_BAND_G,4,2                     ; @BAND_G
	.comm	_BAND_GN,4,2                    ; @BAND_GN
	.comm	_BAND_CONFIG_A,4,2              ; @BAND_CONFIG_A
	.comm	_BAND_A,4,2                     ; @BAND_A
	.comm	_BAND_AN,4,2                    ; @BAND_AN
	.comm	_BAND_AAC,4,2                   ; @BAND_AAC
	.comm	_MWIFIEX_SEC_CHAN_BELOW,4,2     ; @MWIFIEX_SEC_CHAN_BELOW
	.comm	_MWIFIEX_SEC_CHAN_ABOVE,4,2     ; @MWIFIEX_SEC_CHAN_ABOVE
	.comm	_WARN,4,2                       ; @WARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown channel width: %d\n"

.subsections_via_symbols
