	.file	"extr_netxen_nic_main.c_netxen_pcie_strap_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Gen2 strapping detected\n"
.LC1:
	.string	"Gen1 strapping detected\n"
	.text
	.p2align 4
	.type	netxen_pcie_strap_init, @function
netxen_pcie_strap_init:
.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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbx, QWORD PTR 8[rdi]
	mov	edi, DWORD PTR PCIE_CHICKEN3[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 4[rsp], 0
	call	NETXEN_PCIE_REG@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	NXRD32@PLT
	mov	esi, DWORD PTR PCI_CAP_ID_GEN[rip]
	mov	rdi, rbx
	and	eax, -50331649
	mov	r14d, eax
	call	pci_find_capability@PLT
	mov	r12d, eax
	cmp	eax, 192
	je	.L19
	mov	rax, QWORD PTR 8[rbp]
	lea	rsi, .LC1[rip]
	or	r14d, 16777216
	lea	rdi, 4[rax]
	call	dev_info@PLT
	mov	rax, QWORD PTR NX_P3_B0[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L20
	mov	edi, DWORD PTR PCIE_CHICKEN3[rip]
	call	NETXEN_PCIE_REG@PLT
	mov	edx, r14d
	mov	rdi, rbp
	mov	esi, eax
	call	NXWR32@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L20:
	.cfi_restore_state
	mov	r13d, 987168
.L4:
	mov	edi, DWORD PTR PCIE_CHICKEN3[rip]
	call	NETXEN_PCIE_REG@PLT
	mov	edx, r14d
	mov	rdi, rbp
	mov	esi, eax
	call	NXWR32@PLT
	mov	r14d, DWORD PTR [rbx]
	test	r14b, 7
	jne	.L1
	add	r12d, 8
	mov	ebp, 8
	lea	r15, 4[rsp]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdx, r15
	mov	esi, r12d
	mov	rdi, rbx
	call	pci_read_config_dword@PLT
	mov	rdx, r15
	mov	esi, r12d
	mov	rdi, rbx
	call	pci_read_config_dword@PLT
	mov	edx, r13d
	mov	esi, r12d
	mov	rdi, rbx
	call	pci_write_config_dword@PLT
	add	DWORD PTR [rbx], 1
	sub	ebp, 1
	jne	.L6
	mov	DWORD PTR [rbx], r14d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	lea	r15, 4[rsp]
	mov	esi, 208
	mov	rdi, rbx
	mov	r13d, 987136
	mov	rdx, r15
	call	pci_read_config_dword@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	edx, r14d
	lea	rsi, .LC0[rip]
	or	edx, 16777216
	and	eax, 983040
	cmp	eax, 131072
	mov	rax, QWORD PTR 8[rbp]
	cmovne	r14d, edx
	lea	rdi, 4[rax]
	call	dev_info@PLT
	jmp	.L4
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	netxen_pcie_strap_init, .-netxen_pcie_strap_init
	.comm	PCI_CAP_ID_GEN,4,4
	.comm	PCIE_CHICKEN3,4,4
	.comm	NX_P3_B0,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_netxen_nic_main.c_netxen_pcie_strap_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Gen2 strapping detected\012\000"
	.align	2
.LC1:
	.ascii	"Gen1 strapping detected\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	netxen_pcie_strap_init, %function
netxen_pcie_strap_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r3, #0
	mov	r8, r0
	ldr	r9, .L23
	ldr	r2, .L23+4
	sub	sp, sp, #12
	ldr	r0, [r9]
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	ldr	r4, [r8, #4]
	str	r3, [sp]
	bl	NETXEN_PCIE_REG
	mov	r1, r0
	mov	r0, r8
	bl	NXRD32
	ldr	r3, .L23+8
	mov	r6, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	pci_find_capability
	cmp	r0, #192
	mov	r5, r0
	bic	r6, r6, #50331648
	beq	.L20
	ldr	r0, [r8, #4]
	ldr	r1, .L23+12
	add	r0, r0, #4
	bl	dev_info
	ldr	r3, .L23+16
	ldr	r2, [r8]
	ldr	r3, [r3]
	orr	r6, r6, #16777216
	cmp	r2, r3
	beq	.L21
	ldr	r0, [r9]
	bl	NETXEN_PCIE_REG
	mov	r2, r6
	mov	r1, r0
	mov	r0, r8
	bl	NXWR32
.L1:
	ldr	r3, .L23+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L21:
	ldr	r7, .L23+20
.L4:
	ldr	r0, [r9]
	bl	NETXEN_PCIE_REG
	mov	r2, r6
	mov	r1, r0
	mov	r0, r8
	bl	NXWR32
	ldr	r8, [r4]
	tst	r8, #7
	moveq	r6, #8
	addeq	r5, r5, r6
	bne	.L1
.L6:
	mov	r2, sp
	mov	r1, r5
	mov	r0, r4
	bl	pci_read_config_dword
	mov	r2, sp
	mov	r1, r5
	mov	r0, r4
	bl	pci_read_config_dword
	mov	r2, r7
	mov	r1, r5
	mov	r0, r4
	bl	pci_write_config_dword
	ldr	r3, [r4]
	subs	r6, r6, #1
	add	r3, r3, #1
	str	r3, [r4]
	bne	.L6
	str	r8, [r4]
	b	.L1
.L20:
	mov	r2, sp
	mov	r1, #208
	mov	r0, r4
	bl	pci_read_config_dword
	ldr	r3, [sp]
	ldr	r0, [r8, #4]
	and	r3, r3, #983040
	cmp	r3, #131072
	ldr	r1, .L23+24
	add	r0, r0, #4
	orrne	r6, r6, #16777216
	mov	r7, #987136
	bl	dev_info
	b	.L4
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	PCIE_CHICKEN3
	.word	.LC2
	.word	PCI_CAP_ID_GEN
	.word	.LC1
	.word	NX_P3_B0
	.word	987168
	.word	.LC0
	.size	netxen_pcie_strap_init, .-netxen_pcie_strap_init
	.comm	PCI_CAP_ID_GEN,4,4
	.comm	PCIE_CHICKEN3,4,4
	.comm	NX_P3_B0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
