	.file	"extr_hw.c_alx_enable_aspm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	alx_enable_aspm
	.type	alx_enable_aspm, @function
alx_enable_aspm:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	alx_hw_revision@PLT
	mov	esi, DWORD PTR ALX_PMCTRL[rip]
	mov	rdi, r13
	mov	r14d, eax
	call	alx_read_mem32@PLT
	mov	edx, DWORD PTR ALX_PMCTRL_LCKDET_TIMER_DEF[rip]
	mov	esi, DWORD PTR ALX_PMCTRL_LCKDET_TIMER[rip]
	mov	edi, eax
	mov	r15d, eax
	call	ALX_SET_FIELD@PLT
	mov	r12d, DWORD PTR ALX_PMCTRL_RCVR_WT_1US[rip]
	or	r12d, DWORD PTR ALX_PMCTRL_L1_CLKSW_EN[rip]
	or	r12d, DWORD PTR ALX_PMCTRL_L1_SRDSRX_PWD[rip]
	mov	edx, DWORD PTR ALX_PMCTRL_L1REG_TO_DEF[rip]
	or	r15d, r12d
	mov	esi, DWORD PTR ALX_PMCTRL_L1REQ_TO[rip]
	mov	edi, r15d
	call	ALX_SET_FIELD@PLT
	mov	edx, DWORD PTR ALX_PMCTRL_L1_TIMER_16US[rip]
	mov	esi, DWORD PTR ALX_PMCTRL_L1_TIMER[rip]
	mov	edi, r15d
	call	ALX_SET_FIELD@PLT
	mov	r12d, DWORD PTR ALX_PMCTRL_L1_SRDS_EN[rip]
	mov	edi, r14d
	or	r12d, DWORD PTR ALX_PMCTRL_L1_SRDSPLL_EN[rip]
	or	r12d, DWORD PTR ALX_PMCTRL_L1_BUFSRX_EN[rip]
	or	r12d, DWORD PTR ALX_PMCTRL_SADLY_EN[rip]
	or	r12d, DWORD PTR ALX_PMCTRL_HOTRST_WTEN[rip]
	or	r12d, DWORD PTR ALX_PMCTRL_L0S_EN[rip]
	or	r12d, DWORD PTR ALX_PMCTRL_L1_EN[rip]
	or	r12d, DWORD PTR ALX_PMCTRL_ASPM_FCEN[rip]
	or	r12d, DWORD PTR ALX_PMCTRL_TXL1_AFTER_L0S[rip]
	or	r12d, DWORD PTR ALX_PMCTRL_RXL1_AFTER_L0S[rip]
	not	r12d
	and	r12d, r15d
	call	alx_is_rev_a@PLT
	test	rax, rax
	jne	.L19
.L2:
	test	ebp, ebp
	je	.L3
	mov	eax, DWORD PTR ALX_PMCTRL_L0S_EN[rip]
	or	eax, DWORD PTR ALX_PMCTRL_ASPM_FCEN[rip]
	or	r12d, eax
.L3:
	test	ebx, ebx
	je	.L4
	mov	eax, DWORD PTR ALX_PMCTRL_L1_EN[rip]
	or	eax, DWORD PTR ALX_PMCTRL_ASPM_FCEN[rip]
	or	r12d, eax
.L4:
	mov	esi, DWORD PTR ALX_PMCTRL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edx, r12d
	mov	rdi, r13
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	alx_write_mem32@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	rdi, r13
	call	alx_hw_with_cr@PLT
	test	rax, rax
	je	.L2
	mov	eax, DWORD PTR ALX_PMCTRL_L1_SRDS_EN[rip]
	or	eax, DWORD PTR ALX_PMCTRL_L1_SRDSPLL_EN[rip]
	or	r12d, eax
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	alx_enable_aspm, .-alx_enable_aspm
	.comm	ALX_PMCTRL_TXL1_AFTER_L0S,4,4
	.comm	ALX_PMCTRL_SADLY_EN,4,4
	.comm	ALX_PMCTRL_RXL1_AFTER_L0S,4,4
	.comm	ALX_PMCTRL_RCVR_WT_1US,4,4
	.comm	ALX_PMCTRL_LCKDET_TIMER_DEF,4,4
	.comm	ALX_PMCTRL_LCKDET_TIMER,4,4
	.comm	ALX_PMCTRL_L1_TIMER_16US,4,4
	.comm	ALX_PMCTRL_L1_TIMER,4,4
	.comm	ALX_PMCTRL_L1_SRDS_EN,4,4
	.comm	ALX_PMCTRL_L1_SRDSRX_PWD,4,4
	.comm	ALX_PMCTRL_L1_SRDSPLL_EN,4,4
	.comm	ALX_PMCTRL_L1_EN,4,4
	.comm	ALX_PMCTRL_L1_CLKSW_EN,4,4
	.comm	ALX_PMCTRL_L1_BUFSRX_EN,4,4
	.comm	ALX_PMCTRL_L1REQ_TO,4,4
	.comm	ALX_PMCTRL_L1REG_TO_DEF,4,4
	.comm	ALX_PMCTRL_L0S_EN,4,4
	.comm	ALX_PMCTRL_HOTRST_WTEN,4,4
	.comm	ALX_PMCTRL_ASPM_FCEN,4,4
	.comm	ALX_PMCTRL,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_hw.c_alx_enable_aspm.c"
	.text
	.align	2
	.global	alx_enable_aspm
	.syntax unified
	.arm
	.fpu softvfp
	.type	alx_enable_aspm, %function
alx_enable_aspm:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	stm	sp, {r1, r2}
	mov	r5, r0
	bl	alx_hw_revision
	ldr	r9, .L20
	mov	r8, r0
	ldr	r1, [r9]
	mov	r0, r5
	bl	alx_read_mem32
	mov	r10, r0
	ldr	r3, .L20+4
	ldr	r2, .L20+8
	ldr	r1, [r3]
	ldr	r2, [r2]
	bl	ALX_SET_FIELD
	ldr	r1, .L20+12
	ldr	r3, .L20+16
	ldr	r2, .L20+20
	ldr	r4, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r4, r4, r3
	orr	r4, r4, r2
	ldr	r3, .L20+24
	ldr	r2, .L20+28
	orr	r4, r4, r10
	ldr	r1, [r3]
	mov	r0, r4
	ldr	r2, [r2]
	bl	ALX_SET_FIELD
	ldr	r3, .L20+32
	ldr	r2, .L20+36
	ldr	r1, [r3]
	mov	r0, r4
	ldr	r2, [r2]
	ldr	fp, .L20+40
	ldr	r10, .L20+44
	bl	ALX_SET_FIELD
	ldr	r1, .L20+48
	ldr	r2, [r10]
	ldr	r0, [fp]
	ldr	r3, .L20+52
	ldr	ip, [r1]
	ldr	r1, .L20+56
	ldr	r3, [r3]
	orr	r0, r0, r2
	ldr	r2, .L20+60
	orr	r0, r0, ip
	ldr	r7, .L20+64
	ldr	ip, [r1]
	ldr	lr, [r2]
	orr	r0, r0, r3
	orr	r0, r0, ip
	ldr	r6, .L20+68
	ldr	ip, [r7]
	orr	r0, r0, lr
	orr	r0, r0, ip
	ldr	lr, .L20+72
	ldr	ip, [r6]
	ldr	lr, [lr]
	orr	ip, r0, ip
	ldr	r0, .L20+76
	orr	ip, ip, lr
	ldr	lr, [r0]
	mov	r0, r8
	orr	ip, ip, lr
	bic	r4, r4, ip
	bl	alx_is_rev_a
	cmp	r0, #0
	ldr	r2, .L20+60
	bne	.L19
.L2:
	ldr	r3, [sp]
	ldr	r1, [r9]
	cmp	r3, #0
	ldrne	r2, [r2]
	ldrne	r0, [r6]
	ldr	r3, [sp, #4]
	orrne	r2, r2, r0
	orrne	r4, r4, r2
	cmp	r3, #0
	ldrne	r2, [r7]
	ldrne	r3, [r6]
	mov	r0, r5
	orrne	r3, r2, r3
	orrne	r4, r4, r3
	mov	r2, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	alx_write_mem32
.L19:
	mov	r0, r5
	bl	alx_hw_with_cr
	cmp	r0, #0
	ldrne	r0, [fp]
	ldrne	ip, [r10]
	ldr	r2, .L20+60
	orrne	r0, r0, ip
	orrne	r4, r4, r0
	b	.L2
.L21:
	.align	2
.L20:
	.word	ALX_PMCTRL
	.word	ALX_PMCTRL_LCKDET_TIMER
	.word	ALX_PMCTRL_LCKDET_TIMER_DEF
	.word	ALX_PMCTRL_RCVR_WT_1US
	.word	ALX_PMCTRL_L1_CLKSW_EN
	.word	ALX_PMCTRL_L1_SRDSRX_PWD
	.word	ALX_PMCTRL_L1REQ_TO
	.word	ALX_PMCTRL_L1REG_TO_DEF
	.word	ALX_PMCTRL_L1_TIMER
	.word	ALX_PMCTRL_L1_TIMER_16US
	.word	ALX_PMCTRL_L1_SRDS_EN
	.word	ALX_PMCTRL_L1_SRDSPLL_EN
	.word	ALX_PMCTRL_L1_BUFSRX_EN
	.word	ALX_PMCTRL_SADLY_EN
	.word	ALX_PMCTRL_HOTRST_WTEN
	.word	ALX_PMCTRL_L0S_EN
	.word	ALX_PMCTRL_L1_EN
	.word	ALX_PMCTRL_ASPM_FCEN
	.word	ALX_PMCTRL_TXL1_AFTER_L0S
	.word	ALX_PMCTRL_RXL1_AFTER_L0S
	.size	alx_enable_aspm, .-alx_enable_aspm
	.comm	ALX_PMCTRL_TXL1_AFTER_L0S,4,4
	.comm	ALX_PMCTRL_SADLY_EN,4,4
	.comm	ALX_PMCTRL_RXL1_AFTER_L0S,4,4
	.comm	ALX_PMCTRL_RCVR_WT_1US,4,4
	.comm	ALX_PMCTRL_LCKDET_TIMER_DEF,4,4
	.comm	ALX_PMCTRL_LCKDET_TIMER,4,4
	.comm	ALX_PMCTRL_L1_TIMER_16US,4,4
	.comm	ALX_PMCTRL_L1_TIMER,4,4
	.comm	ALX_PMCTRL_L1_SRDS_EN,4,4
	.comm	ALX_PMCTRL_L1_SRDSRX_PWD,4,4
	.comm	ALX_PMCTRL_L1_SRDSPLL_EN,4,4
	.comm	ALX_PMCTRL_L1_EN,4,4
	.comm	ALX_PMCTRL_L1_CLKSW_EN,4,4
	.comm	ALX_PMCTRL_L1_BUFSRX_EN,4,4
	.comm	ALX_PMCTRL_L1REQ_TO,4,4
	.comm	ALX_PMCTRL_L1REG_TO_DEF,4,4
	.comm	ALX_PMCTRL_L0S_EN,4,4
	.comm	ALX_PMCTRL_HOTRST_WTEN,4,4
	.comm	ALX_PMCTRL_ASPM_FCEN,4,4
	.comm	ALX_PMCTRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
