	.file	"extr_pci_early_quirks.c_intel_graphics_stolen.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	intel_graphics_stolen, @function
intel_graphics_stolen:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	eax, eax
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	pci_cfgregopen@PLT
	test	rax, rax
	jne	.L13
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	ecx, DWORD PTR PCIR_VENDOR[rip]
	xor	edx, edx
	xor	edi, edi
	mov	r8d, 2
	mov	esi, 2
	call	pci_cfgregread@PLT
	cmp	QWORD PTR PCI_VENDOR_INTEL[rip], rax
	jne	.L1
	mov	ecx, DWORD PTR PCIR_SUBCLASS[rip]
	xor	edx, edx
	xor	edi, edi
	mov	r8d, 2
	mov	esi, 2
	call	pci_cfgregread@PLT
	cmp	QWORD PTR PCI_CLASS_VGA[rip], rax
	jne	.L1
	mov	ecx, DWORD PTR PCIR_DEVICE[rip]
	mov	r8d, 2
	xor	edx, edx
	xor	edi, edi
	mov	esi, 2
	call	pci_cfgregread@PLT
	mov	rbp, rax
	cmp	rax, 65535
	je	.L1
	mov	rdi, QWORD PTR intel_ids[rip]
	xor	ebx, ebx
.L5:
	call	nitems@PLT
	cmp	eax, ebx
	jle	.L1
	mov	rax, rbx
	mov	rdi, QWORD PTR intel_ids[rip]
	add	rbx, 1
	sal	rax, 4
	add	rax, rdi
	cmp	QWORD PTR [rax], rbp
	jne	.L5
	mov	rbx, QWORD PTR 8[rax]
	xor	edx, edx
	mov	esi, 2
	xor	edi, edi
	call	[QWORD PTR 8[rbx]]
	xor	edx, edx
	mov	esi, 2
	xor	edi, edi
	mov	DWORD PTR intel_graphics_stolen_base[rip], eax
	call	[QWORD PTR [rbx]]
	mov	DWORD PTR intel_graphics_stolen_size[rip], eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	intel_graphics_stolen, .-intel_graphics_stolen
	.comm	intel_ids,8,8
	.comm	intel_graphics_stolen_size,4,4
	.comm	intel_graphics_stolen_base,4,4
	.comm	PCI_VENDOR_INTEL,8,8
	.comm	PCI_CLASS_VGA,8,8
	.comm	PCIR_VENDOR,4,4
	.comm	PCIR_SUBCLASS,4,4
	.comm	PCIR_DEVICE,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_pci_early_quirks.c_intel_graphics_stolen.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	intel_graphics_stolen, %function
intel_graphics_stolen:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	sub	sp, sp, #8
	bl	pci_cfgregopen
	cmp	r0, #0
	bne	.L10
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L10:
	mov	r4, #2
	mov	r2, #0
	ldr	r3, .L11
	str	r4, [sp]
	ldr	r3, [r3]
	mov	r1, r4
	mov	r0, r2
	bl	pci_cfgregread
	ldr	r3, .L11+4
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L1
	mov	r2, #0
	ldr	r3, .L11+8
	str	r4, [sp]
	ldr	r3, [r3]
	mov	r0, r2
	mov	r1, r4
	bl	pci_cfgregread
	ldr	r3, .L11+12
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L1
	mov	r2, #0
	ldr	r3, .L11+16
	str	r4, [sp]
	ldr	r3, [r3]
	mov	r1, r4
	mov	r0, r2
	bl	pci_cfgregread
	ldr	r3, .L11+20
	mov	r5, r0
	cmp	r0, r3
	beq	.L1
	ldr	r6, .L11+24
	mov	r4, #0
	ldr	r0, [r6]
	bl	nitems
	cmp	r0, r4
	ble	.L1
.L7:
	ldr	r0, [r6]
	ldr	r3, [r0, r4, lsl #3]
	add	r1, r0, r4, lsl #3
	cmp	r3, r5
	beq	.L6
	bl	nitems
	add	r4, r4, #1
	cmp	r0, r4
	bgt	.L7
	b	.L1
.L6:
	mov	r2, #0
	ldr	r4, [r1, #4]
	mov	r0, r2
	mov	r1, #2
	ldr	r3, [r4, #4]
	blx	r3
	mov	r2, #0
	ldr	r1, .L11+28
	ldr	r3, [r4]
	str	r0, [r1]
	mov	r0, r2
	mov	r1, #2
	blx	r3
	ldr	r3, .L11+32
	str	r0, [r3]
	b	.L1
.L12:
	.align	2
.L11:
	.word	PCIR_VENDOR
	.word	PCI_VENDOR_INTEL
	.word	PCIR_SUBCLASS
	.word	PCI_CLASS_VGA
	.word	PCIR_DEVICE
	.word	65535
	.word	intel_ids
	.word	intel_graphics_stolen_base
	.word	intel_graphics_stolen_size
	.size	intel_graphics_stolen, .-intel_graphics_stolen
	.comm	intel_ids,4,4
	.comm	intel_graphics_stolen_size,4,4
	.comm	intel_graphics_stolen_base,4,4
	.comm	PCI_VENDOR_INTEL,4,4
	.comm	PCI_CLASS_VGA,4,4
	.comm	PCIR_VENDOR,4,4
	.comm	PCIR_SUBCLASS,4,4
	.comm	PCIR_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
