	.file	"extr_phy.c_carl9170_init_phy.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	carl9170_init_phy, @function
carl9170_init_phy:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, DWORD PTR NL80211_BAND_2GHZ[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rdi, QWORD PTR 8[rdi]
	xor	ebx, ebx
	call	conf_is_ht40@PLT
	mov	rdi, r14
	mov	r12d, eax
	call	carl9170_regwrite_begin@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	r13d, ebp
	je	.L13
	mov	esi, DWORD PTR 12[rax]
.L5:
	mov	edi, DWORD PTR [rax]
	add	rbx, 1
	call	carl9170_regwrite@PLT
.L2:
	mov	rdi, QWORD PTR ar5416_phy_init[rip]
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	jle	.L14
	mov	rdx, QWORD PTR ar5416_phy_init[rip]
	lea	rax, [rbx+rbx*4]
	lea	rax, [rdx+rax*4]
	test	r12d, r12d
	jne	.L15
	cmp	r13d, ebp
	je	.L16
	mov	esi, DWORD PTR 4[rax]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	mov	esi, DWORD PTR 16[rax]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	mov	esi, DWORD PTR 8[rax]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	xor	eax, eax
	call	carl9170_regwrite_finish@PLT
	xor	eax, eax
	call	carl9170_regwrite_result@PLT
	test	eax, eax
	je	.L17
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	xor	esi, esi
	cmp	r13d, ebp
	mov	edx, r12d
	mov	rdi, r14
	sete	sil
	call	carl9170_init_phy_from_eeprom@PLT
	test	eax, eax
	jne	.L1
	mov	rdi, r14
	call	carl9170_init_power_cal@PLT
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR [r14]
	test	edx, edx
	jne	.L1
	cmp	r13d, ebp
	mov	edx, 20835
	mov	eax, 20803
	pop	rbx
	.cfi_def_cfa_offset 40
	cmovne	edx, eax
	mov	esi, DWORD PTR AR9170_PWR_REG_PLL_ADDAC[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	rdi, r14
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	carl9170_write_reg@PLT
	.cfi_endproc
.LFE0:
	.size	carl9170_init_phy, .-carl9170_init_phy
	.comm	ar5416_phy_init,8,8
	.comm	NL80211_BAND_2GHZ,4,4
	.comm	AR9170_PWR_REG_PLL_ADDAC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_phy.c_carl9170_init_phy.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	carl9170_init_phy, %function
carl9170_init_phy:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L15
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r9, r0
	ldr	r0, [r0, #4]
	mov	r6, r1
	ldr	r8, [r3]
	bl	conf_is_ht40
	mov	r7, r0
	mov	r0, r9
	mov	r4, #0
	bl	carl9170_regwrite_begin
	ldr	r5, .L15+4
	b	.L2
.L14:
	cmp	r8, r6
	ldreq	r1, [r1, #16]
	ldrne	r1, [r1, #12]
.L5:
	ldr	r0, [r2, r3, lsl #2]
	bl	carl9170_regwrite
	add	r4, r4, #1
.L2:
	ldr	r0, [r5]
	bl	ARRAY_SIZE
	cmp	r0, r4
	add	r3, r4, r4, lsl #2
	ble	.L13
	ldr	r2, [r5]
	cmp	r7, #0
	add	r1, r2, r3, lsl #2
	bne	.L14
	cmp	r8, r6
	ldreq	r1, [r1, #8]
	ldrne	r1, [r1, #4]
	b	.L5
.L13:
	bl	carl9170_regwrite_finish
	bl	carl9170_regwrite_result
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	sub	r1, r8, r6
	clz	r1, r1
	mov	r2, r7
	mov	r0, r9
	lsr	r1, r1, #5
	bl	carl9170_init_phy_from_eeprom
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r0, r9
	bl	carl9170_init_power_cal
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r3, [r9]
	cmp	r3, #0
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r1, .L15+8
	ldr	r3, .L15+12
	cmp	r8, r6
	mov	r0, r9
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r2, .L15+16
	ldr	r1, [r1]
	movne	r2, r3
	b	carl9170_write_reg
.L16:
	.align	2
.L15:
	.word	NL80211_BAND_2GHZ
	.word	ar5416_phy_init
	.word	AR9170_PWR_REG_PLL_ADDAC
	.word	20803
	.word	20835
	.size	carl9170_init_phy, .-carl9170_init_phy
	.comm	ar5416_phy_init,4,4
	.comm	NL80211_BAND_2GHZ,4,4
	.comm	AR9170_PWR_REG_PLL_ADDAC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
