	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwl8k_cmd_set_rf_channel
_mwl8k_cmd_set_rf_channel:              ## @mwl8k_cmd_set_rf_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	%rdi, %r14
	movq	(%rsi), %r13
	movq	%rsi, %rdi
	callq	_cfg80211_get_chandef_type
	movl	%eax, %r12d
	movq	(%r14), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	_MWL8K_CMD_SET_RF_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, 8(%rbx)
	movl	$32, %edi
	callq	_cpu_to_le16
	movq	%rax, (%rbx)
	movq	_MWL8K_CMD_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, 24(%rbx)
	movl	8(%r13), %eax
	movl	%eax, 20(%rbx)
	movq	(%r13), %rax
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rcx
	movl	$1, %edi
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rcx
	movl	$4, %edi
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_5:
	callq	_cpu_to_le32
	orl	%eax, 16(%rbx)
LBB0_6:
	movl	$128, %edi
	cmpq	$0, 16(%r15)
	je	LBB0_7
LBB0_11:
	callq	_cpu_to_le32
	orl	%eax, 16(%rbx)
LBB0_12:
	cmpq	$0, 16(%r15)
	je	LBB0_16
## %bb.13:
	cmpq	$0, (%r15)
	je	LBB0_15
## %bb.14:
	movq	8(%r15), %rsi
	movq	%r15, %rdi
	callq	_mwl8k_update_survey
LBB0_15:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	%r13, 8(%r15)
LBB0_16:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mwl8k_post_cmd
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r14d, %eax
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_NL80211_CHAN_NO_HT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_11
## %bb.8:
	movq	_NL80211_CHAN_HT20@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_11
## %bb.9:
	movq	_NL80211_CHAN_HT40MINUS@GOTPCREL(%rip), %rax
	movl	$6400, %edi                     ## imm = 0x1900
	cmpl	(%rax), %r12d
	je	LBB0_11
## %bb.10:
	movq	_NL80211_CHAN_HT40PLUS@GOTPCREL(%rip), %rax
	movl	$2304, %edi                     ## imm = 0x900
	cmpl	(%rax), %r12d
	je	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MWL8K_CMD_SET_RF_CHANNEL,4,2   ## @MWL8K_CMD_SET_RF_CHANNEL
	.comm	_MWL8K_CMD_SET,4,2              ## @MWL8K_CMD_SET
	.comm	_NL80211_BAND_2GHZ,8,3          ## @NL80211_BAND_2GHZ
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_NL80211_CHAN_NO_HT,4,2         ## @NL80211_CHAN_NO_HT
	.comm	_NL80211_CHAN_HT20,4,2          ## @NL80211_CHAN_HT20
	.comm	_NL80211_CHAN_HT40MINUS,4,2     ## @NL80211_CHAN_HT40MINUS
	.comm	_NL80211_CHAN_HT40PLUS,4,2      ## @NL80211_CHAN_HT40PLUS
	.comm	_jiffies,8,3                    ## @jiffies
	.no_dead_strip	_mwl8k_cmd_set_rf_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwl8k_cmd_set_rf_channel
_mwl8k_cmd_set_rf_channel:              ; @mwl8k_cmd_set_rf_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	x19, x0
	ldr	x23, [x1]
	mov	x0, x1
	bl	_cfg80211_get_chandef_type
	mov	x22, x0
	ldr	x20, [x19]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x8, _MWL8K_CMD_SET_RF_CHANNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MWL8K_CMD_SET_RF_CHANNEL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [x21, #8]
	mov	w0, #32
	bl	_cpu_to_le16
	str	x0, [x21]
Lloh6:
	adrp	x8, _MWL8K_CMD_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MWL8K_CMD_SET@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [x21, #24]
	ldr	w8, [x23, #8]
	str	w8, [x21, #20]
	ldr	x8, [x23]
Lloh9:
	adrp	x9, _NL80211_BAND_2GHZ@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	mov	w0, #1
	b	LBB0_6
LBB0_3:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_4:
Lloh15:
	adrp	x9, _NL80211_BAND_5GHZ@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	mov	w0, #4
LBB0_6:
	bl	_cpu_to_le32
	ldr	w8, [x21, #16]
	orr	w8, w8, w0
	str	w8, [x21, #16]
LBB0_7:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_16
; %bb.8:
	mov	w0, #128
LBB0_9:
	bl	_cpu_to_le32
	ldr	w8, [x21, #16]
	orr	w8, w8, w0
	str	w8, [x21, #16]
LBB0_10:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_14
; %bb.11:
	ldr	x8, [x20]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	x1, [x20, #8]
	mov	x0, x20
	bl	_mwl8k_update_survey
LBB0_13:
Lloh18:
	adrp	x8, _jiffies@GOTPAGE
Lloh19:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	stp	x8, x23, [x20]
LBB0_14:
	mov	x0, x19
	mov	x1, x21
	bl	_mwl8k_post_cmd
	mov	x19, x0
	mov	x0, x21
	bl	_kfree
	mov	x0, x19
LBB0_15:
	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_16:
Lloh21:
	adrp	x8, _NL80211_CHAN_NO_HT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _NL80211_CHAN_NO_HT@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	mov	w0, #128
	cmp	w22, w8
	b.eq	LBB0_9
; %bb.17:
Lloh24:
	adrp	x8, _NL80211_CHAN_HT20@GOTPAGE
Lloh25:
	ldr	x8, [x8, _NL80211_CHAN_HT20@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w22, w8
	b.eq	LBB0_9
; %bb.18:
Lloh27:
	adrp	x8, _NL80211_CHAN_HT40MINUS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _NL80211_CHAN_HT40MINUS@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_20
; %bb.19:
	mov	w0, #6400
	b	LBB0_9
LBB0_20:
Lloh30:
	adrp	x8, _NL80211_CHAN_HT40PLUS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _NL80211_CHAN_HT40PLUS@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_10
; %bb.21:
	mov	w0, #2304
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MWL8K_CMD_SET_RF_CHANNEL,4,2   ; @MWL8K_CMD_SET_RF_CHANNEL
	.comm	_MWL8K_CMD_SET,4,2              ; @MWL8K_CMD_SET
	.comm	_NL80211_BAND_2GHZ,8,3          ; @NL80211_BAND_2GHZ
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_NL80211_CHAN_NO_HT,4,2         ; @NL80211_CHAN_NO_HT
	.comm	_NL80211_CHAN_HT20,4,2          ; @NL80211_CHAN_HT20
	.comm	_NL80211_CHAN_HT40MINUS,4,2     ; @NL80211_CHAN_HT40MINUS
	.comm	_NL80211_CHAN_HT40PLUS,4,2      ; @NL80211_CHAN_HT40PLUS
	.comm	_jiffies,8,3                    ; @jiffies
	.no_dead_strip	_mwl8k_cmd_set_rf_channel
.subsections_via_symbols
