	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_tx_iq_cal_run
_ar9003_hw_tx_iq_cal_run:               ## @ar9003_hw_tx_iq_cal_run
	.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, %rbx
	callq	_ath9k_hw_common
	movq	%rax, %r14
	movq	_AR_PHY_TX_FORCED_GAIN@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_AR_PHY_TXGAIN_FORCE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_REG_READ_FIELD
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_REG_RMW_FIELD
LBB0_2:
	movq	_AR_PHY_TX_IQCAL_START@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_AR_PHY_TX_IQCAL_START_DO_CAL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	$1, %r15d
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_REG_RMW_FIELD
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	_AH_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_ath9k_hw_wait
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_CALIBRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_ath_dbg
	xorl	%r15d, %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_TX_FORCED_GAIN,4,2      ## @AR_PHY_TX_FORCED_GAIN
	.comm	_AR_PHY_TXGAIN_FORCE,4,2        ## @AR_PHY_TXGAIN_FORCE
	.comm	_AR_PHY_TX_IQCAL_START,4,2      ## @AR_PHY_TX_IQCAL_START
	.comm	_AR_PHY_TX_IQCAL_START_DO_CAL,4,2 ## @AR_PHY_TX_IQCAL_START_DO_CAL
	.comm	_AH_WAIT_TIMEOUT,4,2            ## @AH_WAIT_TIMEOUT
	.comm	_CALIBRATE,4,2                  ## @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tx IQ Cal is not completed\n"

	.no_dead_strip	_ar9003_hw_tx_iq_cal_run
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_hw_tx_iq_cal_run
_ar9003_hw_tx_iq_cal_run:               ; @ar9003_hw_tx_iq_cal_run
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	bl	_ath9k_hw_common
	mov	x19, x0
Lloh0:
	adrp	x21, _AR_PHY_TX_FORCED_GAIN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AR_PHY_TX_FORCED_GAIN@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _AR_PHY_TXGAIN_FORCE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _AR_PHY_TXGAIN_FORCE@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_REG_READ_FIELD
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x21]
	ldr	w2, [x22]
	mov	x0, x20
	mov	w3, #0
	bl	_REG_RMW_FIELD
LBB0_2:
Lloh4:
	adrp	x22, _AR_PHY_TX_IQCAL_START@GOTPAGE
Lloh5:
	ldr	x22, [x22, _AR_PHY_TX_IQCAL_START@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh6:
	adrp	x23, _AR_PHY_TX_IQCAL_START_DO_CAL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _AR_PHY_TX_IQCAL_START_DO_CAL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w21, #1
	mov	x0, x20
	mov	w3, #1
	bl	_REG_RMW_FIELD
	ldr	w1, [x22]
	ldr	w2, [x23]
Lloh8:
	adrp	x8, _AH_WAIT_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AH_WAIT_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
	mov	x0, x20
	mov	w3, #0
	bl	_ath9k_hw_wait
	cbnz	w0, LBB0_4
; %bb.3:
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, x19
	bl	_ath_dbg
	mov	w21, #0
LBB0_4:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_TX_FORCED_GAIN,4,2      ; @AR_PHY_TX_FORCED_GAIN
	.comm	_AR_PHY_TXGAIN_FORCE,4,2        ; @AR_PHY_TXGAIN_FORCE
	.comm	_AR_PHY_TX_IQCAL_START,4,2      ; @AR_PHY_TX_IQCAL_START
	.comm	_AR_PHY_TX_IQCAL_START_DO_CAL,4,2 ; @AR_PHY_TX_IQCAL_START_DO_CAL
	.comm	_AH_WAIT_TIMEOUT,4,2            ; @AH_WAIT_TIMEOUT
	.comm	_CALIBRATE,4,2                  ; @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tx IQ Cal is not completed\n"

	.no_dead_strip	_ar9003_hw_tx_iq_cal_run
.subsections_via_symbols
