	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_get_training_power_5g
_ar9003_get_training_power_5g:          ## @ar9003_get_training_power_5g
	.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, %r13
	callq	_ath9k_hw_common
	movq	%rax, %r14
	movq	16(%r13), %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_ar9003_get_paprd_scale_factor
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_IS_CHAN_HT40
	testq	%rax, %rax
	movq	_AR_PHY_POWERTX_RATE8@GOTPCREL(%rip), %rax
	cmoveq	_AR_PHY_POWERTX_RATE6@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_POWERTX_RATE8_POWERTXHT40_5@GOTPCREL(%rip), %rax
	cmoveq	_AR_PHY_POWERTX_RATE6_POWERTXHT20_5@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_REG_READ_FIELD
	movl	%eax, %r15d
	addl	%r12d, %r15d
	movl	8(%r13), %eax
	subl	%r15d, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	movl	$-1, %eax
	cmpl	%r12d, %ecx
	ja	LBB0_5
## %bb.1:
	movl	(%r13), %edi
	callq	_get_streams
	movl	%eax, %ecx
	decl	%ecx
	cmpl	$3, %ecx
	jae	LBB0_2
## %bb.3:
	addl	%ecx, %ecx
	movl	$6, %eax
	subl	%ecx, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_CALIBRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_ath_dbg
	xorl	%eax, %eax
LBB0_4:
	addl	%r15d, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_POWERTX_RATE8,4,2       ## @AR_PHY_POWERTX_RATE8
	.comm	_AR_PHY_POWERTX_RATE8_POWERTXHT40_5,4,2 ## @AR_PHY_POWERTX_RATE8_POWERTXHT40_5
	.comm	_AR_PHY_POWERTX_RATE6,4,2       ## @AR_PHY_POWERTX_RATE6
	.comm	_AR_PHY_POWERTX_RATE6_POWERTXHT20_5,4,2 ## @AR_PHY_POWERTX_RATE6_POWERTXHT20_5
	.comm	_CALIBRATE,4,2                  ## @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid tx-chainmask: %u\n"

	.no_dead_strip	_ar9003_get_training_power_5g
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_get_training_power_5g
_ar9003_get_training_power_5g:          ; @ar9003_get_training_power_5g
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_ath9k_hw_common
	mov	x20, x0
	ldr	x21, [x19, #16]
	mov	x0, x19
	mov	x1, x21
	bl	_ar9003_get_paprd_scale_factor
	mov	x22, x0
	mov	x0, x21
	bl	_IS_CHAN_HT40
Lloh0:
	adrp	x8, _AR_PHY_POWERTX_RATE6@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_PHY_POWERTX_RATE6@GOTPAGEOFF]
Lloh2:
	adrp	x9, _AR_PHY_POWERTX_RATE8@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AR_PHY_POWERTX_RATE8@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
Lloh4:
	adrp	x8, _AR_PHY_POWERTX_RATE6_POWERTXHT20_5@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AR_PHY_POWERTX_RATE6_POWERTXHT20_5@GOTPAGEOFF]
Lloh6:
	adrp	x9, _AR_PHY_POWERTX_RATE8_POWERTXHT40_5@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AR_PHY_POWERTX_RATE8_POWERTXHT40_5@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_READ_FIELD
	ldr	w8, [x19, #8]
	add	w21, w0, w22
	subs	w8, w8, w21
	cneg	w8, w8, mi
	cmp	w8, w22
	b.ls	LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_6
LBB0_2:
	ldr	w0, [x19]
	bl	_get_streams
	sub	w8, w0, #1
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.3:
	mov	w9, #6
	sub	w8, w9, w8, lsl #1
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _CALIBRATE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CALIBRATE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w3, [x19]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ath_dbg
	mov	w8, #0
LBB0_5:
	add	w0, w8, w21
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_POWERTX_RATE8,4,2       ; @AR_PHY_POWERTX_RATE8
	.comm	_AR_PHY_POWERTX_RATE8_POWERTXHT40_5,4,2 ; @AR_PHY_POWERTX_RATE8_POWERTXHT40_5
	.comm	_AR_PHY_POWERTX_RATE6,4,2       ; @AR_PHY_POWERTX_RATE6
	.comm	_AR_PHY_POWERTX_RATE6_POWERTXHT20_5,4,2 ; @AR_PHY_POWERTX_RATE6_POWERTXHT20_5
	.comm	_CALIBRATE,4,2                  ; @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid tx-chainmask: %u\n"

	.no_dead_strip	_ar9003_get_training_power_5g
.subsections_via_symbols
