	.file	"extr_niu.c_niu_pci_vpd_fetch.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	niu_pci_vpd_fetch, @function
niu_pci_vpd_fetch:
.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
	add	rsi, 1
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	niu_pci_eeprom_read16_swp@PLT
	lea	ebp, 3[rax]
	movsx	rbp, ebp
	test	eax, eax
	jns	.L3
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rsi, r13
	mov	rdi, rbx
	call	niu_pci_eeprom_read@PLT
	cmp	eax, 144
	jne	.L1
	lea	rsi, 1[r13]
	mov	rdi, rbx
	call	niu_pci_eeprom_read16_swp@PLT
	test	eax, eax
	js	.L1
	cdqe
	lea	rsi, 3[r13]
	mov	rdi, rbx
	lea	rdx, [rax+r13]
	add	rbp, rax
	call	niu_pci_vpd_scan_props@PLT
	test	eax, eax
	js	.L1
	cmp	eax, 1
	je	.L1
.L3:
	lea	r13, 0[rbp+r12]
	cmp	r13, QWORD PTR ESPC_EEPROM_SIZE[rip]
	jl	.L5
.L1:
	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	niu_pci_vpd_fetch, .-niu_pci_vpd_fetch
	.comm	ESPC_EEPROM_SIZE,8,8
	.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_niu.c_niu_pci_vpd_fetch.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	niu_pci_vpd_fetch, %function
niu_pci_vpd_fetch:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	add	r1, r1, #1
	mov	r6, r0
	bl	niu_pci_eeprom_read16_swp
	cmp	r0, #0
	poplt	{r4, r5, r6, r7, r8, pc}
	ldr	r8, .L8
	add	r5, r0, #3
.L3:
	ldr	r3, [r8]
	add	r4, r5, r7
	cmp	r4, r3
	popge	{r4, r5, r6, r7, r8, pc}
	mov	r1, r4
	mov	r0, r6
	bl	niu_pci_eeprom_read
	cmp	r0, #144
	add	r1, r4, #1
	popne	{r4, r5, r6, r7, r8, pc}
	mov	r0, r6
	bl	niu_pci_eeprom_read16_swp
	cmp	r0, #0
	add	r1, r4, #3
	add	r2, r4, r0
	add	r5, r5, r0
	poplt	{r4, r5, r6, r7, r8, pc}
	mov	r0, r6
	bl	niu_pci_vpd_scan_props
	sub	r3, r0, #1
	clz	r3, r3
	lsr	r3, r3, #5
	orrs	r3, r3, r0, lsr #31
	beq	.L3
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	.align	2
.L8:
	.word	ESPC_EEPROM_SIZE
	.size	niu_pci_vpd_fetch, .-niu_pci_vpd_fetch
	.comm	ESPC_EEPROM_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
