	.file	"extr_ar9287_attach.c_ar9287WriteIni.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ar9287WriteIni, @function
ar9287WriteIni:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	rdi, rsi
	call	IEEE80211_IS_CHAN_2GHZ@PLT
	mov	rdi, r12
	test	rax, rax
	je	.L2
	call	IEEE80211_IS_CHAN_HT40@PLT
	mov	r13d, 3
	test	rax, rax
	je	.L11
.L3:
	xor	edi, edi
	call	AR_PHY@PLT
	mov	rdi, rbp
	mov	edx, 7
	mov	esi, eax
	call	OS_REG_WRITE@PLT
	mov	edx, DWORD PTR AR_PHY_SEL_INTERNAL_ADDAC[rip]
	mov	esi, DWORD PTR AR_PHY_ADC_SERIAL_CTL[rip]
	mov	rdi, rbp
	call	OS_REG_WRITE@PLT
	mov	rdi, rbp
	call	AH5212@PLT
	mov	edx, r13d
	xor	ecx, ecx
	mov	rdi, rbp
	lea	rsi, 4[rax]
	call	ath_hal_ini_write@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	AH9287@PLT
	mov	ecx, r12d
	mov	edx, r13d
	mov	rdi, rbp
	lea	rsi, 4[rax]
	call	ath_hal_ini_write@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	AH9287@PLT
	mov	ecx, r12d
	mov	edx, r13d
	mov	rdi, rbp
	mov	rsi, rax
	call	ath_hal_ini_write@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	AH5212@PLT
	mov	ecx, r12d
	mov	rdi, rbp
	mov	edx, 1
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rsi, rax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	ath_hal_ini_write@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	call	IEEE80211_IS_CHAN_HT40@PLT
	test	rax, rax
	je	.L12
.L4:
	mov	r13d, 2
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, r12
	xor	r13d, r13d
	call	IEEE80211_IS_CHAN_108G@PLT
	test	rax, rax
	setne	r13b
	add	r13d, 4
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, r12
	mov	r13d, 1
	call	IEEE80211_IS_CHAN_TURBO@PLT
	test	rax, rax
	je	.L3
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	ar9287WriteIni, .-ar9287WriteIni
	.comm	AR_PHY_SEL_INTERNAL_ADDAC,4,4
	.comm	AR_PHY_ADC_SERIAL_CTL,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_ar9287_attach.c_ar9287WriteIni.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar9287WriteIni, %function
ar9287WriteIni:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	mov	r0, r1
	mov	r5, r1
	bl	IEEE80211_IS_CHAN_2GHZ
	cmp	r0, #0
	mov	r0, r5
	beq	.L2
	bl	IEEE80211_IS_CHAN_HT40
	cmp	r0, #0
	movne	r6, #3
	beq	.L10
.L3:
	mov	r0, #0
	bl	AR_PHY
	mov	r2, #7
	mov	r1, r0
	mov	r0, r4
	bl	OS_REG_WRITE
	ldr	r3, .L12
	ldr	r2, .L12+4
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r0, r4
	bl	OS_REG_WRITE
	mov	r0, r4
	bl	AH5212
	mov	r2, r6
	add	r1, r0, #4
	mov	r3, #0
	mov	r0, r4
	bl	ath_hal_ini_write
	mov	r5, r0
	mov	r0, r4
	bl	AH9287
	mov	r3, r5
	mov	r2, r6
	add	r1, r0, #4
	mov	r0, r4
	bl	ath_hal_ini_write
	mov	r5, r0
	mov	r0, r4
	bl	AH9287
	mov	r3, r5
	mov	r1, r0
	mov	r2, r6
	mov	r0, r4
	bl	ath_hal_ini_write
	mov	r5, r0
	mov	r0, r4
	bl	AH5212
	mov	r3, r5
	mov	r1, r0
	mov	r2, #1
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	ath_hal_ini_write
.L2:
	bl	IEEE80211_IS_CHAN_HT40
	cmp	r0, #0
	beq	.L11
.L4:
	mov	r6, #2
	b	.L3
.L10:
	mov	r0, r5
	bl	IEEE80211_IS_CHAN_108G
	cmp	r0, #0
	movne	r6, #5
	moveq	r6, #4
	b	.L3
.L11:
	mov	r0, r5
	bl	IEEE80211_IS_CHAN_TURBO
	cmp	r0, #0
	moveq	r6, #1
	beq	.L3
	b	.L4
.L13:
	.align	2
.L12:
	.word	AR_PHY_ADC_SERIAL_CTL
	.word	AR_PHY_SEL_INTERNAL_ADDAC
	.size	ar9287WriteIni, .-ar9287WriteIni
	.comm	AR_PHY_SEL_INTERNAL_ADDAC,4,4
	.comm	AR_PHY_ADC_SERIAL_CTL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
