	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl18xx_cmd_set_cac             ## -- Begin function wl18xx_cmd_set_cac
	.p2align	4, 0x90
_wl18xx_cmd_set_cac:                    ## @wl18xx_cmd_set_cac
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_DEBUG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%rsi), %edx
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rsi
	callq	_wl1271_debug
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	16(%rbx), %eax
	movl	%eax, 12(%r12)
	movl	12(%rbx), %eax
	movl	%eax, 8(%r12)
	movq	(%rbx), %rax
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_WLCORE_BAND_5GHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
LBB0_4:
	movl	8(%rbx), %edi
	callq	_wlcore_get_native_channel_type
	movl	%eax, (%r12)
	testl	%r15d, %r15d
	jne	LBB0_5
## %bb.6:
	movq	_CMD_CAC_STOP@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_5:
	movq	_CMD_CAC_START@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	movl	$16, %ecx
	xorl	%r8d, %r8d
	callq	_wl1271_cmd_send
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	callq	_wl1271_error
LBB0_9:
	movq	%r12, %rdi
	callq	_kfree
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_CMD,4,2                  ## @DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cmd cac (channel %d) %s"

L_.str.1:                               ## @.str.1
	.asciz	"start"

L_.str.2:                               ## @.str.2
	.asciz	"stop"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_WLCORE_BAND_5GHZ,4,2           ## @WLCORE_BAND_5GHZ
	.comm	_CMD_CAC_START,4,2              ## @CMD_CAC_START
	.comm	_CMD_CAC_STOP,4,2               ## @CMD_CAC_STOP
L_.str.3:                               ## @.str.3
	.asciz	"failed to send cac command"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl18xx_cmd_set_cac             ; -- Begin function wl18xx_cmd_set_cac
	.p2align	2
_wl18xx_cmd_set_cac:                    ; @wl18xx_cmd_set_cac
	.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	x20, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _DEBUG_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_CMD@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w2, [x1, #12]
Lloh3:
	adrp	x8, l_.str.1@PAGE
Lloh4:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh5:
	adrp	x9, l_.str.2@PAGE
Lloh6:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x3, x9, x8, eq
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wl1271_debug
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	ldur	d0, [x22, #12]
	str	d0, [x0, #8]
	ldr	x8, [x22]
Lloh12:
	adrp	x9, _NL80211_BAND_5GHZ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh15:
	adrp	x8, _WLCORE_BAND_5GHZ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WLCORE_BAND_5GHZ@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x21, #4]
LBB0_3:
	ldr	w0, [x22, #8]
	bl	_wlcore_get_native_channel_type
Lloh18:
	adrp	x8, _CMD_CAC_START@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CMD_CAC_START@GOTPAGEOFF]
	str	w0, [x21]
Lloh20:
	adrp	x9, _CMD_CAC_STOP@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CMD_CAC_STOP@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	mov	w3, #16
	mov	w4, #0
	bl	_wl1271_cmd_send
	mov	x19, x0
	tbz	w0, #31, LBB0_5
; %bb.4:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_wl1271_error
LBB0_5:
	mov	x0, x21
	bl	_kfree
	b	LBB0_7
LBB0_6:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_7:
	mov	x0, x19
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_CMD,4,2                  ; @DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cmd cac (channel %d) %s"

l_.str.1:                               ; @.str.1
	.asciz	"start"

l_.str.2:                               ; @.str.2
	.asciz	"stop"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_WLCORE_BAND_5GHZ,4,2           ; @WLCORE_BAND_5GHZ
	.comm	_CMD_CAC_START,4,2              ; @CMD_CAC_START
	.comm	_CMD_CAC_STOP,4,2               ; @CMD_CAC_STOP
l_.str.3:                               ; @.str.3
	.asciz	"failed to send cac command"

.subsections_via_symbols
