	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7615_mac_adjust_sensitivity
_mt7615_mac_adjust_sensitivity:         ## @mt7615_mac_adjust_sensitivity
	.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	%rsi, %rbx
	movq	%rdi, %r12
	xorl	%r14d, %r14d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	sete	%r14b
	movl	$-110, %eax
	movl	$-98, %r13d
	cmovel	%eax, %r13d
	movl	(%rdi,%r14,4), %r15d
	addq	$20, %rdi
	callq	_mt76_get_min_avg_rssi
	testl	%eax, %eax
	je	LBB0_20
## %bb.1:
	leaq	8(,%r14,4), %r14
	movl	%eax, %edi
	movl	$-72, %esi
	callq	_min
	movl	%eax, %edx
	cmpl	$501, %r15d                     ## imm = 0x1F5
	jl	LBB0_7
## %bb.2:
	movl	%edx, %r15d
	movl	$40, %edi
	movl	$100, %esi
	callq	_MT_FRAC
	cmpq	%rbx, %rax
	jl	LBB0_19
## %bb.3:
	movl	(%r12,%r14), %ebx
	cmpl	%r13d, %ebx
	movl	%r15d, %edx
	jne	LBB0_6
## %bb.4:
	cmpl	$-89, %edx
	jl	LBB0_6
## %bb.5:
	movl	$-90, (%r12,%r14)
	movl	$-90, %ebx
	xorl	%eax, %eax
	cmpl	%edx, %ebx
	jg	LBB0_13
	jmp	LBB0_14
LBB0_20:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt7615_mac_set_default_sensitivity ## TAILCALL
LBB0_7:
	decl	%r15d
	cmpl	$49, %r15d
	jb	LBB0_10
## %bb.8:
	movl	$60, %edi
	movl	$100, %esi
	movl	%edx, %r15d
	callq	_MT_FRAC
	movl	%r15d, %edx
	cmpq	%rbx, %rax
	jge	LBB0_9
LBB0_10:
	movl	(%r12,%r14), %ebx
	leal	-2(%rbx), %ecx
	movb	$1, %al
	cmpl	%r13d, %ecx
	jge	LBB0_11
	jmp	LBB0_12
LBB0_6:
	leal	2(%rbx), %ecx
	movb	$1, %al
	cmpl	%edx, %ecx
	jge	LBB0_12
LBB0_11:
	movl	%ecx, (%r12,%r14)
	xorl	%eax, %eax
	movl	%ecx, %ebx
LBB0_12:
	cmpl	%edx, %ebx
	jle	LBB0_14
LBB0_13:
	movl	%edx, (%r12,%r14)
	movl	%edx, %ebx
	jmp	LBB0_15
LBB0_9:
	movl	(%r12,%r14), %ebx
	movb	$1, %al
	cmpl	%edx, %ebx
	jg	LBB0_13
LBB0_14:
	testb	%al, %al
	jne	LBB0_19
LBB0_15:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_17
## %bb.16:
	leal	(%rbx,%rbx), %edi
	addl	$512, %edi                      ## imm = 0x200
	movq	_MT_WF_PHY_B0_MIN_PRI_PWR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_MT_WF_PHY_B0_PD_OFDM_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_MT_WF_PHY_B0_PD_OFDM
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	jmp	LBB0_18
LBB0_17:
	addl	$256, %ebx                      ## imm = 0x100
	movq	_MT_WF_PHY_B0_RXTD_CCK_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_MT_WF_PHY_B0_PD_CCK_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	callq	_MT_WF_PHY_B0_PD_CCK
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_mt76_rmw
	movq	_MT_WF_PHY_B1_RXTD_CCK_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_MT_WF_PHY_B1_PD_CCK_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	callq	_MT_WF_PHY_B1_PD_CCK
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
LBB0_18:
	movl	%eax, %ecx
	callq	_mt76_rmw
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_WF_PHY_B0_MIN_PRI_PWR,4,2   ## @MT_WF_PHY_B0_MIN_PRI_PWR
	.comm	_MT_WF_PHY_B0_PD_OFDM_MASK,4,2  ## @MT_WF_PHY_B0_PD_OFDM_MASK
	.comm	_MT_WF_PHY_B0_RXTD_CCK_PD,4,2   ## @MT_WF_PHY_B0_RXTD_CCK_PD
	.comm	_MT_WF_PHY_B0_PD_CCK_MASK,4,2   ## @MT_WF_PHY_B0_PD_CCK_MASK
	.comm	_MT_WF_PHY_B1_RXTD_CCK_PD,4,2   ## @MT_WF_PHY_B1_RXTD_CCK_PD
	.comm	_MT_WF_PHY_B1_PD_CCK_MASK,4,2   ## @MT_WF_PHY_B1_PD_CCK_MASK
	.comm	_jiffies,4,2                    ## @jiffies
	.no_dead_strip	_mt7615_mac_adjust_sensitivity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7615_mac_adjust_sensitivity
_mt7615_mac_adjust_sensitivity:         ; @mt7615_mac_adjust_sensitivity
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	mov	w8, #-98
	mov	w9, #-110
	cmp	w2, #0
	csel	w24, w9, w8, eq
	cset	w8, eq
	ldr	w25, [x0, w8, uxtw #2]
	mov	w8, #8
	mov	w9, #12
	csel	x23, x9, x8, eq
	add	x0, x0, #20
	bl	_mt76_get_min_avg_rssi
	cbz	w0, LBB0_6
; %bb.1:
	mov	w1, #-72
	bl	_min
	mov	x21, x0
	cmp	w25, #501
	b.lt	LBB0_7
; %bb.2:
	mov	w0, #40
	mov	w1, #100
	bl	_MT_FRAC
	cmp	x0, x22
	b.lt	LBB0_20
; %bb.3:
	ldr	w8, [x19, x23]
	cmp	w8, w24
	b.ne	LBB0_10
; %bb.4:
	cmn	w21, #89
	b.lt	LBB0_10
; %bb.5:
	mov	w9, #0
	mov	w8, #-90
	str	w8, [x19, x23]
	cmp	w8, w21
	b.le	LBB0_12
	b	LBB0_17
LBB0_6:
	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_7:
	sub	w8, w25, #1
	cmp	w8, #49
	b.lo	LBB0_9
; %bb.8:
	mov	w0, #60
	mov	w1, #100
	bl	_MT_FRAC
	cmp	x0, x22
	b.ge	LBB0_15
LBB0_9:
	ldr	w8, [x19, x23]
	sub	w10, w8, #2
	cmp	w10, w24
	b.ge	LBB0_11
	b	LBB0_16
LBB0_10:
	add	w10, w8, #2
	cmp	w10, w21
	b.ge	LBB0_16
LBB0_11:
	mov	w9, #0
	str	w10, [x19, x23]
	mov	x8, x10
	cmp	w8, w21
	b.gt	LBB0_17
LBB0_12:
	tbnz	w9, #0, LBB0_20
; %bb.13:
	cbz	w20, LBB0_18
LBB0_14:
	lsl	w8, w8, #1
	add	w0, w8, #512
Lloh0:
	adrp	x8, _MT_WF_PHY_B0_MIN_PRI_PWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_WF_PHY_B0_MIN_PRI_PWR@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _MT_WF_PHY_B0_PD_OFDM_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT_WF_PHY_B0_PD_OFDM_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	bl	_MT_WF_PHY_B0_PD_OFDM
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	b	LBB0_19
LBB0_15:
	ldr	w8, [x19, x23]
LBB0_16:
	mov	w9, #1
	cmp	w8, w21
	b.le	LBB0_12
LBB0_17:
	str	w21, [x19, x23]
	mov	x8, x21
	cbnz	w20, LBB0_14
LBB0_18:
	add	w20, w8, #256
Lloh6:
	adrp	x8, _MT_WF_PHY_B0_RXTD_CCK_PD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MT_WF_PHY_B0_RXTD_CCK_PD@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
Lloh9:
	adrp	x8, _MT_WF_PHY_B0_PD_CCK_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT_WF_PHY_B0_PD_CCK_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_MT_WF_PHY_B0_PD_CCK
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_mt76_rmw
Lloh12:
	adrp	x8, _MT_WF_PHY_B1_RXTD_CCK_PD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MT_WF_PHY_B1_RXTD_CCK_PD@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
Lloh15:
	adrp	x8, _MT_WF_PHY_B1_PD_CCK_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MT_WF_PHY_B1_PD_CCK_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_MT_WF_PHY_B1_PD_CCK
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
LBB0_19:
	bl	_mt76_rmw
Lloh18:
	adrp	x8, _jiffies@GOTPAGE
Lloh19:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19, #16]
LBB0_20:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_WF_PHY_B0_MIN_PRI_PWR,4,2   ; @MT_WF_PHY_B0_MIN_PRI_PWR
	.comm	_MT_WF_PHY_B0_PD_OFDM_MASK,4,2  ; @MT_WF_PHY_B0_PD_OFDM_MASK
	.comm	_MT_WF_PHY_B0_RXTD_CCK_PD,4,2   ; @MT_WF_PHY_B0_RXTD_CCK_PD
	.comm	_MT_WF_PHY_B0_PD_CCK_MASK,4,2   ; @MT_WF_PHY_B0_PD_CCK_MASK
	.comm	_MT_WF_PHY_B1_RXTD_CCK_PD,4,2   ; @MT_WF_PHY_B1_RXTD_CCK_PD
	.comm	_MT_WF_PHY_B1_PD_CCK_MASK,4,2   ; @MT_WF_PHY_B1_PD_CCK_MASK
	.comm	_jiffies,4,2                    ; @jiffies
	.no_dead_strip	_mt7615_mac_adjust_sensitivity
.subsections_via_symbols
