	.file	"extr_if_mxge.c_mxge_enable_nvidia_ecrc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"could not find parent?\n"
.LC1:
	.string	"pmap_kenter_temporary didn't\n"
.LC2:
	.string	"mapping failed: 0x%x:0x%x\n"
.LC3:
	.string	"extended mapping failed\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC4:
	.string	"Enabled ECRC on upstream Nvidia bridge at %d:%d:%d\n"
	.text
	.p2align 4
	.type	mxge_enable_nvidia_ecrc, @function
mxge_enable_nvidia_ecrc:
.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
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 56
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR mxge_nvidia_ecrc_enable[rip]
	test	eax, eax
	jne	.L21
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 56
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	rbx, rdi
	mov	rdi, QWORD PTR [rdi]
	call	device_get_parent@PLT
	mov	rdi, rax
	call	device_get_parent@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L23
	mov	esi, DWORD PTR PCIR_VENDOR[rip]
	mov	edx, 2
	mov	rdi, rax
	call	pci_read_config@PLT
	mov	esi, DWORD PTR PCIR_DEVICE[rip]
	mov	edx, 2
	mov	rdi, rbp
	mov	r12d, eax
	call	pci_read_config@PLT
	cmp	r12d, 4318
	jne	.L1
	cmp	eax, 93
	je	.L12
	sub	eax, 884
	cmp	eax, 4
	ja	.L1
	xor	edx, edx
	xor	esi, esi
	xor	edi, edi
	call	pci_find_bsf@PLT
	mov	r12, rax
	test	rax, rax
	je	.L1
	mov	esi, DWORD PTR PCIR_VENDOR[rip]
	mov	edx, 2
	mov	rdi, rax
	call	pci_read_config@PLT
	cmp	eax, 4318
	jne	.L1
	mov	esi, DWORD PTR PCIR_DEVICE[rip]
	mov	edx, 2
	mov	rdi, r12
	call	pci_read_config@PLT
	cmp	eax, 873
	jne	.L1
	mov	rdi, r12
	mov	edx, 2
	mov	esi, 144
	call	pci_read_config@PLT
	movsx	r12, eax
	movabs	rax, 1099444518912
	sal	r12, 25
	and	r12, rax
	jne	.L6
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rdi, QWORD PTR [rbx]
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	device_printf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r12d, 3758096384
.L6:
	mov	r13d, DWORD PTR PCI_IVAR_BUS[rip]
	mov	rdi, rbp
	call	device_get_parent@PLT
	mov	rsi, rbp
	mov	rcx, rsp
	mov	edx, r13d
	mov	rdi, rax
	call	BUS_READ_IVAR@PLT
	mov	r13d, DWORD PTR PCI_IVAR_SLOT[rip]
	mov	rdi, rbp
	call	device_get_parent@PLT
	mov	rsi, rbp
	lea	rcx, 8[rsp]
	mov	edx, r13d
	mov	rdi, rax
	call	BUS_READ_IVAR@PLT
	mov	r13d, DWORD PTR PCI_IVAR_FUNCTION[rip]
	mov	rdi, rbp
	call	device_get_parent@PLT
	mov	rsi, rbp
	lea	rcx, 16[rsp]
	mov	edx, r13d
	mov	rdi, rax
	call	BUS_READ_IVAR@PLT
	mov	r13d, DWORD PTR PCI_IVAR_VENDOR[rip]
	mov	rdi, rbp
	call	device_get_parent@PLT
	mov	rsi, rbp
	lea	rcx, 24[rsp]
	mov	edx, r13d
	mov	rdi, rax
	call	BUS_READ_IVAR@PLT
	mov	rdi, rbp
	mov	r13d, DWORD PTR PCI_IVAR_DEVICE[rip]
	call	device_get_parent@PLT
	mov	rsi, rbp
	lea	rcx, 32[rsp]
	mov	rdi, rax
	mov	edx, r13d
	call	BUS_READ_IVAR@PLT
	mov	rax, QWORD PTR [rsp]
	mov	rdx, QWORD PTR 16[rsp]
	sal	rax, 5
	add	rax, QWORD PTR 8[rsp]
	lea	rbp, [rdx+rax*8]
	sal	rbp, 12
	add	rbp, r12
	mov	r12d, DWORD PTR PAGE_SIZE[rip]
	mov	edi, ebp
	call	trunc_page@PLT
	mov	esi, r12d
	mov	edi, eax
	call	pmap_mapdev@PLT
	mov	r12, rax
	test	rax, rax
	je	.L24
	movsx	rdx, DWORD PTR PCIR_VENDOR[rip]
	and	rbp, QWORD PTR PAGE_MASK[rip]
	lea	rax, [rax+rbp]
	movsx	rcx, DWORD PTR PCIR_DEVICE[rip]
	movsx	rsi, DWORD PTR [rax+rdx]
	mov	ecx, DWORD PTR [rax+rcx]
	mov	rdx, rsi
	cmp	rsi, QWORD PTR 24[rsp]
	jne	.L8
	movsx	rsi, ecx
	cmp	rsi, QWORD PTR 32[rsp]
	jne	.L8
	mov	edx, DWORD PTR 376[rax]
	cmp	edx, -1
	je	.L25
	or	edx, 64
	mov	esi, DWORD PTR PAGE_SIZE[rip]
	mov	edi, r12d
	mov	DWORD PTR 376[rax], edx
	call	pmap_unmapdev@PLT
	cmp	QWORD PTR mxge_verbose[rip], 0
	je	.L1
	mov	ecx, DWORD PTR 8[rsp]
	mov	edx, DWORD PTR [rsp]
	lea	rsi, .LC4[rip]
	xor	eax, eax
	mov	r8d, DWORD PTR 16[rsp]
	mov	rdi, QWORD PTR [rbx]
	call	device_printf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, QWORD PTR [rbx]
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	device_printf@PLT
	mov	esi, DWORD PTR PAGE_SIZE[rip]
	mov	edi, r12d
	call	pmap_unmapdev@PLT
	jmp	.L1
.L24:
	mov	rdi, QWORD PTR [rbx]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	device_printf@PLT
	jmp	.L1
.L25:
	mov	rdi, QWORD PTR [rbx]
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	device_printf@PLT
	mov	esi, DWORD PTR PAGE_SIZE[rip]
	mov	edi, r12d
	call	pmap_unmapdev@PLT
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mxge_enable_nvidia_ecrc, .-mxge_enable_nvidia_ecrc
	.comm	mxge_verbose,8,8
	.comm	mxge_nvidia_ecrc_enable,4,4
	.comm	PCI_IVAR_VENDOR,4,4
	.comm	PCI_IVAR_SLOT,4,4
	.comm	PCI_IVAR_FUNCTION,4,4
	.comm	PCI_IVAR_DEVICE,4,4
	.comm	PCI_IVAR_BUS,4,4
	.comm	PCIR_VENDOR,4,4
	.comm	PCIR_DEVICE,4,4
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_MASK,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_if_mxge.c_mxge_enable_nvidia_ecrc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"could not find parent?\012\000"
	.align	2
.LC1:
	.ascii	"pmap_kenter_temporary didn't\012\000"
	.align	2
.LC2:
	.ascii	"mapping failed: 0x%x:0x%x\012\000"
	.align	2
.LC3:
	.ascii	"extended mapping failed\012\000"
	.align	2
.LC4:
	.ascii	"Enabled ECRC on upstream Nvidia bridge at %d:%d:%d\012"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mxge_enable_nvidia_ecrc, %function
mxge_enable_nvidia_ecrc:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L29
	ldr	r2, .L29+4
	ldr	r3, [r3]
	sub	sp, sp, #36
	cmp	r3, #0
	ldr	r2, [r2]
	str	r2, [sp, #28]
	mov	r2,#0
	bne	.L24
.L1:
	ldr	r3, .L29+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L24:
	mov	r4, r0
	ldr	r0, [r0]
	bl	device_get_parent
	bl	device_get_parent
	subs	r5, r0, #0
	beq	.L26
	ldr	r7, .L29+8
	mov	r2, #2
	ldr	r1, [r7]
	bl	pci_read_config
	mov	r6, r0
	ldr	r8, .L29+12
	mov	r2, #2
	mov	r0, r5
	ldr	r1, [r8]
	bl	pci_read_config
	ldr	r3, .L29+16
	cmp	r6, r3
	bne	.L1
	cmp	r0, #93
	beq	.L12
	sub	r3, r0, #884
	cmp	r3, #4
	bhi	.L1
	mov	r2, #0
	mov	r1, r2
	mov	r0, r2
	bl	pci_find_bsf
	subs	r9, r0, #0
	beq	.L1
	mov	r2, #2
	ldr	r1, [r7]
	bl	pci_read_config
	cmp	r0, r6
	bne	.L1
	mov	r2, #2
	mov	r0, r9
	ldr	r1, [r8]
	bl	pci_read_config
	ldr	r3, .L29+20
	cmp	r0, r3
	bne	.L1
	mov	r0, r9
	mov	r2, #2
	mov	r1, #144
	bl	pci_read_config
	lsl	r6, r0, #25
	ands	r6, r6, #-67108864
	bne	.L6
	b	.L1
.L26:
	ldr	r0, [r4]
	ldr	r1, .L29+24
	bl	device_printf
	b	.L1
.L12:
	mov	r6, #-536870912
.L6:
	mov	r0, r5
	bl	device_get_parent
	ldr	r2, .L29+28
	mov	r1, r5
	ldr	r2, [r2]
	add	r3, sp, #8
	bl	BUS_READ_IVAR
	mov	r0, r5
	bl	device_get_parent
	ldr	r2, .L29+32
	mov	r1, r5
	ldr	r2, [r2]
	add	r3, sp, #12
	bl	BUS_READ_IVAR
	mov	r0, r5
	bl	device_get_parent
	ldr	r2, .L29+36
	mov	r1, r5
	ldr	r2, [r2]
	add	r3, sp, #16
	bl	BUS_READ_IVAR
	mov	r0, r5
	bl	device_get_parent
	ldr	r2, .L29+40
	mov	r1, r5
	ldr	r2, [r2]
	add	r3, sp, #20
	bl	BUS_READ_IVAR
	mov	r0, r5
	bl	device_get_parent
	ldr	r3, .L29+44
	mov	r1, r5
	ldr	r2, [r3]
	add	r3, sp, #24
	bl	BUS_READ_IVAR
	add	r2, sp, #8
	ldm	r2, {r2, r3, r5}
	add	r3, r3, r2, lsl #5
	add	r5, r5, r3, lsl #3
	add	r5, r6, r5, lsl #12
	ldr	r6, .L29+48
	mov	r0, r5
	bl	trunc_page
	ldr	r1, [r6]
	bl	pmap_mapdev
	subs	r9, r0, #0
	beq	.L27
	ldr	r3, .L29+52
	ldr	r2, [r7]
	ldr	r1, [r3]
	ldr	ip, [sp, #20]
	and	r1, r1, r5
	add	r1, r9, r1
	ldr	r2, [r1, r2]
	ldr	r3, [r8]
	cmp	ip, r2
	ldr	r3, [r1, r3]
	bne	.L8
	ldr	ip, [sp, #24]
	cmp	ip, r3
	bne	.L8
	ldr	r3, [r1, #376]
	cmn	r3, #1
	beq	.L28
	orr	r3, r3, #64
	str	r3, [r1, #376]
	ldr	r1, [r6]
	bl	pmap_unmapdev
	ldr	r3, .L29+56
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L1
	ldr	r3, [sp, #16]
	ldr	r0, [r4]
	ldr	r2, [sp, #8]
	str	r3, [sp]
	ldr	r1, .L29+60
	ldr	r3, [sp, #12]
	bl	device_printf
	b	.L1
.L8:
	ldr	r0, [r4]
	ldr	r1, .L29+64
	bl	device_printf
	mov	r0, r9
	ldr	r1, [r6]
	bl	pmap_unmapdev
	b	.L1
.L27:
	ldr	r0, [r4]
	ldr	r1, .L29+68
	bl	device_printf
	b	.L1
.L28:
	ldr	r0, [r4]
	ldr	r1, .L29+72
	bl	device_printf
	mov	r0, r9
	ldr	r1, [r6]
	bl	pmap_unmapdev
	b	.L1
.L25:
	bl	__stack_chk_fail
.L30:
	.align	2
.L29:
	.word	mxge_nvidia_ecrc_enable
	.word	.LC5
	.word	PCIR_VENDOR
	.word	PCIR_DEVICE
	.word	4318
	.word	873
	.word	.LC0
	.word	PCI_IVAR_BUS
	.word	PCI_IVAR_SLOT
	.word	PCI_IVAR_FUNCTION
	.word	PCI_IVAR_VENDOR
	.word	PCI_IVAR_DEVICE
	.word	PAGE_SIZE
	.word	PAGE_MASK
	.word	mxge_verbose
	.word	.LC4
	.word	.LC2
	.word	.LC1
	.word	.LC3
	.size	mxge_enable_nvidia_ecrc, .-mxge_enable_nvidia_ecrc
	.comm	mxge_verbose,4,4
	.comm	mxge_nvidia_ecrc_enable,4,4
	.comm	PCI_IVAR_VENDOR,4,4
	.comm	PCI_IVAR_SLOT,4,4
	.comm	PCI_IVAR_FUNCTION,4,4
	.comm	PCI_IVAR_DEVICE,4,4
	.comm	PCI_IVAR_BUS,4,4
	.comm	PCIR_VENDOR,4,4
	.comm	PCIR_DEVICE,4,4
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
