	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_wmi_rssi_threshold_event_rx
_ath6kl_wmi_rssi_threshold_event_rx:    ## @ath6kl_wmi_rssi_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), %rcx
	jmp	LBB0_10
LBB0_2:
	movq	%rdi, %rbx
	movl	(%rsi), %edi
	movl	8(%rsi), %r12d
	callq	_a_sle16_to_cpu
	movq	%rax, %r13
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rbx
	movq	_SIGNAL_QUALITY_METRICS_RSSI@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	shlq	$5, %r14
	leaq	(%rbx,%r14), %r15
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.3:
	movq	(%r15), %rax
	cmpq	(%rax), %r13
	jge	LBB0_7
## %bb.4:
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_ath6kl_dbg
	jmp	LBB0_7
LBB0_5:
	movq	8(%rbx,%r14), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %r13
	jle	LBB0_7
## %bb.6:
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_ath6kl_dbg
LBB0_7:
	movl	28(%rbx,%r14), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ath6kl_wmi_get_lower_threshold
	movl	%eax, %r12d
	movl	24(%rbx,%r14), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ath6kl_wmi_get_upper_threshold
	movl	%eax, %edi
	callq	_a_cpu_to_sle16
	movq	%rax, -56(%rbp)
	movl	%r12d, %edi
	callq	_a_cpu_to_sle16
	movq	%rax, -64(%rbp)
	movl	20(%rbx,%r14), %eax
	movl	%eax, -68(%rbp)
	movl	16(%rbx,%r14), %edi
	callq	_cpu_to_le32
	movl	%eax, -72(%rbp)
	leaq	-72(%rbp), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ath6kl_wmi_send_rssi_threshold_params
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	callq	_ath6kl_err
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SIGNAL_QUALITY_METRICS_RSSI,8,3 ## @SIGNAL_QUALITY_METRICS_RSSI
	.comm	_ATH6KL_DBG_WMI,4,2             ## @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spurious upper rssi threshold event: %d\n"

	.comm	_WMI_RSSI_THRESHOLD1_ABOVE,4,2  ## @WMI_RSSI_THRESHOLD1_ABOVE
	.comm	_WMI_RSSI_THRESHOLD2_ABOVE,4,2  ## @WMI_RSSI_THRESHOLD2_ABOVE
	.comm	_WMI_RSSI_THRESHOLD3_ABOVE,4,2  ## @WMI_RSSI_THRESHOLD3_ABOVE
	.comm	_WMI_RSSI_THRESHOLD4_ABOVE,4,2  ## @WMI_RSSI_THRESHOLD4_ABOVE
	.comm	_WMI_RSSI_THRESHOLD5_ABOVE,4,2  ## @WMI_RSSI_THRESHOLD5_ABOVE
	.comm	_WMI_RSSI_THRESHOLD6_ABOVE,4,2  ## @WMI_RSSI_THRESHOLD6_ABOVE
L_.str.1:                               ## @.str.1
	.asciz	"spurious lower rssi threshold event: %d %d\n"

	.comm	_WMI_RSSI_THRESHOLD6_BELOW,4,2  ## @WMI_RSSI_THRESHOLD6_BELOW
	.comm	_WMI_RSSI_THRESHOLD5_BELOW,4,2  ## @WMI_RSSI_THRESHOLD5_BELOW
	.comm	_WMI_RSSI_THRESHOLD4_BELOW,4,2  ## @WMI_RSSI_THRESHOLD4_BELOW
	.comm	_WMI_RSSI_THRESHOLD3_BELOW,4,2  ## @WMI_RSSI_THRESHOLD3_BELOW
	.comm	_WMI_RSSI_THRESHOLD2_BELOW,4,2  ## @WMI_RSSI_THRESHOLD2_BELOW
	.comm	_WMI_RSSI_THRESHOLD1_BELOW,4,2  ## @WMI_RSSI_THRESHOLD1_BELOW
L_.str.2:                               ## @.str.2
	.asciz	"unable to configure rssi thresholds\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ath6kl_wmi_rssi_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_rssi_threshold_event_rx
_ath6kl_wmi_rssi_threshold_event_rx:    ; @ath6kl_wmi_rssi_threshold_event_rx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cmp	w2, #15
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	mov	x19, x0
	ldr	w24, [x1, #8]
	ldr	w0, [x1]
	bl	_a_sle16_to_cpu
	mov	x20, x0
	ldr	x22, [x19]
Lloh2:
	adrp	x8, _SIGNAL_QUALITY_METRICS_RSSI@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SIGNAL_QUALITY_METRICS_RSSI@GOTPAGEOFF]
Lloh4:
	ldr	x23, [x8]
	add	x21, x22, x23, lsl #5
	cbz	w24, LBB0_5
; %bb.3:
	ldr	x8, [x21]
	ldr	x8, [x8]
	cmp	x20, x8
	b.ge	LBB0_8
; %bb.4:
Lloh5:
	adrp	x8, _ATH6KL_DBG_WMI@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATH6KL_DBG_WMI@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	cmp	x20, x8
	b.le	LBB0_8
; %bb.6:
Lloh10:
	adrp	x9, _ATH6KL_DBG_WMI@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ATH6KL_DBG_WMI@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x2, x20
	bl	_ath6kl_dbg
LBB0_8:
	add	x23, x22, x23, lsl #5
	ldr	w2, [x23, #28]
	mov	x0, x20
	mov	x1, x21
	bl	_ath6kl_wmi_get_lower_threshold
	mov	x22, x0
	ldr	w2, [x23, #24]
	mov	x0, x20
	mov	x1, x21
	bl	_ath6kl_wmi_get_upper_threshold
	bl	_a_cpu_to_sle16
	str	x0, [sp, #24]
	mov	x0, x22
	bl	_a_cpu_to_sle16
	str	x0, [sp, #16]
	ldr	w8, [x23, #20]
	str	w8, [sp, #12]
	ldr	w0, [x23, #16]
	bl	_cpu_to_le32
	str	w0, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_ath6kl_wmi_send_rssi_threshold_params
	cbz	w0, LBB0_11
; %bb.9:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ath6kl_err
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SIGNAL_QUALITY_METRICS_RSSI,8,3 ; @SIGNAL_QUALITY_METRICS_RSSI
	.comm	_ATH6KL_DBG_WMI,4,2             ; @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spurious upper rssi threshold event: %d\n"

	.comm	_WMI_RSSI_THRESHOLD1_ABOVE,4,2  ; @WMI_RSSI_THRESHOLD1_ABOVE
	.comm	_WMI_RSSI_THRESHOLD2_ABOVE,4,2  ; @WMI_RSSI_THRESHOLD2_ABOVE
	.comm	_WMI_RSSI_THRESHOLD3_ABOVE,4,2  ; @WMI_RSSI_THRESHOLD3_ABOVE
	.comm	_WMI_RSSI_THRESHOLD4_ABOVE,4,2  ; @WMI_RSSI_THRESHOLD4_ABOVE
	.comm	_WMI_RSSI_THRESHOLD5_ABOVE,4,2  ; @WMI_RSSI_THRESHOLD5_ABOVE
	.comm	_WMI_RSSI_THRESHOLD6_ABOVE,4,2  ; @WMI_RSSI_THRESHOLD6_ABOVE
l_.str.1:                               ; @.str.1
	.asciz	"spurious lower rssi threshold event: %d %d\n"

	.comm	_WMI_RSSI_THRESHOLD6_BELOW,4,2  ; @WMI_RSSI_THRESHOLD6_BELOW
	.comm	_WMI_RSSI_THRESHOLD5_BELOW,4,2  ; @WMI_RSSI_THRESHOLD5_BELOW
	.comm	_WMI_RSSI_THRESHOLD4_BELOW,4,2  ; @WMI_RSSI_THRESHOLD4_BELOW
	.comm	_WMI_RSSI_THRESHOLD3_BELOW,4,2  ; @WMI_RSSI_THRESHOLD3_BELOW
	.comm	_WMI_RSSI_THRESHOLD2_BELOW,4,2  ; @WMI_RSSI_THRESHOLD2_BELOW
	.comm	_WMI_RSSI_THRESHOLD1_BELOW,4,2  ; @WMI_RSSI_THRESHOLD1_BELOW
l_.str.2:                               ; @.str.2
	.asciz	"unable to configure rssi thresholds\n"

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