	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_init_cal_pcoem
_ar9003_hw_init_cal_pcoem:              ## @ar9003_hw_init_cal_pcoem
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_ath9k_hw_common
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	32(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$1, -48(%rbp)
	movq	_ATH9K_HW_CAP_RTT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	16(%r15), %r12d
	movq	_AR_PHY_AGC_CONTROL_OFFSET_CAL@GOTPCREL(%rip), %rcx
	movq	_AR_PHY_AGC_CONTROL_FLTR_CAL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	orl	(%rcx), %eax
	movq	_AR_PHY_AGC_CONTROL_PKDET_CAL@GOTPCREL(%rip), %r13
	orl	(%r13), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	20(%r15), %edx
	movl	24(%r15), %esi
	movq	%r15, %rdi
	callq	_ar9003_hw_set_chain_masks
	testl	%r12d, %r12d
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ar9003_hw_rtt_restore
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_AR_PHY_AGC_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	movl	(%rbx), %edx
	movq	_AR_PHY_AGC_CONTROL_OFFSET_CAL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	orl	(%r13), %edx
	andl	%eax, -64(%rbp)                 ## 4-byte Folded Spill
	notl	%edx
	andl	%eax, %edx
	movl	(%r12), %esi
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	callq	_REG_WRITE
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	jmp	LBB0_5
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movb	$1, %al
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movq	%r14, %r12
	jmp	LBB0_5
LBB0_3:
	movq	%r14, %r12
	movq	_CALIBRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_ath_dbg
	movq	%r15, %rdi
	callq	_ar9003_hw_rtt_enable
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ar9003_hw_rtt_set_mask
	movq	%r15, %rdi
	callq	_ar9003_hw_rtt_clear_hist
	movl	$1, %r13d
	movb	$1, %al
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_5:
	movq	_TX_CL_CAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r13d, %r14d
	testl	%eax, 4(%r15)
	je	LBB0_10
## %bb.6:
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.7:
	movq	_TXCLCAL_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_AR_PHY_CL_CAL_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_CL_CAL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_REG_CLR_BIT
	movl	%r13d, %r14d
	jmp	LBB0_10
LBB0_9:
	movq	_AR_PHY_CL_CAL_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_CL_CAL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_REG_SET_BIT
	movl	$1, %r14d
LBB0_10:
	movq	%r12, %rdi
	callq	_IS_CHAN_HALF_RATE
	movb	$1, %bl
	testq	%rax, %rax
	jne	LBB0_19
## %bb.11:
	movq	%r12, %rdi
	callq	_IS_CHAN_QUARTER_RATE
	testq	%rax, %rax
	je	LBB0_12
LBB0_19:
	movq	%r15, %rdi
	callq	_ath9k_hw_mci_is_enabled
	testq	%rax, %rax
	je	LBB0_23
## %bb.20:
	movq	%r12, %rdi
	callq	_IS_CHAN_2GHZ
	testl	%r14d, %r14d
	je	LBB0_23
## %bb.21:
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ar9003_mci_init_cal_req
LBB0_23:
	movl	%r13d, -88(%rbp)                ## 4-byte Spill
	movq	_AR_PHY_CL_CAL_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	movq	_AR_PHY_CL_CAL_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movl	%ebx, -84(%rbp)                 ## 4-byte Spill
	je	LBB0_24
## %bb.25:
	movq	_AR_PHY_RX_DELAY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_AR_PHY_ACTIVE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_AR_PHY_ACTIVE_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_REG_WRITE
	movl	$5, %edi
	callq	_udelay
	movl	(%rbx), %esi
	movq	_AR_PHY_RX_DELAY_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_REG_WRITE
	movl	(%r12), %esi
	movq	_AR_PHY_ACTIVE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_REG_WRITE
	testl	%r14d, %r14d
	jne	LBB0_28
	jmp	LBB0_27
LBB0_24:
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	testl	%r14d, %r14d
	jne	LBB0_28
LBB0_27:
	movq	_AH_FASTCC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %r13d
	testl	%eax, (%r15)
	jne	LBB0_29
LBB0_28:
	movq	_AR_PHY_AGC_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_REG_READ
	movq	_AR_PHY_AGC_CONTROL_CAL@GOTPCREL(%rip), %r13
	orl	(%r13), %eax
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_REG_WRITE
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	_AH_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_ath9k_hw_wait
	movl	%eax, %r13d
	movq	%r15, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	-88(%rbp), %edx                 ## 4-byte Reload
	callq	_ar9003_hw_do_pcoem_manual_peak_cal
LBB0_29:
	movq	_AR_PHY_CL_CAL_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	movq	_AR_PHY_CL_CAL_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_31
## %bb.30:
	movq	_AR_PHY_RX_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movl	$5, %edi
	callq	_udelay
LBB0_31:
	movq	%r15, %rdi
	callq	_ath9k_hw_mci_is_enabled
	testq	%rax, %rax
	je	LBB0_35
## %bb.32:
	movq	%rbx, %rdi
	callq	_IS_CHAN_2GHZ
	testl	%r14d, %r14d
	je	LBB0_35
## %bb.33:
	testq	%rax, %rax
	je	LBB0_35
## %bb.34:
	movq	%r15, %rdi
	callq	_ar9003_mci_init_cal_done
LBB0_35:
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_37
## %bb.36:
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	orl	-52(%rbp), %edx                 ## 4-byte Folded Reload
	movq	_AR_PHY_AGC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_WRITE
LBB0_37:
	testl	%r13d, %r13d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_38
## %bb.41:
	cmpb	$0, -84(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_42
## %bb.43:
	testq	%rbx, %rbx
	je	LBB0_46
## %bb.44:
	movq	_TXIQCAL_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_46
## %bb.45:
	movq	%r15, %rdi
	callq	_ar9003_hw_tx_iq_cal_reload
	jmp	LBB0_46
LBB0_38:
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_40
## %bb.39:
	movq	%r15, %rdi
	callq	_ar9003_hw_rtt_disable
LBB0_40:
	movq	_CALIBRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AH_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_ath_dbg
	jmp	LBB0_55
LBB0_42:
	movl	-48(%rbp), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ar9003_hw_tx_iq_cal_post_proc
LBB0_46:
	movl	-48(%rbp), %esi
	movq	%r15, %rdi
	callq	_ar9003_hw_cl_cal_post_proc
	testq	%rbx, %rbx
	setne	%al
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	andb	%al, %cl
	cmpb	$1, %cl
	jne	LBB0_54
## %bb.47:
	cmpl	$0, -48(%rbp)
	je	LBB0_53
## %bb.48:
	movq	%r15, %rdi
	callq	_ath9k_hw_rfbus_req
	movq	%r15, %rdi
	testl	%eax, %eax
	je	LBB0_49
## %bb.50:
	callq	_ar9003_hw_rtt_fill_hist
	movq	_SW_PKDET_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_52
## %bb.51:
	movq	%r15, %rdi
	callq	_ar9003_hw_rtt_load_hist
	jmp	LBB0_52
LBB0_12:
	movq	_TX_IQ_CAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_19
## %bb.13:
	movq	_AR_PHY_TX_IQCAL_CONTROL_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DELPT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_REG_RMW_FIELD
	movq	_TX_IQ_ON_AGC_CAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_19
## %bb.14:
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.15:
	movq	_TXIQCAL_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_16
LBB0_17:
	movq	_AR_PHY_TX_IQCAL_CONTROL_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_REG_CLR_BIT
	jmp	LBB0_18
LBB0_49:
	callq	_ath9k_hw_common
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdi
	callq	_ath_err
LBB0_52:
	movq	%r15, %rdi
	callq	_ath9k_hw_rfbus_done
LBB0_53:
	movq	%r15, %rdi
	callq	_ar9003_hw_rtt_disable
LBB0_54:
	movl	8(%r15), %edx
	movl	12(%r15), %esi
	movq	%r15, %rdi
	callq	_ar9003_hw_set_chain_masks
	movq	%r15, %rdi
	callq	_ar9003_hw_init_cal_common
	movl	$1, %ebx
LBB0_55:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_AR_PHY_TX_IQCAL_CONTROL_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_REG_SET_BIT
LBB0_18:
	movl	$1, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH9K_HW_CAP_RTT,4,2           ## @ATH9K_HW_CAP_RTT
	.comm	_AR_PHY_AGC_CONTROL_OFFSET_CAL,4,2 ## @AR_PHY_AGC_CONTROL_OFFSET_CAL
	.comm	_AR_PHY_AGC_CONTROL_FLTR_CAL,4,2 ## @AR_PHY_AGC_CONTROL_FLTR_CAL
	.comm	_AR_PHY_AGC_CONTROL_PKDET_CAL,4,2 ## @AR_PHY_AGC_CONTROL_PKDET_CAL
	.comm	_CALIBRATE,4,2                  ## @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RTT calibration to be done\n"

	.comm	_AR_PHY_AGC_CONTROL,4,2         ## @AR_PHY_AGC_CONTROL
	.comm	_AH_FASTCC,4,2                  ## @AH_FASTCC
	.comm	_TX_CL_CAL,4,2                  ## @TX_CL_CAL
	.comm	_TXCLCAL_DONE,4,2               ## @TXCLCAL_DONE
	.comm	_AR_PHY_CL_CAL_CTL,4,2          ## @AR_PHY_CL_CAL_CTL
	.comm	_AR_PHY_CL_CAL_ENABLE,4,2       ## @AR_PHY_CL_CAL_ENABLE
	.comm	_TX_IQ_CAL,4,2                  ## @TX_IQ_CAL
	.comm	_AR_PHY_TX_IQCAL_CONTROL_1,4,2  ## @AR_PHY_TX_IQCAL_CONTROL_1
	.comm	_AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT,4,2 ## @AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT
	.comm	_DELPT,4,2                      ## @DELPT
	.comm	_TX_IQ_ON_AGC_CAL,4,2           ## @TX_IQ_ON_AGC_CAL
	.comm	_TXIQCAL_DONE,4,2               ## @TXIQCAL_DONE
	.comm	_AR_PHY_TX_IQCAL_CONTROL_0,4,2  ## @AR_PHY_TX_IQCAL_CONTROL_0
	.comm	_AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL,4,2 ## @AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL
	.comm	_AR_PHY_RX_DELAY,4,2            ## @AR_PHY_RX_DELAY
	.comm	_AR_PHY_ACTIVE,4,2              ## @AR_PHY_ACTIVE
	.comm	_AR_PHY_ACTIVE_DIS,4,2          ## @AR_PHY_ACTIVE_DIS
	.comm	_AR_PHY_RX_DELAY_DELAY,4,2      ## @AR_PHY_RX_DELAY_DELAY
	.comm	_AR_PHY_ACTIVE_EN,4,2           ## @AR_PHY_ACTIVE_EN
	.comm	_AR_PHY_AGC_CONTROL_CAL,4,2     ## @AR_PHY_AGC_CONTROL_CAL
	.comm	_AH_WAIT_TIMEOUT,4,2            ## @AH_WAIT_TIMEOUT
L_.str.1:                               ## @.str.1
	.asciz	"offset calibration failed to complete in %d ms; noisy environment?\n"

L_.str.2:                               ## @.str.2
	.asciz	"Could not stop baseband\n"

	.comm	_SW_PKDET_DONE,4,2              ## @SW_PKDET_DONE
	.no_dead_strip	_ar9003_hw_init_cal_pcoem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_hw_init_cal_pcoem
_ar9003_hw_init_cal_pcoem:              ; @ar9003_hw_init_cal_pcoem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x1
	mov	x19, x0
	bl	_ath9k_hw_common
	mov	x21, x0
	ldr	x8, [x19, #32]
	str	x8, [sp, #48]                   ; 8-byte Folded Spill
	mov	w8, #1
	str	w8, [sp, #60]
Lloh0:
	adrp	x8, _ATH9K_HW_CAP_RTT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH9K_HW_CAP_RTT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w2, [x19, #16]
	and	w25, w8, w9
Lloh3:
	adrp	x23, _AR_PHY_AGC_CONTROL_OFFSET_CAL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _AR_PHY_AGC_CONTROL_OFFSET_CAL@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh5:
	adrp	x24, _AR_PHY_AGC_CONTROL_FLTR_CAL@GOTPAGE
Lloh6:
	ldr	x24, [x24, _AR_PHY_AGC_CONTROL_FLTR_CAL@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
Lloh7:
	adrp	x20, _AR_PHY_AGC_CONTROL_PKDET_CAL@GOTPAGE
Lloh8:
	ldr	x20, [x20, _AR_PHY_AGC_CONTROL_PKDET_CAL@GOTPAGEOFF]
	ldr	w9, [x20]
	orr	w26, w8, w9
	ldr	w1, [x19, #24]
	mov	x0, x19
	bl	_ar9003_hw_set_chain_masks
	str	x21, [sp, #16]                  ; 8-byte Folded Spill
	cbz	w25, LBB0_3
; %bb.1:
	mov	x0, x19
	mov	x1, x22
	bl	_ar9003_hw_rtt_restore
	cbz	w0, LBB0_4
; %bb.2:
Lloh9:
	adrp	x25, _AR_PHY_AGC_CONTROL@GOTPAGE
Lloh10:
	ldr	x25, [x25, _AR_PHY_AGC_CONTROL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_REG_READ
	and	w26, w0, w26
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x20]
	orr	w8, w8, w9
	bic	w2, w0, w8
	ldr	w1, [x25]
	mov	x0, x19
	str	w2, [sp, #28]                   ; 4-byte Folded Spill
	bl	_REG_WRITE
	str	wzr, [sp, #40]                  ; 4-byte Folded Spill
	mov	w27, #0
	b	LBB0_5
LBB0_3:
	mov	w8, #1
	str	w8, [sp, #40]                   ; 4-byte Folded Spill
	mov	w27, #0
	str	wzr, [sp, #28]                  ; 4-byte Folded Spill
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _CALIBRATE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CALIBRATE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_ath_dbg
	mov	x0, x19
	bl	_ar9003_hw_rtt_enable
	mov	x0, x19
	mov	w1, #0
	bl	_ar9003_hw_rtt_set_mask
	mov	x0, x19
	bl	_ar9003_hw_rtt_clear_hist
	str	wzr, [sp, #28]                  ; 4-byte Folded Spill
	mov	w8, #1
	str	w8, [sp, #40]                   ; 4-byte Folded Spill
	mov	w27, #1
LBB0_5:
	ldr	w8, [x19, #4]
Lloh16:
	adrp	x9, _TX_CL_CAL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _TX_CL_CAL@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x25, _AR_PHY_CL_CAL_CTL@GOTPAGE
Lloh20:
	ldr	x25, [x25, _AR_PHY_CL_CAL_CTL@GOTPAGEOFF]
Lloh21:
	adrp	x20, _AR_PHY_CL_CAL_ENABLE@GOTPAGE
Lloh22:
	ldr	x20, [x20, _AR_PHY_CL_CAL_ENABLE@GOTPAGEOFF]
	mov	x21, x27
	tst	w9, w8
	b.eq	LBB0_10
; %bb.6:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_9
; %bb.7:
Lloh23:
	adrp	x8, _TXCLCAL_DONE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TXCLCAL_DONE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldr	x1, [sp, #48]                   ; 8-byte Folded Reload
	bl	_test_bit
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w1, [x25]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_REG_CLR_BIT
	mov	x21, x27
	b	LBB0_10
LBB0_9:
	ldr	w1, [x25]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_REG_SET_BIT
	mov	w21, #1
LBB0_10:
	mov	x0, x22
	bl	_IS_CHAN_HALF_RATE
	cbnz	x0, LBB0_12
; %bb.11:
	mov	x0, x22
	bl	_IS_CHAN_QUARTER_RATE
	cbz	x0, LBB0_46
LBB0_12:
	mov	w23, #1
LBB0_13:
	mov	x0, x19
	bl	_ath9k_hw_mci_is_enabled
	cbz	x0, LBB0_17
; %bb.14:
	mov	x0, x22
	bl	_IS_CHAN_2GHZ
	cbz	w21, LBB0_17
; %bb.15:
	cbz	x0, LBB0_17
; %bb.16:
	add	x1, sp, #60
	mov	x0, x19
	bl	_ar9003_mci_init_cal_req
LBB0_17:
	ldr	w1, [x25]
	mov	x0, x19
	bl	_REG_READ
	ldr	w8, [x20]
Lloh26:
	adrp	x28, _AR_PHY_RX_DELAY@GOTPAGE
Lloh27:
	ldr	x28, [x28, _AR_PHY_RX_DELAY@GOTPAGEOFF]
	tst	w8, w0
	b.eq	LBB0_19
; %bb.18:
	ldr	w1, [x28]
	mov	x0, x19
	bl	_REG_READ
	str	w0, [sp, #36]                   ; 4-byte Folded Spill
Lloh28:
	adrp	x24, _AR_PHY_ACTIVE@GOTPAGE
Lloh29:
	ldr	x24, [x24, _AR_PHY_ACTIVE@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh30:
	adrp	x8, _AR_PHY_ACTIVE_DIS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AR_PHY_ACTIVE_DIS@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_WRITE
	mov	w0, #5
	bl	_udelay
	ldr	w1, [x28]
Lloh33:
	adrp	x8, _AR_PHY_RX_DELAY_DELAY@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AR_PHY_RX_DELAY_DELAY@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_WRITE
	ldr	w1, [x24]
Lloh36:
	adrp	x8, _AR_PHY_ACTIVE_EN@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AR_PHY_ACTIVE_EN@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_WRITE
	b	LBB0_20
LBB0_19:
	str	wzr, [sp, #36]                  ; 4-byte Folded Spill
LBB0_20:
Lloh39:
	adrp	x24, _AH_WAIT_TIMEOUT@GOTPAGE
Lloh40:
	ldr	x24, [x24, _AH_WAIT_TIMEOUT@GOTPAGEOFF]
	str	w26, [sp, #32]                  ; 4-byte Folded Spill
	str	w21, [sp, #44]                  ; 4-byte Folded Spill
	cbz	w21, LBB0_22
LBB0_21:
Lloh41:
	adrp	x25, _AR_PHY_AGC_CONTROL@GOTPAGE
Lloh42:
	ldr	x25, [x25, _AR_PHY_AGC_CONTROL@GOTPAGEOFF]
	ldr	w26, [x25]
	mov	x0, x19
	mov	x1, x26
	bl	_REG_READ
	mov	x21, x24
Lloh43:
	adrp	x24, _AR_PHY_AGC_CONTROL_CAL@GOTPAGE
Lloh44:
	ldr	x24, [x24, _AR_PHY_AGC_CONTROL_CAL@GOTPAGEOFF]
	ldr	w8, [x24]
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x26
	bl	_REG_WRITE
	ldr	w1, [x25]
Lloh45:
	adrp	x25, _AR_PHY_CL_CAL_CTL@GOTPAGE
Lloh46:
	ldr	x25, [x25, _AR_PHY_CL_CAL_CTL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x24, x21
	ldr	w4, [x21]
	mov	x0, x19
	mov	w3, #0
	bl	_ath9k_hw_wait
	mov	x26, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x27
	bl	_ar9003_hw_do_pcoem_manual_peak_cal
	b	LBB0_24
LBB0_22:
	ldr	w8, [x19]
Lloh47:
	adrp	x9, _AH_FASTCC@GOTPAGE
Lloh48:
	ldr	x9, [x9, _AH_FASTCC@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.23:
	mov	w26, #1
LBB0_24:
	ldr	w1, [x25]
	mov	x0, x19
	bl	_REG_READ
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_26
; %bb.25:
Lloh50:
	adrp	x8, _AR_PHY_RX_DELAY@GOTPAGE
Lloh51:
	ldr	x8, [x8, _AR_PHY_RX_DELAY@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	mov	x0, x19
	ldr	w2, [sp, #36]                   ; 4-byte Folded Reload
	bl	_REG_WRITE
	mov	w0, #5
	bl	_udelay
LBB0_26:
	mov	x0, x19
	bl	_ath9k_hw_mci_is_enabled
	ldr	w21, [sp, #44]                  ; 4-byte Folded Reload
	cbz	x0, LBB0_30
; %bb.27:
	mov	x0, x22
	bl	_IS_CHAN_2GHZ
	cbz	w21, LBB0_30
; %bb.28:
	cbz	x0, LBB0_30
; %bb.29:
	mov	x0, x19
	bl	_ar9003_mci_init_cal_done
LBB0_30:
	ldr	w8, [sp, #40]                   ; 4-byte Folded Reload
	tbnz	w8, #0, LBB0_32
; %bb.31:
	ldp	w8, w9, [sp, #28]               ; 8-byte Folded Reload
	orr	w2, w9, w8
Lloh53:
	adrp	x8, _AR_PHY_AGC_CONTROL@GOTPAGE
Lloh54:
	ldr	x8, [x8, _AR_PHY_AGC_CONTROL@GOTPAGEOFF]
Lloh55:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_REG_WRITE
LBB0_32:
	cbz	w26, LBB0_37
; %bb.33:
	tbz	w23, #0, LBB0_40
; %bb.34:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_41
; %bb.35:
Lloh56:
	adrp	x8, _TXIQCAL_DONE@GOTPAGE
Lloh57:
	ldr	x8, [x8, _TXIQCAL_DONE@GOTPAGEOFF]
Lloh58:
	ldr	w0, [x8]
	ldr	x1, [sp, #48]                   ; 8-byte Folded Reload
	bl	_test_bit
	cbz	x0, LBB0_41
; %bb.36:
	mov	x0, x19
	bl	_ar9003_hw_tx_iq_cal_reload
	b	LBB0_41
LBB0_37:
	cbz	w27, LBB0_39
; %bb.38:
	mov	x0, x19
	bl	_ar9003_hw_rtt_disable
LBB0_39:
Lloh59:
	adrp	x8, _CALIBRATE@GOTPAGE
Lloh60:
	ldr	x8, [x8, _CALIBRATE@GOTPAGEOFF]
Lloh61:
	ldr	w1, [x8]
	ldrsw	x8, [x24]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	str	x8, [sp]
Lloh62:
	adrp	x2, l_.str.1@PAGE
Lloh63:
	add	x2, x2, l_.str.1@PAGEOFF
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_ath_dbg
	mov	w0, #0
	b	LBB0_55
LBB0_40:
	ldr	w2, [sp, #60]
	mov	x0, x19
	mov	w1, #0
	bl	_ar9003_hw_tx_iq_cal_post_proc
LBB0_41:
	ldr	w1, [sp, #60]
	mov	x0, x19
	bl	_ar9003_hw_cl_cal_post_proc
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	cmp	x8, #0
	cset	w8, ne
	and	w8, w27, w8
	cmp	w8, #1
	b.ne	LBB0_54
; %bb.42:
	ldr	w8, [sp, #60]
	cbz	w8, LBB0_53
; %bb.43:
	mov	x0, x19
	bl	_ath9k_hw_rfbus_req
	cbz	w0, LBB0_51
; %bb.44:
	mov	x0, x19
	bl	_ar9003_hw_rtt_fill_hist
Lloh64:
	adrp	x8, _SW_PKDET_DONE@GOTPAGE
Lloh65:
	ldr	x8, [x8, _SW_PKDET_DONE@GOTPAGEOFF]
Lloh66:
	ldr	w0, [x8]
	ldr	x1, [sp, #48]                   ; 8-byte Folded Reload
	bl	_test_bit
	cbz	x0, LBB0_52
; %bb.45:
	mov	x0, x19
	bl	_ar9003_hw_rtt_load_hist
	b	LBB0_52
LBB0_46:
	ldr	w8, [x19, #4]
Lloh67:
	adrp	x9, _TX_IQ_CAL@GOTPAGE
Lloh68:
	ldr	x9, [x9, _TX_IQ_CAL@GOTPAGEOFF]
Lloh69:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.47:
Lloh70:
	adrp	x8, _AR_PHY_TX_IQCAL_CONTROL_1@GOTPAGE
Lloh71:
	ldr	x8, [x8, _AR_PHY_TX_IQCAL_CONTROL_1@GOTPAGEOFF]
Lloh72:
	ldr	w1, [x8]
Lloh73:
	adrp	x8, _AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT@GOTPAGE
Lloh74:
	ldr	x8, [x8, _AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT@GOTPAGEOFF]
Lloh75:
	ldr	w2, [x8]
Lloh76:
	adrp	x8, _DELPT@GOTPAGE
Lloh77:
	ldr	x8, [x8, _DELPT@GOTPAGEOFF]
Lloh78:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_REG_RMW_FIELD
	ldr	w8, [x19, #4]
Lloh79:
	adrp	x9, _TX_IQ_ON_AGC_CAL@GOTPAGE
Lloh80:
	ldr	x9, [x9, _TX_IQ_ON_AGC_CAL@GOTPAGEOFF]
Lloh81:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.48:
	mov	x24, x20
Lloh82:
	adrp	x23, _AR_PHY_TX_IQCAL_CONTROL_0@GOTPAGE
Lloh83:
	ldr	x23, [x23, _AR_PHY_TX_IQCAL_CONTROL_0@GOTPAGEOFF]
Lloh84:
	adrp	x20, _AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL@GOTPAGE
Lloh85:
	ldr	x20, [x20, _AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL@GOTPAGEOFF]
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_50
; %bb.49:
Lloh86:
	adrp	x8, _TXIQCAL_DONE@GOTPAGE
Lloh87:
	ldr	x8, [x8, _TXIQCAL_DONE@GOTPAGEOFF]
Lloh88:
	ldr	w0, [x8]
	ldr	x1, [sp, #48]                   ; 8-byte Folded Reload
	bl	_test_bit
	cbz	x0, LBB0_56
LBB0_50:
	ldr	w1, [x23]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_REG_CLR_BIT
	b	LBB0_57
LBB0_51:
	mov	x0, x19
	bl	_ath9k_hw_common
Lloh89:
	adrp	x1, l_.str.2@PAGE
Lloh90:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_ath_err
LBB0_52:
	mov	x0, x19
	bl	_ath9k_hw_rfbus_done
LBB0_53:
	mov	x0, x19
	bl	_ar9003_hw_rtt_disable
LBB0_54:
	ldp	w2, w1, [x19, #8]
	mov	x0, x19
	bl	_ar9003_hw_set_chain_masks
	mov	x0, x19
	bl	_ar9003_hw_init_cal_common
	mov	w0, #1
LBB0_55:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_56:
	ldr	w1, [x23]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_REG_SET_BIT
LBB0_57:
	mov	w23, #0
	mov	w21, #1
	mov	x20, x24
	b	LBB0_13
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGot	Lloh84, Lloh85
	.loh AdrpLdrGot	Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpAdd	Lloh89, Lloh90
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH9K_HW_CAP_RTT,4,2           ; @ATH9K_HW_CAP_RTT
	.comm	_AR_PHY_AGC_CONTROL_OFFSET_CAL,4,2 ; @AR_PHY_AGC_CONTROL_OFFSET_CAL
	.comm	_AR_PHY_AGC_CONTROL_FLTR_CAL,4,2 ; @AR_PHY_AGC_CONTROL_FLTR_CAL
	.comm	_AR_PHY_AGC_CONTROL_PKDET_CAL,4,2 ; @AR_PHY_AGC_CONTROL_PKDET_CAL
	.comm	_CALIBRATE,4,2                  ; @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RTT calibration to be done\n"

	.comm	_AR_PHY_AGC_CONTROL,4,2         ; @AR_PHY_AGC_CONTROL
	.comm	_AH_FASTCC,4,2                  ; @AH_FASTCC
	.comm	_TX_CL_CAL,4,2                  ; @TX_CL_CAL
	.comm	_TXCLCAL_DONE,4,2               ; @TXCLCAL_DONE
	.comm	_AR_PHY_CL_CAL_CTL,4,2          ; @AR_PHY_CL_CAL_CTL
	.comm	_AR_PHY_CL_CAL_ENABLE,4,2       ; @AR_PHY_CL_CAL_ENABLE
	.comm	_TX_IQ_CAL,4,2                  ; @TX_IQ_CAL
	.comm	_AR_PHY_TX_IQCAL_CONTROL_1,4,2  ; @AR_PHY_TX_IQCAL_CONTROL_1
	.comm	_AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT,4,2 ; @AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT
	.comm	_DELPT,4,2                      ; @DELPT
	.comm	_TX_IQ_ON_AGC_CAL,4,2           ; @TX_IQ_ON_AGC_CAL
	.comm	_TXIQCAL_DONE,4,2               ; @TXIQCAL_DONE
	.comm	_AR_PHY_TX_IQCAL_CONTROL_0,4,2  ; @AR_PHY_TX_IQCAL_CONTROL_0
	.comm	_AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL,4,2 ; @AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL
	.comm	_AR_PHY_RX_DELAY,4,2            ; @AR_PHY_RX_DELAY
	.comm	_AR_PHY_ACTIVE,4,2              ; @AR_PHY_ACTIVE
	.comm	_AR_PHY_ACTIVE_DIS,4,2          ; @AR_PHY_ACTIVE_DIS
	.comm	_AR_PHY_RX_DELAY_DELAY,4,2      ; @AR_PHY_RX_DELAY_DELAY
	.comm	_AR_PHY_ACTIVE_EN,4,2           ; @AR_PHY_ACTIVE_EN
	.comm	_AR_PHY_AGC_CONTROL_CAL,4,2     ; @AR_PHY_AGC_CONTROL_CAL
	.comm	_AH_WAIT_TIMEOUT,4,2            ; @AH_WAIT_TIMEOUT
l_.str.1:                               ; @.str.1
	.asciz	"offset calibration failed to complete in %d ms; noisy environment?\n"

l_.str.2:                               ; @.str.2
	.asciz	"Could not stop baseband\n"

	.comm	_SW_PKDET_DONE,4,2              ; @SW_PKDET_DONE
	.no_dead_strip	_ar9003_hw_init_cal_pcoem
.subsections_via_symbols
