	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7615_mac_scs_check
_mt7615_mac_scs_check:                  ## @mt7615_mac_scs_check
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 24(%rdi)
	je	LBB0_14
## %bb.1:
	movq	%rdi, %r12
	xorl	%edi, %edi
	callq	_MT_MIB_MB_SDR0
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movq	%rax, %r15
	movq	_MT_MIB_RTS_RETRIES_COUNT_MASK@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	%rax, %rsi
	callq	_FIELD_GET
	testq	%rax, %rax
	jle	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	_MT_MIB_RTS_COUNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_FIELD_GET
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r15
	jmp	LBB0_4
LBB0_2:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
LBB0_4:
	movl	$1, %edi
	callq	_MT_MIB_MB_SDR0
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movq	%rax, %r13
	movl	(%r14), %edi
	movq	%rax, %rsi
	callq	_FIELD_GET
	cmpq	%r15, %rax
	jle	LBB0_6
## %bb.5:
	movq	%rax, %rbx
	movq	_MT_MIB_RTS_COUNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_FIELD_GET
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r15
LBB0_6:
	movl	$2, %edi
	callq	_MT_MIB_MB_SDR0
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movq	%rax, %r13
	movl	(%r14), %edi
	movq	%rax, %rsi
	callq	_FIELD_GET
	cmpq	%r15, %rax
	jle	LBB0_8
## %bb.7:
	movq	%rax, %rbx
	movq	_MT_MIB_RTS_COUNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_FIELD_GET
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r15
LBB0_8:
	movl	$3, %edi
	callq	_MT_MIB_MB_SDR0
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movq	%rax, %r13
	movl	(%r14), %edi
	movq	%rax, %rsi
	callq	_FIELD_GET
	cmpq	%r15, %rax
	jle	LBB0_10
## %bb.9:
	movq	%rax, %rbx
	movq	_MT_MIB_RTS_COUNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_FIELD_GET
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r15
LBB0_10:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_MT_WF_PHY_R0_B0_PHYCTRL_STS0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mt76_rr
	movq	%rax, %rbx
	movq	_MT_WF_PHYCTRL_STAT_PD_CCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_FIELD_GET
	movq	%rax, %r13
	movq	_MT_WF_PHYCTRL_STAT_PD_OFDM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_FIELD_GET
	movq	%rax, %rbx
	movq	_MT_WF_PHY_R0_B0_PHYCTRL_STS5@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mt76_rr
	movq	%rax, %r15
	movq	_MT_WF_PHYCTRL_STAT_MDRDY_CCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_FIELD_GET
	movq	%rax, %r14
	movq	_MT_WF_PHYCTRL_STAT_MDRDY_OFDM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	callq	_FIELD_GET
	subq	%rax, %rbx
	movq	%rbx, 16(%r12)
	subq	%r14, %r13
	movq	%r13, 8(%r12)
	movq	%r12, %rdi
	callq	_mt7615_mac_cca_stats_reset
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	%r15, %rsi
	je	LBB0_11
## %bb.12:
	movq	%r15, %rdi
	callq	_MT_FRAC
	movq	%rax, %rbx
	jmp	LBB0_13
LBB0_11:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_mt7615_mac_adjust_sensitivity
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_mt7615_mac_adjust_sensitivity
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rax,%rax,4), %rsi
	addq	%rsi, %rsi
	addq	(%r12), %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt7615_mac_set_default_sensitivity ## TAILCALL
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_MIB_RTS_RETRIES_COUNT_MASK,4,2 ## @MT_MIB_RTS_RETRIES_COUNT_MASK
	.comm	_MT_MIB_RTS_COUNT_MASK,4,2      ## @MT_MIB_RTS_COUNT_MASK
	.comm	_MT_WF_PHY_R0_B0_PHYCTRL_STS0,4,2 ## @MT_WF_PHY_R0_B0_PHYCTRL_STS0
	.comm	_MT_WF_PHYCTRL_STAT_PD_CCK,4,2  ## @MT_WF_PHYCTRL_STAT_PD_CCK
	.comm	_MT_WF_PHYCTRL_STAT_PD_OFDM,4,2 ## @MT_WF_PHYCTRL_STAT_PD_OFDM
	.comm	_MT_WF_PHY_R0_B0_PHYCTRL_STS5,4,2 ## @MT_WF_PHY_R0_B0_PHYCTRL_STS5
	.comm	_MT_WF_PHYCTRL_STAT_MDRDY_CCK,4,2 ## @MT_WF_PHYCTRL_STAT_MDRDY_CCK
	.comm	_MT_WF_PHYCTRL_STAT_MDRDY_OFDM,4,2 ## @MT_WF_PHYCTRL_STAT_MDRDY_OFDM
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_mt7615_mac_scs_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7615_mac_scs_check
_mt7615_mac_scs_check:                  ; @mt7615_mac_scs_check
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_15
; %bb.1:
	mov	x19, x0
	mov	w0, #0
	bl	_MT_MIB_MB_SDR0
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	mov	x21, x0
Lloh0:
	adrp	x25, _MT_MIB_RTS_RETRIES_COUNT_MASK@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MT_MIB_RTS_RETRIES_COUNT_MASK@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	x1, x21
	bl	_FIELD_GET
Lloh2:
	adrp	x24, _MT_MIB_RTS_COUNT_MASK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MT_MIB_RTS_COUNT_MASK@GOTPAGEOFF]
	cmp	x0, #1
	b.lt	LBB0_3
; %bb.2:
	mov	x20, x0
	ldr	w0, [x24]
	mov	x1, x21
	bl	_FIELD_GET
	mov	x21, x0
	b	LBB0_4
LBB0_3:
	mov	x20, #0
	mov	x21, #0
LBB0_4:
	mov	w0, #1
	bl	_MT_MIB_MB_SDR0
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	mov	x22, x0
	ldr	w0, [x25]
	mov	x1, x22
	bl	_FIELD_GET
	cmp	x0, x20
	b.le	LBB0_6
; %bb.5:
	mov	x23, x0
	ldr	w0, [x24]
	mov	x1, x22
	bl	_FIELD_GET
	mov	x21, x0
	mov	x20, x23
LBB0_6:
	mov	w0, #2
	bl	_MT_MIB_MB_SDR0
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	mov	x22, x0
	ldr	w0, [x25]
	mov	x1, x22
	bl	_FIELD_GET
	cmp	x0, x20
	b.le	LBB0_8
; %bb.7:
	mov	x23, x0
	ldr	w0, [x24]
	mov	x1, x22
	bl	_FIELD_GET
	mov	x21, x0
	mov	x20, x23
LBB0_8:
	mov	w0, #3
	bl	_MT_MIB_MB_SDR0
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	mov	x22, x0
	ldr	w0, [x25]
	mov	x1, x22
	bl	_FIELD_GET
	cmp	x0, x20
	b.le	LBB0_10
; %bb.9:
	mov	x23, x0
	ldr	w0, [x24]
	mov	x1, x22
	bl	_FIELD_GET
	mov	x21, x0
	mov	x20, x23
LBB0_10:
Lloh4:
	adrp	x8, _MT_WF_PHY_R0_B0_PHYCTRL_STS0@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MT_WF_PHY_R0_B0_PHYCTRL_STS0@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt76_rr
	mov	x22, x0
Lloh7:
	adrp	x8, _MT_WF_PHYCTRL_STAT_PD_CCK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MT_WF_PHYCTRL_STAT_PD_CCK@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_FIELD_GET
	mov	x23, x0
Lloh10:
	adrp	x8, _MT_WF_PHYCTRL_STAT_PD_OFDM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MT_WF_PHYCTRL_STAT_PD_OFDM@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_FIELD_GET
	mov	x22, x0
Lloh13:
	adrp	x8, _MT_WF_PHY_R0_B0_PHYCTRL_STS5@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MT_WF_PHY_R0_B0_PHYCTRL_STS5@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt76_rr
	mov	x24, x0
Lloh16:
	adrp	x8, _MT_WF_PHYCTRL_STAT_MDRDY_CCK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MT_WF_PHYCTRL_STAT_MDRDY_CCK@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	x1, x24
	bl	_FIELD_GET
	mov	x25, x0
Lloh19:
	adrp	x8, _MT_WF_PHYCTRL_STAT_MDRDY_OFDM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MT_WF_PHYCTRL_STAT_MDRDY_OFDM@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	x1, x24
	bl	_FIELD_GET
	sub	x8, x22, x0
	sub	x9, x23, x25
	stp	x9, x8, [x19, #8]
	mov	x0, x19
	bl	_mt7615_mac_cca_stats_reset
	adds	x1, x21, x20
	b.eq	LBB0_12
; %bb.11:
	mov	x0, x20
	bl	_MT_FRAC
	mov	x20, x0
	b	LBB0_13
LBB0_12:
	mov	x20, #0
LBB0_13:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_mt7615_mac_adjust_sensitivity
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_mt7615_mac_adjust_sensitivity
Lloh22:
	adrp	x8, _jiffies@GOTPAGE
Lloh23:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh25:
	adrp	x9, _HZ@GOTPAGE
Lloh26:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh27:
	ldrsw	x9, [x9]
	mov	w10, #10
	madd	x1, x9, x10, x8
	bl	_time_after
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mt7615_mac_set_default_sensitivity
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_MIB_RTS_RETRIES_COUNT_MASK,4,2 ; @MT_MIB_RTS_RETRIES_COUNT_MASK
	.comm	_MT_MIB_RTS_COUNT_MASK,4,2      ; @MT_MIB_RTS_COUNT_MASK
	.comm	_MT_WF_PHY_R0_B0_PHYCTRL_STS0,4,2 ; @MT_WF_PHY_R0_B0_PHYCTRL_STS0
	.comm	_MT_WF_PHYCTRL_STAT_PD_CCK,4,2  ; @MT_WF_PHYCTRL_STAT_PD_CCK
	.comm	_MT_WF_PHYCTRL_STAT_PD_OFDM,4,2 ; @MT_WF_PHYCTRL_STAT_PD_OFDM
	.comm	_MT_WF_PHY_R0_B0_PHYCTRL_STS5,4,2 ; @MT_WF_PHY_R0_B0_PHYCTRL_STS5
	.comm	_MT_WF_PHYCTRL_STAT_MDRDY_CCK,4,2 ; @MT_WF_PHYCTRL_STAT_MDRDY_CCK
	.comm	_MT_WF_PHYCTRL_STAT_MDRDY_OFDM,4,2 ; @MT_WF_PHYCTRL_STAT_MDRDY_OFDM
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_mt7615_mac_scs_check
.subsections_via_symbols
