	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_wmi_snr_threshold_event_rx
_ath6kl_wmi_snr_threshold_event_rx:     ## @ath6kl_wmi_snr_threshold_event_rx
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$15, %edx
	ja	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_2:
	movl	8(%rsi), %ecx
	movq	(%rsi), %r13
	movq	(%rdi), %rbx
	movq	_SIGNAL_QUALITY_METRICS_SNR@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	shlq	$5, %r12
	leaq	(%rbx,%r12), %r15
	testl	%ecx, %ecx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_12
## %bb.3:
	movq	(%r15), %rax
	cmpq	(%rax), %r13
	jge	LBB0_5
## %bb.4:
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_ath6kl_dbg
	jmp	LBB0_22
LBB0_12:
	movq	8(%rbx,%r12), %rax
	movq	(%rax), %rdx
	cmpq	%rdx, %r13
	jle	LBB0_14
## %bb.13:
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	callq	_ath6kl_dbg
	jmp	LBB0_22
LBB0_5:
	cmpq	8(%rax), %r13
	jge	LBB0_7
## %bb.6:
	movq	_WMI_SNR_THRESHOLD1_ABOVE@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_14:
	cmpq	8(%rax), %r13
	jle	LBB0_16
## %bb.15:
	movq	_WMI_SNR_THRESHOLD4_BELOW@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_7:
	cmpq	16(%rax), %r13
	jge	LBB0_9
## %bb.8:
	movq	_WMI_SNR_THRESHOLD2_ABOVE@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_16:
	cmpq	16(%rax), %r13
	jle	LBB0_18
## %bb.17:
	movq	_WMI_SNR_THRESHOLD3_BELOW@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_9:
	cmpq	24(%rax), %r13
	jge	LBB0_11
## %bb.10:
	movq	_WMI_SNR_THRESHOLD3_ABOVE@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_18:
	cmpq	24(%rax), %r13
	jle	LBB0_20
## %bb.19:
	movq	_WMI_SNR_THRESHOLD2_BELOW@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_11:
	movq	_WMI_SNR_THRESHOLD4_ABOVE@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_20:
	movq	_WMI_SNR_THRESHOLD1_BELOW@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_22:
	movl	28(%rbx,%r12), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ath6kl_wmi_get_lower_threshold
	movq	%rax, %r14
	movl	24(%rbx,%r12), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ath6kl_wmi_get_upper_threshold
	movq	%rax, %r15
	movq	%rax, -64(%rbp)
	movq	%r14, -72(%rbp)
	movl	20(%rbx,%r12), %eax
	movl	%eax, -76(%rbp)
	movl	16(%rbx,%r12), %edi
	callq	_cpu_to_le32
	movl	%eax, -80(%rbp)
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%r14, %r8
	movq	%r15, %r9
	xorl	%eax, %eax
	callq	_ath6kl_dbg
	leaq	-80(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_ath6kl_wmi_send_snr_threshold_params
	testl	%eax, %eax
	je	LBB0_25
## %bb.23:
	leaq	L_.str.3(%rip), %rdi
	callq	_ath6kl_err
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_24:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_25:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SIGNAL_QUALITY_METRICS_SNR,8,3 ## @SIGNAL_QUALITY_METRICS_SNR
	.comm	_ATH6KL_DBG_WMI,4,2             ## @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spurious upper snr threshold event: %d\n"

	.comm	_WMI_SNR_THRESHOLD1_ABOVE,4,2   ## @WMI_SNR_THRESHOLD1_ABOVE
	.comm	_WMI_SNR_THRESHOLD2_ABOVE,4,2   ## @WMI_SNR_THRESHOLD2_ABOVE
	.comm	_WMI_SNR_THRESHOLD3_ABOVE,4,2   ## @WMI_SNR_THRESHOLD3_ABOVE
	.comm	_WMI_SNR_THRESHOLD4_ABOVE,4,2   ## @WMI_SNR_THRESHOLD4_ABOVE
L_.str.1:                               ## @.str.1
	.asciz	"spurious lower snr threshold event: %d\n"

	.comm	_WMI_SNR_THRESHOLD4_BELOW,4,2   ## @WMI_SNR_THRESHOLD4_BELOW
	.comm	_WMI_SNR_THRESHOLD3_BELOW,4,2   ## @WMI_SNR_THRESHOLD3_BELOW
	.comm	_WMI_SNR_THRESHOLD2_BELOW,4,2   ## @WMI_SNR_THRESHOLD2_BELOW
	.comm	_WMI_SNR_THRESHOLD1_BELOW,4,2   ## @WMI_SNR_THRESHOLD1_BELOW
L_.str.2:                               ## @.str.2
	.asciz	"snr: %d, threshold: %d, lower: %d, upper: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"unable to configure snr threshold\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ath6kl_wmi_snr_threshold_event_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_wmi_snr_threshold_event_rx
_ath6kl_wmi_snr_threshold_event_rx:     ; @ath6kl_wmi_snr_threshold_event_rx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	cmp	w2, #15
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_24
LBB0_2:
	mov	x19, x0
	ldr	w25, [x1, #8]
	ldr	x20, [x1]
	ldr	x22, [x0]
Lloh2:
	adrp	x8, _SIGNAL_QUALITY_METRICS_SNR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SIGNAL_QUALITY_METRICS_SNR@GOTPAGEOFF]
Lloh4:
	ldr	x24, [x8]
	add	x21, x22, x24, lsl #5
Lloh5:
	adrp	x23, _ATH6KL_DBG_WMI@GOTPAGE
Lloh6:
	ldr	x23, [x23, _ATH6KL_DBG_WMI@GOTPAGEOFF]
	cbz	w25, LBB0_5
; %bb.3:
	ldr	x8, [x21]
	ldr	x9, [x8]
	cmp	x20, x9
	b.ge	LBB0_7
; %bb.4:
	ldr	w0, [x23]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_ath6kl_dbg
	b	LBB0_22
LBB0_5:
	ldr	x8, [x21, #8]
	ldr	x2, [x8]
	cmp	x20, x2
	b.le	LBB0_9
; %bb.6:
	ldr	w0, [x23]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ath6kl_dbg
	mov	w25, #0
	b	LBB0_22
LBB0_7:
	ldr	x9, [x8, #8]
	cmp	x20, x9
	b.ge	LBB0_11
; %bb.8:
Lloh11:
	adrp	x8, _WMI_SNR_THRESHOLD1_ABOVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WMI_SNR_THRESHOLD1_ABOVE@GOTPAGEOFF]
	b	LBB0_21
LBB0_9:
	ldr	x9, [x8, #8]
	cmp	x20, x9
	b.le	LBB0_13
; %bb.10:
Lloh13:
	adrp	x8, _WMI_SNR_THRESHOLD4_BELOW@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WMI_SNR_THRESHOLD4_BELOW@GOTPAGEOFF]
	b	LBB0_21
LBB0_11:
	ldr	x9, [x8, #16]
	cmp	x20, x9
	b.ge	LBB0_15
; %bb.12:
Lloh15:
	adrp	x8, _WMI_SNR_THRESHOLD2_ABOVE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WMI_SNR_THRESHOLD2_ABOVE@GOTPAGEOFF]
	b	LBB0_21
LBB0_13:
	ldr	x9, [x8, #16]
	cmp	x20, x9
	b.le	LBB0_17
; %bb.14:
Lloh17:
	adrp	x8, _WMI_SNR_THRESHOLD3_BELOW@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WMI_SNR_THRESHOLD3_BELOW@GOTPAGEOFF]
	b	LBB0_21
LBB0_15:
	ldr	x8, [x8, #24]
	cmp	x20, x8
	b.ge	LBB0_19
; %bb.16:
Lloh19:
	adrp	x8, _WMI_SNR_THRESHOLD3_ABOVE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WMI_SNR_THRESHOLD3_ABOVE@GOTPAGEOFF]
	b	LBB0_21
LBB0_17:
	ldr	x8, [x8, #24]
	cmp	x20, x8
	b.le	LBB0_20
; %bb.18:
Lloh21:
	adrp	x8, _WMI_SNR_THRESHOLD2_BELOW@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WMI_SNR_THRESHOLD2_BELOW@GOTPAGEOFF]
	b	LBB0_21
LBB0_19:
Lloh23:
	adrp	x8, _WMI_SNR_THRESHOLD4_ABOVE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _WMI_SNR_THRESHOLD4_ABOVE@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:
Lloh25:
	adrp	x8, _WMI_SNR_THRESHOLD1_BELOW@GOTPAGE
Lloh26:
	ldr	x8, [x8, _WMI_SNR_THRESHOLD1_BELOW@GOTPAGEOFF]
LBB0_21:
	ldr	w25, [x8]
LBB0_22:
	add	x24, x22, x24, lsl #5
	ldr	w2, [x24, #28]
	mov	x0, x20
	mov	x1, x21
	bl	_ath6kl_wmi_get_lower_threshold
	mov	x22, x0
	ldr	w2, [x24, #24]
	mov	x0, x20
	mov	x1, x21
	bl	_ath6kl_wmi_get_upper_threshold
	mov	x21, x0
	stp	x22, x0, [sp, #32]
	ldr	w8, [x24, #20]
	str	w8, [sp, #28]
	ldr	w0, [x24, #16]
	bl	_cpu_to_le32
	str	w0, [sp, #24]
	ldr	w0, [x23]
	stp	x22, x21, [sp, #8]
	str	x25, [sp]
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_ath6kl_dbg
	add	x1, sp, #24
	mov	x0, x19
	bl	_ath6kl_wmi_send_snr_threshold_params
	cbz	w0, LBB0_25
; %bb.23:
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ath6kl_err
Lloh31:
	adrp	x8, _EIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_25:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SIGNAL_QUALITY_METRICS_SNR,8,3 ; @SIGNAL_QUALITY_METRICS_SNR
	.comm	_ATH6KL_DBG_WMI,4,2             ; @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spurious upper snr threshold event: %d\n"

	.comm	_WMI_SNR_THRESHOLD1_ABOVE,4,2   ; @WMI_SNR_THRESHOLD1_ABOVE
	.comm	_WMI_SNR_THRESHOLD2_ABOVE,4,2   ; @WMI_SNR_THRESHOLD2_ABOVE
	.comm	_WMI_SNR_THRESHOLD3_ABOVE,4,2   ; @WMI_SNR_THRESHOLD3_ABOVE
	.comm	_WMI_SNR_THRESHOLD4_ABOVE,4,2   ; @WMI_SNR_THRESHOLD4_ABOVE
l_.str.1:                               ; @.str.1
	.asciz	"spurious lower snr threshold event: %d\n"

	.comm	_WMI_SNR_THRESHOLD4_BELOW,4,2   ; @WMI_SNR_THRESHOLD4_BELOW
	.comm	_WMI_SNR_THRESHOLD3_BELOW,4,2   ; @WMI_SNR_THRESHOLD3_BELOW
	.comm	_WMI_SNR_THRESHOLD2_BELOW,4,2   ; @WMI_SNR_THRESHOLD2_BELOW
	.comm	_WMI_SNR_THRESHOLD1_BELOW,4,2   ; @WMI_SNR_THRESHOLD1_BELOW
l_.str.2:                               ; @.str.2
	.asciz	"snr: %d, threshold: %d, lower: %d, upper: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"unable to configure snr threshold\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ath6kl_wmi_snr_threshold_event_rx
.subsections_via_symbols
