	.file	"extr_netxen_nic_init.c_netxen_nic_validate_product_offs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	netxen_nic_validate_product_offs, @function
netxen_nic_validate_product_offs:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR 16[rdi]
	mov	QWORD PTR 16[rsp], rdi
	mov	rdi, QWORD PTR [rdi]
	mov	r13, QWORD PTR [rax]
	call	NX_IS_REVISION_P2@PLT
	mov	DWORD PTR 44[rsp], 1
	test	rax, rax
	je	.L22
.L2:
	mov	esi, DWORD PTR NX_UNI_DIR_SECT_PRODUCT_TBL[rip]
	mov	rdi, r13
	call	nx_get_table_desc@PLT
	mov	r15, rax
	test	rax, rax
	je	.L10
	mov	edi, DWORD PTR [rax]
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR 4[r15]
	mov	r14, rax
	mov	QWORD PTR 24[rsp], rax
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR 8[r15]
	mov	rbx, rax
	call	cpu_to_le32@PLT
	mov	rcx, QWORD PTR 16[rsp]
	imul	rbx, r14
	mov	rdx, QWORD PTR 16[rcx]
	add	rbx, rax
	cmp	QWORD PTR 8[rdx], rbx
	jl	.L10
.L5:
	endbr64
	cmp	QWORD PTR 24[rsp], 0
	jle	.L6
.L11:
	cmp	DWORD PTR 44[rsp], 1
	mov	eax, 1
	sbb	rcx, rcx
	xor	ebp, ebp
	not	rcx
	add	rcx, 2
	sal	rax, cl
	mov	QWORD PTR 32[rsp], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	add	rbp, 1
	cmp	QWORD PTR 24[rsp], rbp
	jle	.L6
.L8:
	mov	rax, QWORD PTR 16[rsp]
	mov	edi, DWORD PTR 8[r15]
	mov	r14, QWORD PTR [rax]
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR 4[r15]
	mov	rbx, rax
	call	cpu_to_le32@PLT
	imul	rax, rbp
	add	rbx, rax
	movsx	rax, DWORD PTR NX_UNI_FLAGS_OFF[rip]
	lea	r12, 0[0+rbx*8]
	lea	rax, 0[r13+rax*4]
	mov	edi, DWORD PTR [rax+r12]
	call	cpu_to_le32@PLT
	mov	QWORD PTR 8[rsp], rax
	movsx	rax, DWORD PTR NX_UNI_CHIP_REV_OFF[rip]
	lea	rax, 0[r13+rax*4]
	mov	edi, DWORD PTR [rax+r12]
	call	cpu_to_le32@PLT
	cmp	r14, rax
	jne	.L7
	mov	rsi, QWORD PTR 32[rsp]
	test	QWORD PTR 8[rsp], rsi
	je	.L7
	mov	rax, QWORD PTR 16[rsp]
	mov	QWORD PTR 8[rax], rbx
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	eax, DWORD PTR 44[rsp]
	test	eax, eax
	je	.L10
	mov	rax, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR [rax]
	call	NX_IS_REVISION_P3@PLT
	test	rax, rax
	jne	.L23
.L10:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	rdi, QWORD PTR 16[rsp]
	call	netxen_p3_has_mn@PLT
	mov	DWORD PTR 44[rsp], eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L23:
	cmp	QWORD PTR 24[rsp], 0
	mov	DWORD PTR 44[rsp], 0
	jg	.L11
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	netxen_nic_validate_product_offs, .-netxen_nic_validate_product_offs
	.comm	NX_UNI_FLAGS_OFF,4,4
	.comm	NX_UNI_DIR_SECT_PRODUCT_TBL,4,4
	.comm	NX_UNI_CHIP_REV_OFF,4,4
	.comm	EINVAL,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_netxen_nic_init.c_netxen_nic_validate_product_offs.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	netxen_nic_validate_product_offs, %function
netxen_nic_validate_product_offs:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0, #8]
	sub	sp, sp, #36
	mov	r8, r0
	ldr	r0, [r0]
	ldr	r7, [r3]
	bl	NX_IS_REVISION_P2
	cmp	r0, #0
	movne	r3, #1
	strne	r3, [sp, #28]
	beq	.L27
.L2:
	ldr	r3, .L30
	mov	r0, r7
	ldr	r1, [r3]
	bl	nx_get_table_desc
	subs	r6, r0, #0
	beq	.L12
	ldr	r0, [r6]
	bl	cpu_to_le32
	mov	r9, r0
	ldr	r0, [r6, #4]
	str	r9, [sp, #4]
	bl	cpu_to_le32
	mov	r4, r0
	ldr	r0, [r6, #8]
	bl	cpu_to_le32
	ldr	r3, [r8, #8]
	mla	r9, r4, r9, r0
	ldr	r3, [r3, #4]
	cmp	r3, r9
	blt	.L12
.L5:
	ldr	r3, [sp, #4]
	cmp	r3, #0
	ble	.L6
	ldr	r3, [sp, #28]
	cmp	r3, #0
	movne	r2, #1
	bne	.L8
.L7:
	mov	r2, #2
.L8:
	mov	r1, #1
	sub	r0, r2, #32
	lsl	r3, r1, r0
	rsb	r0, r2, #32
	orr	r3, r3, r1, lsr r0
	str	r3, [sp, #24]
	lsl	r3, r1, r2
	mov	r9, #0
	ldr	fp, .L30+4
	ldr	r10, .L30+8
	str	r3, [sp, #20]
	str	r8, [sp, #16]
	b	.L10
.L9:
	ldr	r3, [sp, #4]
	cmp	r3, r9
	ble	.L28
.L10:
	ldr	r3, [sp, #16]
	ldr	r0, [r6, #8]
	ldr	r8, [r3]
	bl	cpu_to_le32
	mov	r4, r0
	ldr	r0, [r6, #4]
	bl	cpu_to_le32
	mla	r4, r9, r0, r4
	ldr	r3, [fp]
	add	r9, r9, #1
	add	r3, r4, r3
	ldr	r0, [r7, r3, lsl #2]
	bl	cpu_to_le32
	ldr	r3, [r10]
	mov	r5, r0
	add	r3, r4, r3
	ldr	r0, [r7, r3, lsl #2]
	bl	cpu_to_le32
	cmp	r8, r0
	bne	.L9
	ldr	r3, [sp, #20]
	asr	r1, r5, #31
	and	r3, r5, r3
	str	r3, [sp, #8]
	ldr	r3, [sp, #24]
	and	r3, r1, r3
	str	r3, [sp, #12]
	add	r3, sp, #8
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	beq	.L9
	mov	r0, #0
	ldr	r8, [sp, #16]
	str	r4, [r8, #4]
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	ldr	r8, [sp, #16]
.L6:
	ldr	r3, [sp, #28]
	cmp	r3, #0
	beq	.L12
	ldr	r0, [r8]
	bl	NX_IS_REVISION_P3
	cmp	r0, #0
	bne	.L29
.L12:
	ldr	r3, .L30+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	mov	r0, r8
	bl	netxen_p3_has_mn
	str	r0, [sp, #28]
	b	.L2
.L29:
	ldr	r3, [sp, #4]
	cmp	r3, #0
	mov	r3, #0
	str	r3, [sp, #28]
	bgt	.L7
	b	.L12
.L31:
	.align	2
.L30:
	.word	NX_UNI_DIR_SECT_PRODUCT_TBL
	.word	NX_UNI_FLAGS_OFF
	.word	NX_UNI_CHIP_REV_OFF
	.word	EINVAL
	.size	netxen_nic_validate_product_offs, .-netxen_nic_validate_product_offs
	.comm	NX_UNI_FLAGS_OFF,4,4
	.comm	NX_UNI_DIR_SECT_PRODUCT_TBL,4,4
	.comm	NX_UNI_CHIP_REV_OFF,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
