	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_cal_pier_get
_ar9003_hw_cal_pier_get:                ## @ar9003_hw_cal_pier_get
	.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	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_ath9k_hw_common
	movq	_AR9300_MAX_CHAINS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%r12d, %ecx
	jle	LBB0_4
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.2:
	movq	_AR9300_NUM_5G_CAL_PIERS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%r13d, %ecx
	jle	LBB0_10
## %bb.3:
	movslq	%r13d, %r14
	leaq	(,%r14,4), %rax
	addq	24(%rbx), %rax
	addq	$16, %rbx
	xorl	%esi, %esi
	jmp	LBB0_7
LBB0_4:
	movq	_EEPROM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_12
LBB0_5:
	movq	_AR9300_NUM_2G_CAL_PIERS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%r13d, %ecx
	jle	LBB0_11
## %bb.6:
	movslq	%r13d, %r14
	leaq	(,%r14,4), %rax
	addq	8(%rbx), %rax
	movl	$1, %esi
LBB0_7:
	movq	16(%rbp), %r13
	movq	(%rbx), %rcx
	movslq	%r12d, %rdx
	movq	(%rcx,%rdx,8), %rbx
	movl	(%rax), %edi
	callq	_ath9k_hw_fbin2freq
	movl	%eax, (%r15)
	shlq	$5, %r14
	movl	(%rbx,%r14), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	4(%rbx,%r14), %eax
	movl	%eax, (%r13)
	movl	8(%rbx,%r14), %eax
	movq	24(%rbp), %rcx
	movl	%eax, (%rcx)
	cmpq	$0, 16(%rbx,%r14)
	je	LBB0_13
## %bb.8:
	leaq	(%rbx,%r14), %r15
	addq	$16, %r15
	movl	24(%rbx,%r14), %edi
	callq	_N2DBM
	cmpq	$0, (%r15)
	movq	32(%rbp), %rcx
	movl	%eax, (%rcx)
	je	LBB0_14
## %bb.9:
	movl	12(%rbx,%r14), %edi
	callq	_N2DBM
	jmp	LBB0_15
LBB0_10:
	movq	_EEPROM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_12
LBB0_11:
	movq	_EEPROM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_12:
	movq	%rax, %rdi
	callq	_ath_dbg
	movl	$-1, %eax
	jmp	LBB0_16
LBB0_13:
	movq	32(%rbp), %rax
	movl	$0, (%rax)
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	movq	40(%rbp), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR9300_MAX_CHAINS,4,2          ## @AR9300_MAX_CHAINS
	.comm	_EEPROM,4,2                     ## @EEPROM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid chain index, must be less than %d\n"

	.comm	_AR9300_NUM_5G_CAL_PIERS,4,2    ## @AR9300_NUM_5G_CAL_PIERS
L_.str.1:                               ## @.str.1
	.asciz	"Invalid 5GHz cal pier index, must be less than %d\n"

	.comm	_AR9300_NUM_2G_CAL_PIERS,4,2    ## @AR9300_NUM_2G_CAL_PIERS
L_.str.2:                               ## @.str.2
	.asciz	"Invalid 2GHz cal pier index, must be less than %d\n"

	.no_dead_strip	_ar9003_hw_cal_pier_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_hw_cal_pier_get
_ar9003_hw_cal_pier_get:                ; @ar9003_hw_cal_pier_get
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x7
	mov	x20, x6
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x25, x2
	mov	x26, x1
	mov	x24, x0
	bl	_ath9k_hw_common
Lloh0:
	adrp	x8, _AR9300_MAX_CHAINS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR9300_MAX_CHAINS@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	cmp	w3, w23
	b.le	LBB0_4
; %bb.1:
	cbz	w26, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _AR9300_NUM_5G_CAL_PIERS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR9300_NUM_5G_CAL_PIERS@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	cmp	w3, w25
	b.le	LBB0_10
; %bb.3:
	mov	w1, #0
	ldr	x8, [x24, #24]
	sxtw	x26, w25
	add	x8, x8, w25, sxtw #2
	add	x24, x24, #16
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _EEPROM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EEPROM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_12
LBB0_5:
Lloh11:
	adrp	x8, _AR9300_NUM_2G_CAL_PIERS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AR9300_NUM_2G_CAL_PIERS@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	cmp	w3, w25
	b.le	LBB0_11
; %bb.6:
	ldr	x8, [x24, #8]
	mov	x9, x25
	sxtw	x26, w9
	add	x8, x8, w25, sxtw #2
	mov	w1, #1
LBB0_7:
	ldp	x27, x25, [x29, #16]
	ldr	x9, [x24]
	ldr	x23, [x9, w23, sxtw #3]
	ldr	w0, [x8]
	bl	_ath9k_hw_fbin2freq
	str	w0, [x22]
	add	x8, x23, x26, lsl #5
	ldr	w9, [x8]
	str	w9, [x21]
	ldr	w9, [x8, #4]
	str	w9, [x20]
	ldr	w9, [x8, #8]
	str	w9, [x19]
	mov	x19, x8
	ldr	x9, [x19, #16]!
	cbz	x9, LBB0_13
; %bb.8:
	ldr	w0, [x8, #24]
	bl	_N2DBM
	ldr	x8, [x19]
	str	w0, [x27]
	cbz	x8, LBB0_14
; %bb.9:
	add	x8, x23, x26, lsl #5
	ldr	w0, [x8, #12]
	bl	_N2DBM
	mov	x8, x0
	b	LBB0_14
LBB0_10:
Lloh14:
	adrp	x8, _EEPROM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EEPROM@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh19:
	adrp	x8, _EEPROM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EEPROM@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_12:
	bl	_ath_dbg
	mov	w0, #-1
	b	LBB0_15
LBB0_13:
	mov	w8, #0
	str	wzr, [x27]
LBB0_14:
	mov	w0, #0
	str	w8, [x25]
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_AR9300_MAX_CHAINS,4,2          ; @AR9300_MAX_CHAINS
	.comm	_EEPROM,4,2                     ; @EEPROM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid chain index, must be less than %d\n"

	.comm	_AR9300_NUM_5G_CAL_PIERS,4,2    ; @AR9300_NUM_5G_CAL_PIERS
l_.str.1:                               ; @.str.1
	.asciz	"Invalid 5GHz cal pier index, must be less than %d\n"

	.comm	_AR9300_NUM_2G_CAL_PIERS,4,2    ; @AR9300_NUM_2G_CAL_PIERS
l_.str.2:                               ; @.str.2
	.asciz	"Invalid 2GHz cal pier index, must be less than %d\n"

	.no_dead_strip	_ar9003_hw_cal_pier_get
.subsections_via_symbols
