	.file	"extr_if_ae.c_ae_vpd_read_word.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"timeout reading VPD register %d.\n"
	.text
	.p2align 4
	.type	ae_vpd_read_word, @function
ae_vpd_read_word:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	xor	edx, edx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xor	ebx, ebx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR AE_VPD_DATA_REG[rip]
	call	AE_WRITE_4@PLT
	mov	ecx, DWORD PTR AE_VPD_CAP_ADDR_SHIFT[rip]
	mov	esi, DWORD PTR AE_VPD_CAP_REG[rip]
	mov	rdi, rbp
	lea	edx, 256[0+r12*4]
	sal	edx, cl
	and	edx, DWORD PTR AE_VPD_CAP_ADDR_MASK[rip]
	call	AE_WRITE_4@PLT
	mov	eax, DWORD PTR AE_VPD_TIMEOUT[rip]
	test	eax, eax
	jg	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR AE_VPD_TIMEOUT[rip]
	add	ebx, 1
	cmp	eax, ebx
	jle	.L2
.L4:
	mov	edi, 2000
	call	DELAY@PLT
	mov	esi, DWORD PTR AE_VPD_CAP_REG[rip]
	mov	rdi, rbp
	call	AE_READ_4@PLT
	test	DWORD PTR AE_VPD_CAP_DONE[rip], eax
	je	.L3
	mov	eax, DWORD PTR AE_VPD_TIMEOUT[rip]
.L2:
	cmp	eax, ebx
	je	.L11
	mov	esi, DWORD PTR AE_VPD_DATA_REG[rip]
	mov	rdi, rbp
	call	AE_READ_4@PLT
	mov	DWORD PTR 0[r13], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	call	device_printf@PLT
	mov	eax, DWORD PTR ETIMEDOUT[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ae_vpd_read_word, .-ae_vpd_read_word
	.comm	ETIMEDOUT,4,4
	.comm	AE_VPD_TIMEOUT,4,4
	.comm	AE_VPD_DATA_REG,4,4
	.comm	AE_VPD_CAP_REG,4,4
	.comm	AE_VPD_CAP_DONE,4,4
	.comm	AE_VPD_CAP_ADDR_SHIFT,4,4
	.comm	AE_VPD_CAP_ADDR_MASK,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_if_ae.c_ae_vpd_read_word.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"timeout reading VPD register %d.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ae_vpd_read_word, %function
ae_vpd_read_word:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r1
	mov	r5, r0
	ldr	r10, .L12
	mov	r9, r2
	ldr	r1, [r10]
	mov	r2, #0
	bl	AE_WRITE_4
	ldr	r1, .L12+4
	ldr	r2, .L12+8
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	r7, .L12+12
	add	r3, r8, #64
	lsl	r3, r3, #2
	ldr	r6, .L12+16
	and	r2, r2, r3, lsl r1
	mov	r0, r5
	ldr	r1, [r7]
	bl	AE_WRITE_4
	ldr	r3, [r6]
	mov	r4, #0
	cmp	r3, #0
	ble	.L2
	ldr	fp, .L12+20
	b	.L4
.L3:
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L2
.L4:
	mov	r0, #2000
	bl	DELAY
	mov	r0, r5
	ldr	r1, [r7]
	bl	AE_READ_4
	ldr	r3, [fp]
	tst	r0, r3
	ldr	r3, [r6]
	beq	.L3
.L2:
	cmp	r3, r4
	beq	.L11
	mov	r0, r5
	ldr	r1, [r10]
	bl	AE_READ_4
	mov	r3, r0
	mov	r0, #0
	str	r3, [r9]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	mov	r2, r8
	ldr	r0, [r5]
	ldr	r1, .L12+24
	bl	device_printf
	ldr	r3, .L12+28
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	.align	2
.L12:
	.word	AE_VPD_DATA_REG
	.word	AE_VPD_CAP_ADDR_SHIFT
	.word	AE_VPD_CAP_ADDR_MASK
	.word	AE_VPD_CAP_REG
	.word	AE_VPD_TIMEOUT
	.word	AE_VPD_CAP_DONE
	.word	.LC0
	.word	ETIMEDOUT
	.size	ae_vpd_read_word, .-ae_vpd_read_word
	.comm	ETIMEDOUT,4,4
	.comm	AE_VPD_TIMEOUT,4,4
	.comm	AE_VPD_DATA_REG,4,4
	.comm	AE_VPD_CAP_REG,4,4
	.comm	AE_VPD_CAP_DONE,4,4
	.comm	AE_VPD_CAP_ADDR_SHIFT,4,4
	.comm	AE_VPD_CAP_ADDR_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
