	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_phy_init              ## -- Begin function ath5k_hw_phy_init
	.p2align	4, 0x90
_ath5k_hw_phy_init:                     ## @ath5k_hw_phy_init
	.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
	movl	%ecx, %r12d
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.1:
	movq	40(%r13), %rax
	movq	(%r14), %rcx
	cmpq	(%rax), %rcx
	jne	LBB0_2
## %bb.4:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_AR5K_PHY_RFBUS_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR5K_PHY_RFBUS_REQ_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_AR5K_REG_ENABLE_BITS
	movl	$100, %ebx
	movq	_AR5K_PHY_RFBUS_GRANT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_read
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$5, %edi
	callq	_udelay
	decl	%ebx
	jne	LBB0_5
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_38
LBB0_8:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ath5k_hw_channel
	movl	%eax, %ebx
	testl	%eax, %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_38
## %bb.9:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ath5k_hw_wait_for_synth
LBB0_10:
	movl	32(%r13), %edx
	testl	%edx, %edx
	jne	LBB0_11
## %bb.12:
	movq	_AR5K_TUNE_MAX_TXPOWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_13
LBB0_11:
	addl	%edx, %edx
LBB0_13:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ath5k_hw_txpower
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_38
## %bb.14:
	movq	(%r13), %rax
	movq	_AR5K_AR5212@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.15:
	movq	(%r14), %rax
	movq	_AR5K_MODE_11B@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
LBB0_19:
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.20:
	movq	_AR5K_PHY_RFBUS_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR5K_PHY_RFBUS_REQ_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_AR5K_REG_DISABLE_BITS
	movq	_AR5K_PHY_AGCCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR5K_PHY_AGCCTL_NF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_AR5K_REG_ENABLE_BITS
	xorl	%ebx, %ebx
	jmp	LBB0_38
LBB0_21:
	movq	(%r13), %rax
	movq	_AR5K_AR5210@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.28:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1500, %esi                     ## imm = 0x5DC
	callq	_usleep_range
	movq	_AR5K_PHY_ACT_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR5K_PHY_ACT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_write
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1500, %esi                     ## imm = 0x5DC
	callq	_usleep_range
LBB0_29:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ath5k_hw_channel
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_38
## %bb.30:
	movq	_AR5K_PHY_ACT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR5K_PHY_ACT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_write
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ath5k_hw_wait_for_synth
	movq	_AR5K_PHY_TST1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_read
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_AR5K_PHY_TST1_TXHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_write
	movl	$21, %r12d
	movq	_AR5K_PHY_ADC_TEST@GOTPCREL(%rip), %rbx
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_read
	testb	$16, %al
	je	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=1
	movl	$200, %edi
	movl	$250, %esi
	callq	_usleep_range
	decl	%r12d
	jne	LBB0_31
LBB0_33:
	movq	_AR5K_PHY_TST1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_ath5k_hw_reg_write
	movq	_AR5K_PHY_AGCCTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_AR5K_PHY_AGCCTL_CAL@GOTPCREL(%rip), %rbx
	movq	_AR5K_PHY_AGCCTL_NF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%rbx), %edx
	movq	%r13, %rdi
	callq	_AR5K_REG_ENABLE_BITS
	movl	$0, 24(%r13)
	movq	_AR5K_MODE_11B@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	je	LBB0_35
## %bb.34:
	movl	$1, 24(%r13)
	movq	_AR5K_PHY_IQ@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_AR5K_PHY_IQ_CAL_NUM_LOG_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$15, %ecx
	callq	_AR5K_REG_WRITE_BITS
	movl	(%r15), %esi
	movq	_AR5K_PHY_IQ_RUN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_AR5K_REG_ENABLE_BITS
LBB0_35:
	movl	(%r12), %esi
	movl	(%rbx), %edx
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ath5k_hw_register_timeout
	testq	%rax, %rax
	je	LBB0_37
## %bb.36:
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_ATH5K_ERR
LBB0_37:
	movl	28(%r13), %esi
	movq	%r13, %rdi
	callq	_ath5k_hw_set_antenna_mode
	jmp	LBB0_38
LBB0_16:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ath5k_hw_write_ofdm_timings
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_38
## %bb.17:
	movq	8(%r13), %rax
	movq	_AR5K_SREV_AR5424@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_19
## %bb.18:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ath5k_hw_set_spur_mitigation_filter
	jmp	LBB0_19
LBB0_22:
	movl	12(%r14), %esi
	movq	%r13, %rdi
	callq	_ath5k_hw_rfgain_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_38
## %bb.23:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1500, %esi                     ## imm = 0x5DC
	callq	_usleep_range
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_ath5k_hw_rfregs_init
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_24
LBB0_38:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	16(%r13), %rax
	movq	_AR5K_RF5111@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_29
## %bb.25:
	movq	_AR5K_MODE_11B@GOTPCREL(%rip), %rax
	movq	_AR5K_TXCFG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_AR5K_TXCFG_B_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpq	%r15, (%rax)
	jne	LBB0_27
## %bb.26:
	movq	%r13, %rdi
	callq	_AR5K_REG_ENABLE_BITS
	jmp	LBB0_29
LBB0_27:
	movq	%r13, %rdi
	callq	_AR5K_REG_DISABLE_BITS
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AR5K_PHY_RFBUS_REQ,4,2         ## @AR5K_PHY_RFBUS_REQ
	.comm	_AR5K_PHY_RFBUS_REQ_REQUEST,4,2 ## @AR5K_PHY_RFBUS_REQ_REQUEST
	.comm	_AR5K_PHY_RFBUS_GRANT,4,2       ## @AR5K_PHY_RFBUS_GRANT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AR5K_TUNE_MAX_TXPOWER,4,2      ## @AR5K_TUNE_MAX_TXPOWER
	.comm	_AR5K_AR5212,8,3                ## @AR5K_AR5212
	.comm	_AR5K_MODE_11B,8,3              ## @AR5K_MODE_11B
	.comm	_AR5K_SREV_AR5424,8,3           ## @AR5K_SREV_AR5424
	.comm	_AR5K_PHY_AGCCTL,4,2            ## @AR5K_PHY_AGCCTL
	.comm	_AR5K_PHY_AGCCTL_NF,4,2         ## @AR5K_PHY_AGCCTL_NF
	.comm	_AR5K_AR5210,8,3                ## @AR5K_AR5210
	.comm	_AR5K_RF5111,8,3                ## @AR5K_RF5111
	.comm	_AR5K_TXCFG,4,2                 ## @AR5K_TXCFG
	.comm	_AR5K_TXCFG_B_MODE,4,2          ## @AR5K_TXCFG_B_MODE
	.comm	_AR5K_PHY_ACT_DISABLE,4,2       ## @AR5K_PHY_ACT_DISABLE
	.comm	_AR5K_PHY_ACT,4,2               ## @AR5K_PHY_ACT
	.comm	_AR5K_PHY_ACT_ENABLE,4,2        ## @AR5K_PHY_ACT_ENABLE
	.comm	_AR5K_PHY_TST1,4,2              ## @AR5K_PHY_TST1
	.comm	_AR5K_PHY_TST1_TXHOLD,4,2       ## @AR5K_PHY_TST1_TXHOLD
	.comm	_AR5K_PHY_ADC_TEST,4,2          ## @AR5K_PHY_ADC_TEST
	.comm	_AR5K_PHY_AGCCTL_CAL,4,2        ## @AR5K_PHY_AGCCTL_CAL
	.comm	_AR5K_PHY_IQ,4,2                ## @AR5K_PHY_IQ
	.comm	_AR5K_PHY_IQ_CAL_NUM_LOG_MAX,4,2 ## @AR5K_PHY_IQ_CAL_NUM_LOG_MAX
	.comm	_AR5K_PHY_IQ_RUN,4,2            ## @AR5K_PHY_IQ_RUN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gain calibration timeout (%uMHz)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_phy_init              ; -- Begin function ath5k_hw_phy_init
	.p2align	2
_ath5k_hw_phy_init:                     ; @ath5k_hw_phy_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	cbz	w3, LBB0_10
; %bb.1:
	ldr	x8, [x19, #40]
	ldr	x9, [x20]
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _AR5K_PHY_RFBUS_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR5K_PHY_RFBUS_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _AR5K_PHY_RFBUS_REQ_REQUEST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR5K_PHY_RFBUS_REQ_REQUEST@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_AR5K_REG_ENABLE_BITS
	mov	w23, #100
Lloh6:
	adrp	x24, _AR5K_PHY_RFBUS_GRANT@GOTPAGE
Lloh7:
	ldr	x24, [x24, _AR5K_PHY_RFBUS_GRANT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_ath5k_hw_reg_read
	cbnz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #5
	bl	_udelay
	subs	w23, w23, #1
	b.ne	LBB0_3
; %bb.5:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_32
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_channel
	cbnz	w0, LBB0_32
; %bb.9:
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_wait_for_synth
LBB0_10:
	ldr	w8, [x19, #32]
	lsl	w9, w8, #1
Lloh12:
	adrp	x10, _AR5K_TUNE_MAX_TXPOWER@GOTPAGE
Lloh13:
	ldr	x10, [x10, _AR5K_TUNE_MAX_TXPOWER@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w8, #0
	csel	w2, w10, w9, eq
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_txpower
	cbnz	w0, LBB0_32
; %bb.11:
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _AR5K_AR5212@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AR5K_AR5212@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
	ldr	x8, [x20]
Lloh18:
	adrp	x9, _AR5K_MODE_11B@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AR5K_MODE_11B@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_27
LBB0_13:
	cbz	w22, LBB0_16
; %bb.14:
Lloh21:
	adrp	x8, _AR5K_PHY_RFBUS_REQ@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AR5K_PHY_RFBUS_REQ@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _AR5K_PHY_RFBUS_REQ_REQUEST@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AR5K_PHY_RFBUS_REQ_REQUEST@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_AR5K_REG_DISABLE_BITS
Lloh27:
	adrp	x8, _AR5K_PHY_AGCCTL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AR5K_PHY_AGCCTL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _AR5K_PHY_AGCCTL_NF@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AR5K_PHY_AGCCTL_NF@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_AR5K_REG_ENABLE_BITS
LBB0_15:
	mov	w0, #0
	b	LBB0_32
LBB0_16:
	ldr	x8, [x19]
Lloh33:
	adrp	x9, _AR5K_AR5210@GOTPAGE
Lloh34:
	ldr	x9, [x9, _AR5K_AR5210@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_30
; %bb.17:
	mov	w0, #1000
	mov	w1, #1500
	bl	_usleep_range
Lloh36:
	adrp	x8, _AR5K_PHY_ACT_DISABLE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AR5K_PHY_ACT_DISABLE@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x8, _AR5K_PHY_ACT@GOTPAGE
Lloh40:
	ldr	x8, [x8, _AR5K_PHY_ACT@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ath5k_hw_reg_write
	mov	w0, #1000
	mov	w1, #1500
	bl	_usleep_range
LBB0_18:
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_channel
	cbnz	w0, LBB0_32
; %bb.19:
Lloh42:
	adrp	x8, _AR5K_PHY_ACT_ENABLE@GOTPAGE
Lloh43:
	ldr	x8, [x8, _AR5K_PHY_ACT_ENABLE@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
Lloh45:
	adrp	x8, _AR5K_PHY_ACT@GOTPAGE
Lloh46:
	ldr	x8, [x8, _AR5K_PHY_ACT@GOTPAGEOFF]
Lloh47:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ath5k_hw_reg_write
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_wait_for_synth
Lloh48:
	adrp	x23, _AR5K_PHY_TST1@GOTPAGE
Lloh49:
	ldr	x23, [x23, _AR5K_PHY_TST1@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_ath5k_hw_reg_read
	mov	x22, x0
Lloh50:
	adrp	x8, _AR5K_PHY_TST1_TXHOLD@GOTPAGE
Lloh51:
	ldr	x8, [x8, _AR5K_PHY_TST1_TXHOLD@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_ath5k_hw_reg_write
	mov	w24, #21
Lloh53:
	adrp	x25, _AR5K_PHY_ADC_TEST@GOTPAGE
Lloh54:
	ldr	x25, [x25, _AR5K_PHY_ADC_TEST@GOTPAGEOFF]
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	bl	_ath5k_hw_reg_read
	tbz	w0, #4, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	w0, #200
	mov	w1, #250
	bl	_usleep_range
	subs	w24, w24, #1
	b.ne	LBB0_20
LBB0_22:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x22
	bl	_ath5k_hw_reg_write
Lloh55:
	adrp	x22, _AR5K_PHY_AGCCTL@GOTPAGE
Lloh56:
	ldr	x22, [x22, _AR5K_PHY_AGCCTL@GOTPAGEOFF]
Lloh57:
	adrp	x23, _AR5K_PHY_AGCCTL_CAL@GOTPAGE
Lloh58:
	ldr	x23, [x23, _AR5K_PHY_AGCCTL_CAL@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w8, [x23]
Lloh59:
	adrp	x9, _AR5K_PHY_AGCCTL_NF@GOTPAGE
Lloh60:
	ldr	x9, [x9, _AR5K_PHY_AGCCTL_NF@GOTPAGEOFF]
Lloh61:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_AR5K_REG_ENABLE_BITS
	str	wzr, [x19, #24]
Lloh62:
	adrp	x8, _AR5K_MODE_11B@GOTPAGE
Lloh63:
	ldr	x8, [x8, _AR5K_MODE_11B@GOTPAGEOFF]
Lloh64:
	ldr	x8, [x8]
	cmp	x8, x21
	b.eq	LBB0_24
; %bb.23:
	mov	w8, #1
	str	w8, [x19, #24]
Lloh65:
	adrp	x21, _AR5K_PHY_IQ@GOTPAGE
Lloh66:
	ldr	x21, [x21, _AR5K_PHY_IQ@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh67:
	adrp	x8, _AR5K_PHY_IQ_CAL_NUM_LOG_MAX@GOTPAGE
Lloh68:
	ldr	x8, [x8, _AR5K_PHY_IQ_CAL_NUM_LOG_MAX@GOTPAGEOFF]
Lloh69:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #15
	bl	_AR5K_REG_WRITE_BITS
	ldr	w1, [x21]
Lloh70:
	adrp	x8, _AR5K_PHY_IQ_RUN@GOTPAGE
Lloh71:
	ldr	x8, [x8, _AR5K_PHY_IQ_RUN@GOTPAGEOFF]
Lloh72:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_AR5K_REG_ENABLE_BITS
LBB0_24:
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #0
	bl	_ath5k_hw_register_timeout
	cbz	x0, LBB0_26
; %bb.25:
	ldr	w2, [x20, #8]
Lloh73:
	adrp	x1, l_.str@PAGE
Lloh74:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_ERR
LBB0_26:
	ldr	w1, [x19, #28]
	mov	x0, x19
	bl	_ath5k_hw_set_antenna_mode
	b	LBB0_15
LBB0_27:
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_write_ofdm_timings
	cbnz	w0, LBB0_32
; %bb.28:
	ldr	x8, [x19, #8]
Lloh75:
	adrp	x9, _AR5K_SREV_AR5424@GOTPAGE
Lloh76:
	ldr	x9, [x9, _AR5K_SREV_AR5424@GOTPAGEOFF]
Lloh77:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_13
; %bb.29:
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_set_spur_mitigation_filter
	b	LBB0_13
LBB0_30:
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_ath5k_hw_rfgain_init
	cbnz	w0, LBB0_32
; %bb.31:
	mov	w0, #1000
	mov	w1, #1500
	bl	_usleep_range
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_ath5k_hw_rfregs_init
	cbz	w0, LBB0_33
LBB0_32:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_33:
	ldr	x8, [x19, #16]
Lloh78:
	adrp	x9, _AR5K_RF5111@GOTPAGE
Lloh79:
	ldr	x9, [x9, _AR5K_RF5111@GOTPAGEOFF]
Lloh80:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.34:
Lloh81:
	adrp	x8, _AR5K_MODE_11B@GOTPAGE
Lloh82:
	ldr	x8, [x8, _AR5K_MODE_11B@GOTPAGEOFF]
Lloh83:
	adrp	x9, _AR5K_TXCFG@GOTPAGE
Lloh84:
	ldr	x9, [x9, _AR5K_TXCFG@GOTPAGEOFF]
Lloh85:
	ldr	x8, [x8]
Lloh86:
	ldr	w1, [x9]
Lloh87:
	adrp	x9, _AR5K_TXCFG_B_MODE@GOTPAGE
Lloh88:
	ldr	x9, [x9, _AR5K_TXCFG_B_MODE@GOTPAGEOFF]
Lloh89:
	ldr	w2, [x9]
	mov	x0, x19
	cmp	x8, x21
	b.ne	LBB0_36
; %bb.35:
	bl	_AR5K_REG_ENABLE_BITS
	b	LBB0_18
LBB0_36:
	bl	_AR5K_REG_DISABLE_BITS
	b	LBB0_18
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpAdd	Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh86
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh85
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AR5K_PHY_RFBUS_REQ,4,2         ; @AR5K_PHY_RFBUS_REQ
	.comm	_AR5K_PHY_RFBUS_REQ_REQUEST,4,2 ; @AR5K_PHY_RFBUS_REQ_REQUEST
	.comm	_AR5K_PHY_RFBUS_GRANT,4,2       ; @AR5K_PHY_RFBUS_GRANT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AR5K_TUNE_MAX_TXPOWER,4,2      ; @AR5K_TUNE_MAX_TXPOWER
	.comm	_AR5K_AR5212,8,3                ; @AR5K_AR5212
	.comm	_AR5K_MODE_11B,8,3              ; @AR5K_MODE_11B
	.comm	_AR5K_SREV_AR5424,8,3           ; @AR5K_SREV_AR5424
	.comm	_AR5K_PHY_AGCCTL,4,2            ; @AR5K_PHY_AGCCTL
	.comm	_AR5K_PHY_AGCCTL_NF,4,2         ; @AR5K_PHY_AGCCTL_NF
	.comm	_AR5K_AR5210,8,3                ; @AR5K_AR5210
	.comm	_AR5K_RF5111,8,3                ; @AR5K_RF5111
	.comm	_AR5K_TXCFG,4,2                 ; @AR5K_TXCFG
	.comm	_AR5K_TXCFG_B_MODE,4,2          ; @AR5K_TXCFG_B_MODE
	.comm	_AR5K_PHY_ACT_DISABLE,4,2       ; @AR5K_PHY_ACT_DISABLE
	.comm	_AR5K_PHY_ACT,4,2               ; @AR5K_PHY_ACT
	.comm	_AR5K_PHY_ACT_ENABLE,4,2        ; @AR5K_PHY_ACT_ENABLE
	.comm	_AR5K_PHY_TST1,4,2              ; @AR5K_PHY_TST1
	.comm	_AR5K_PHY_TST1_TXHOLD,4,2       ; @AR5K_PHY_TST1_TXHOLD
	.comm	_AR5K_PHY_ADC_TEST,4,2          ; @AR5K_PHY_ADC_TEST
	.comm	_AR5K_PHY_AGCCTL_CAL,4,2        ; @AR5K_PHY_AGCCTL_CAL
	.comm	_AR5K_PHY_IQ,4,2                ; @AR5K_PHY_IQ
	.comm	_AR5K_PHY_IQ_CAL_NUM_LOG_MAX,4,2 ; @AR5K_PHY_IQ_CAL_NUM_LOG_MAX
	.comm	_AR5K_PHY_IQ_RUN,4,2            ; @AR5K_PHY_IQ_RUN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gain calibration timeout (%uMHz)\n"

.subsections_via_symbols
