	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_eeprom_read_pcal_info
_ath5k_eeprom_read_pcal_info:           ## @ath5k_eeprom_read_pcal_info
	.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	(%rdi), %rax
	movq	_AR5K_EEPROM_VERSION_4_0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_4
## %bb.1:
	movl	8(%r15), %edi
	callq	_AR5K_EEPROM_EEMAP
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.2:
	movq	_ath5k_eeprom_read_pcal_info_5112@GOTPCREL(%rip), %r12
	jmp	LBB0_8
LBB0_3:
	movq	(%r15), %rax
LBB0_4:
	movq	_AR5K_EEPROM_VERSION_5_0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_7
## %bb.5:
	movl	8(%r15), %edi
	callq	_AR5K_EEPROM_EEMAP
	cmpl	$2, %eax
	jne	LBB0_7
## %bb.6:
	movq	_ath5k_eeprom_read_pcal_info_2413@GOTPCREL(%rip), %r12
	jmp	LBB0_8
LBB0_7:
	movq	_ath5k_eeprom_read_pcal_info_5111@GOTPCREL(%rip), %r12
LBB0_8:
	movq	_AR5K_EEPROM_MODE_11A@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_AR5K_EEPROM_MODE_11G@GOTPCREL(%rip), %r13
	xorl	%r14d, %r14d
	cmpl	(%r13), %ebx
	jg	LBB0_13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	*%r12
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ath5k_eeprom_read_target_rate_pwr_info
	testl	%eax, %eax
	js	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	leal	1(%rbx), %eax
	cmpl	(%r13), %ebx
	movl	%eax, %ebx
	jl	LBB0_10
	jmp	LBB0_13
LBB0_12:
	movl	%eax, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_EEPROM_VERSION_4_0,8,3    ## @AR5K_EEPROM_VERSION_4_0
	.comm	_AR5K_EEPROM_VERSION_5_0,8,3    ## @AR5K_EEPROM_VERSION_5_0
	.comm	_AR5K_EEPROM_MODE_11A,4,2       ## @AR5K_EEPROM_MODE_11A
	.comm	_AR5K_EEPROM_MODE_11G,4,2       ## @AR5K_EEPROM_MODE_11G
	.no_dead_strip	_ath5k_eeprom_read_pcal_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_eeprom_read_pcal_info
_ath5k_eeprom_read_pcal_info:           ; @ath5k_eeprom_read_pcal_info
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AR5K_EEPROM_VERSION_4_0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AR5K_EEPROM_VERSION_4_0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_4
; %bb.1:
	ldr	w0, [x19, #8]
	bl	_AR5K_EEPROM_EEMAP
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x21, _ath5k_eeprom_read_pcal_info_5112@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ath5k_eeprom_read_pcal_info_5112@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
	ldr	x8, [x19]
LBB0_4:
Lloh5:
	adrp	x9, _AR5K_EEPROM_VERSION_5_0@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AR5K_EEPROM_VERSION_5_0@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_7
; %bb.5:
	ldr	w0, [x19, #8]
	bl	_AR5K_EEPROM_EEMAP
	cmp	w0, #2
	b.ne	LBB0_7
; %bb.6:
Lloh8:
	adrp	x21, _ath5k_eeprom_read_pcal_info_2413@GOTPAGE
Lloh9:
	ldr	x21, [x21, _ath5k_eeprom_read_pcal_info_2413@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh10:
	adrp	x21, _ath5k_eeprom_read_pcal_info_5111@GOTPAGE
Lloh11:
	ldr	x21, [x21, _ath5k_eeprom_read_pcal_info_5111@GOTPAGEOFF]
LBB0_8:
Lloh12:
	adrp	x8, _AR5K_EEPROM_MODE_11A@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR5K_EEPROM_MODE_11A@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
Lloh15:
	adrp	x22, _AR5K_EEPROM_MODE_11G@GOTPAGE
Lloh16:
	ldr	x22, [x22, _AR5K_EEPROM_MODE_11G@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w20, w8
	b.gt	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	blr	x21
	cbnz	w0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_eeprom_read_target_rate_pwr_info
	tbnz	w0, #31, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w8, w20, #1
	ldr	w9, [x22]
	cmp	w20, w9
	mov	x20, x8
	b.lt	LBB0_9
LBB0_12:
	mov	w0, #0
LBB0_13:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_EEPROM_VERSION_4_0,8,3    ; @AR5K_EEPROM_VERSION_4_0
	.comm	_AR5K_EEPROM_VERSION_5_0,8,3    ; @AR5K_EEPROM_VERSION_5_0
	.comm	_AR5K_EEPROM_MODE_11A,4,2       ; @AR5K_EEPROM_MODE_11A
	.comm	_AR5K_EEPROM_MODE_11G,4,2       ; @AR5K_EEPROM_MODE_11G
	.no_dead_strip	_ath5k_eeprom_read_pcal_info
.subsections_via_symbols
