	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76x0_phy_tssi_dc_calibrate
_mt76x0_phy_tssi_dc_calibrate:          ## @mt76x0_phy_tssi_dc_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movq	(%r12), %rax
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	movl	$67, %esi
	callq	_MT_RF
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$15, %edx
	callq	_mt76x0_rf_clear
LBB0_2:
	movq	_MT_RF_SETTING_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1610621495, %edx               ## imm = 0x60002237
	callq	_mt76_wr
	movq	_MT_RF_BYPASS_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$-1, %edx
	callq	_mt76_wr
	movq	_CORE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	$4, %esi
	callq	_MT_BBP
	movl	%eax, %r14d
	xorl	%edi, %edi
	callq	_BIT
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_mt76_set
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movl	(%r13), %edi
	movl	$4, %esi
	callq	_MT_BBP
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_BIT
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mt76_clear
	movq	(%r12), %rax
	xorl	%ecx, %ecx
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%cl
	leal	(%rcx,%rcx,4), %ebx
	orl	$524368, %ebx                   ## imm = 0x80050
	movl	(%r13), %edi
	movl	$34, %esi
	callq	_MT_BBP
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_mt76_wr
	movq	_TXBE@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	$6, %esi
	callq	_MT_BBP
	movl	%eax, %ebx
	movl	$31, %edi
	callq	_BIT
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mt76_wr
	movl	(%r13), %edi
	movl	$34, %esi
	callq	_MT_BBP
	movl	%eax, %ebx
	movl	$4, %edi
	callq	_BIT
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movl	$200, %r8d
	callq	_mt76_poll_msec
	movl	(%r13), %edi
	movl	$35, %esi
	callq	_MT_BBP
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movzbl	%al, %eax
	movl	%eax, (%r15)
	movq	_MT_RF_BYPASS_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_mt76_wr
	movl	(%r14), %edi
	movl	$6, %esi
	callq	_MT_BBP
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_mt76_wr
	movl	(%r13), %edi
	movl	$4, %esi
	callq	_MT_BBP
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_BIT
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mt76_set
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movl	(%r13), %edi
	movl	$4, %esi
	callq	_MT_BBP
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_BIT
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mt76_clear
	movq	(%r12), %rax
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	xorl	%edi, %edi
	movl	$67, %esi
	callq	_MT_RF
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$15, %edx
	movl	$4, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt76x0_rf_rmw                  ## TAILCALL
LBB0_3:
	addq	$8, %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	_MT_RF_SETTING_0,4,2            ## @MT_RF_SETTING_0
	.comm	_MT_RF_BYPASS_0,4,2             ## @MT_RF_BYPASS_0
	.comm	_CORE,4,2                       ## @CORE
	.comm	_TXBE,4,2                       ## @TXBE
	.no_dead_strip	_mt76x0_phy_tssi_dc_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_dc_calibrate
_mt76x0_phy_tssi_dc_calibrate:          ; @mt76x0_phy_tssi_dc_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	x19, x0
	ldr	x21, [x0, #8]
	ldr	x8, [x21]
Lloh0:
	adrp	x22, _NL80211_BAND_5GHZ@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NL80211_BAND_5GHZ@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	mov	w1, #67
	bl	_MT_RF
	mov	x1, x0
	mov	x0, x19
	mov	w2, #15
	bl	_mt76x0_rf_clear
LBB0_2:
Lloh2:
	adrp	x8, _MT_RF_SETTING_0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MT_RF_SETTING_0@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #8759
	movk	w2, #24576, lsl #16
	bl	_mt76_wr
Lloh5:
	adrp	x24, _MT_RF_BYPASS_0@GOTPAGE
Lloh6:
	ldr	x24, [x24, _MT_RF_BYPASS_0@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #-1
	bl	_mt76_wr
Lloh7:
	adrp	x23, _CORE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _CORE@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #4
	bl	_MT_BBP
	mov	x20, x0
	mov	w0, #0
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mt76_set
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w0, [x23]
	mov	w1, #4
	bl	_MT_BBP
	mov	x20, x0
	mov	w0, #0
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mt76_clear
	ldr	x8, [x21]
	ldr	x9, [x22]
	mov	w10, #5
	mov	w11, #80
	movk	w11, #8, lsl #16
	orr	w10, w11, w10
	cmp	x8, x9
	csel	w20, w10, w11, eq
	ldr	w0, [x23]
	mov	w1, #34
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_mt76_wr
Lloh9:
	adrp	x25, _TXBE@GOTPAGE
Lloh10:
	ldr	x25, [x25, _TXBE@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	w1, #6
	bl	_MT_BBP
	mov	x20, x0
	mov	w0, #31
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mt76_wr
	ldr	w0, [x23]
	mov	w1, #34
	bl	_MT_BBP
	mov	x20, x0
	mov	w0, #4
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	w4, #200
	bl	_mt76_poll_msec
	ldr	w0, [x23]
	mov	w1, #35
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	and	w8, w0, #0xff
	str	w8, [x19]
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #0
	bl	_mt76_wr
	ldr	w0, [x25]
	mov	w1, #6
	bl	_MT_BBP
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_mt76_wr
	ldr	w0, [x23]
	mov	w1, #4
	bl	_MT_BBP
	mov	x20, x0
	mov	w0, #0
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mt76_set
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w0, [x23]
	mov	w1, #4
	bl	_MT_BBP
	mov	x20, x0
	mov	w0, #0
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mt76_clear
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	mov	w1, #67
	bl	_MT_RF
	mov	x1, x0
	mov	x0, x19
	mov	w2, #15
	mov	w3, #4
	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	_mt76x0_rf_rmw
LBB0_4:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_MT_RF_SETTING_0,4,2            ; @MT_RF_SETTING_0
	.comm	_MT_RF_BYPASS_0,4,2             ; @MT_RF_BYPASS_0
	.comm	_CORE,4,2                       ; @CORE
	.comm	_TXBE,4,2                       ; @TXBE
	.no_dead_strip	_mt76x0_phy_tssi_dc_calibrate
.subsections_via_symbols
