	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76x0_phy_tssi_adc_calibrate
_mt76x0_phy_tssi_adc_calibrate:         ## @mt76x0_phy_tssi_adc_calibrate
	.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
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	(%rdi), %r15
	movq	(%r15), %rax
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	sete	%cl
	leal	(%rcx,%rcx,4), %ebx
	orl	$524368, %ebx                   ## imm = 0x80050
	movq	_CORE@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	$34, %esi
	callq	_MT_BBP
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$34, %esi
	callq	_MT_BBP
	movl	%eax, %ebx
	movl	$4, %edi
	callq	_BIT
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movl	$200, %r8d
	callq	_mt76_poll_msec
	movl	(%r14), %edi
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	$35, %esi
	callq	_MT_BBP
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movzbl	%al, %eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rdx)
	movq	(%r15), %rcx
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_4
## %bb.3:
	subl	$-128, %eax
	movl	%eax, (%rdx)
LBB0_4:
	movl	(%r14), %edi
	movl	$34, %esi
	callq	_MT_BBP
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$524353, %edx                   ## imm = 0x80041
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$35, %esi
	callq	_MT_BBP
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movzbl	%al, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movl	(%r14), %edi
	movl	$34, %esi
	callq	_MT_BBP
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$524354, %edx                   ## imm = 0x80042
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$35, %esi
	callq	_MT_BBP
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movzbl	%al, %eax
	movl	%eax, 4(%rbx)
	movl	(%r14), %edi
	movl	$34, %esi
	callq	_MT_BBP
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$524355, %edx                   ## imm = 0x80043
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$35, %esi
	callq	_MT_BBP
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movzbl	%al, %eax
	movl	%eax, 8(%rbx)
	xorl	%r13d, %r13d
	jmp	LBB0_5
LBB0_1:
	movl	$34, %esi
	callq	_MT_BBP
	movl	%eax, %ebx
	movl	$4, %edi
	callq	_BIT
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mt76_clear
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_5:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_CORE,4,2                       ## @CORE
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_mt76x0_phy_tssi_adc_calibrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76x0_phy_tssi_adc_calibrate
_mt76x0_phy_tssi_adc_calibrate:         ; @mt76x0_phy_tssi_adc_calibrate
	.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	x21, x1
	mov	x19, x0
	mov	w23, #65
	movk	w23, #8, lsl #16
	ldr	x25, [x0]
	ldr	x8, [x25]
Lloh0:
	adrp	x26, _NL80211_BAND_5GHZ@GOTPAGE
Lloh1:
	ldr	x26, [x26, _NL80211_BAND_5GHZ@GOTPAGEOFF]
	ldr	x9, [x26]
	add	w10, w23, #15
	mov	w11, #20
	orr	w11, w23, w11
	cmp	x8, x9
	csel	w22, w11, w10, eq
Lloh2:
	adrp	x24, _CORE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _CORE@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	w1, #34
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_mt76_wr
	ldr	w0, [x24]
	mov	w1, #34
	bl	_MT_BBP
	mov	x22, x0
	mov	w0, #4
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
	mov	w4, #200
	bl	_mt76_poll_msec
	mov	x8, x0
	ldr	w0, [x24]
	cbz	w8, LBB0_4
; %bb.1:
	mov	w1, #35
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	and	w8, w0, #0xff
	str	w8, [x21]
	ldr	x9, [x25]
	ldr	x10, [x26]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.2:
	add	w8, w8, #128
	str	w8, [x21]
LBB0_3:
	ldr	w0, [x24]
	mov	w1, #34
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	mov	w2, #65
	movk	w2, #8, lsl #16
	bl	_mt76_wr
	ldr	w0, [x24]
	mov	w1, #35
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	and	w8, w0, #0xff
	str	w8, [x20]
	ldr	w0, [x24]
	mov	w1, #34
	bl	_MT_BBP
	mov	x1, x0
	add	w2, w23, #1
	mov	x0, x19
	bl	_mt76_wr
	ldr	w0, [x24]
	mov	w1, #35
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	and	w8, w0, #0xff
	str	w8, [x20, #4]
	ldr	w0, [x24]
	mov	w1, #34
	bl	_MT_BBP
	mov	x1, x0
	add	w2, w23, #2
	mov	x0, x19
	bl	_mt76_wr
	ldr	w0, [x24]
	mov	w1, #35
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	mov	x8, x0
	mov	w0, #0
	and	w8, w8, #0xff
	str	w8, [x20, #8]
	b	LBB0_5
LBB0_4:
	mov	w1, #34
	bl	_MT_BBP
	mov	x20, x0
	mov	w0, #4
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mt76_clear
Lloh4:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_CORE,4,2                       ; @CORE
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_mt76x0_phy_tssi_adc_calibrate
.subsections_via_symbols
