	.file	"extr_i915_drv.c_intel_alloc_mchbar_resource.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"i915 MCHBAR"
.LC1:
	.string	"failed bus alloc: %d\n"
	.text
	.p2align 4
	.type	intel_alloc_mchbar_resource, @function
intel_alloc_mchbar_resource:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	INTEL_GEN@PLT
	mov	rdi, rbx
	mov	ebp, DWORD PTR MCHBAR_I965[rip]
	mov	DWORD PTR 4[rsp], 0
	cmp	eax, 3
	cmovle	ebp, DWORD PTR MCHBAR_I915[rip]
	call	INTEL_GEN@PLT
	cmp	eax, 3
	jg	.L11
.L4:
	mov	rdi, QWORD PTR 24[rbx]
	mov	rdx, rsp
	mov	esi, ebp
	call	pci_read_config_dword@PLT
	lea	rax, .LC0[rip]
	xor	r9d, r9d
	mov	ecx, DWORD PTR pcibios_align_resource[rip]
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR IORESOURCE_MEM[rip]
	mov	rsi, rbx
	mov	rdx, QWORD PTR MCHBAR_SIZE[rip]
	mov	r8d, DWORD PTR PCIBIOS_MIN_MEM[rip]
	mov	DWORD PTR 16[rbx], eax
	mov	rax, QWORD PTR 24[rbx]
	push	rax
	.cfi_def_cfa_offset 56
	push	rcx
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR [rax]
	mov	rcx, rdx
	call	pci_bus_alloc_resource@PLT
	mov	r12d, eax
	pop	rax
	.cfi_def_cfa_offset 56
	pop	rdx
	.cfi_def_cfa_offset 48
	test	r12d, r12d
	jne	.L12
	mov	rdi, rbx
	call	INTEL_GEN@PLT
	cmp	eax, 3
	jg	.L13
.L7:
	mov	rdi, QWORD PTR 8[rbx]
	call	lower_32_bits@PLT
	mov	rdi, QWORD PTR 24[rbx]
	mov	esi, ebp
	mov	edx, eax
	call	pci_write_config_dword@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbx]
	call	upper_32_bits@PLT
	mov	rdi, QWORD PTR 24[rbx]
	lea	esi, 4[rbp]
	mov	edx, eax
	call	pci_write_config_dword@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	mov	esi, r12d
	lea	rdi, .LC1[rip]
	call	DRM_DEBUG_DRIVER@PLT
	mov	QWORD PTR 8[rbx], 0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, QWORD PTR 24[rbx]
	lea	rdx, 4[rsp]
	lea	esi, 4[rbp]
	call	pci_read_config_dword@PLT
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	intel_alloc_mchbar_resource, .-intel_alloc_mchbar_resource
	.comm	pcibios_align_resource,4,4
	.comm	PCIBIOS_MIN_MEM,4,4
	.comm	MCHBAR_SIZE,8,8
	.comm	MCHBAR_I965,4,4
	.comm	MCHBAR_I915,4,4
	.comm	IORESOURCE_MEM,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_i915_drv.c_intel_alloc_mchbar_resource.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"i915 MCHBAR\000"
	.align	2
.LC1:
	.ascii	"failed bus alloc: %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	intel_alloc_mchbar_resource, %function
intel_alloc_mchbar_resource:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L15
	sub	sp, sp, #36
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	r4, r0
	bl	INTEL_GEN
	cmp	r0, #3
	ldrgt	r3, .L15+4
	ldrle	r3, .L15+8
	mov	r0, r4
	ldr	r6, [r3]
	mov	r3, #0
	str	r3, [sp, #24]
	bl	INTEL_GEN
	cmp	r0, #3
	bgt	.L11
.L4:
	mov	r7, #0
	mov	r1, r6
	add	r2, sp, #20
	ldr	r0, [r4, #12]
	bl	pci_read_config_dword
	ldr	r1, .L15+12
	ldr	ip, .L15+16
	ldr	r1, [r1]
	ldr	r0, .L15+20
	ldr	r3, .L15+24
	ldr	r2, [r4, #12]
	ldr	r3, [r3]
	ldr	lr, [ip]
	str	r1, [r4, #8]
	ldr	ip, [r0]
	ldr	r1, .L15+28
	ldr	r0, [r2]
	str	r2, [sp, #12]
	str	lr, [sp, #8]
	str	ip, [sp]
	str	r7, [sp, #4]
	mov	r2, r3
	str	r1, [r4]
	mov	r1, r4
	bl	pci_bus_alloc_resource
	subs	r5, r0, #0
	bne	.L12
	mov	r0, r4
	bl	INTEL_GEN
	cmp	r0, #3
	bgt	.L13
.L7:
	ldr	r0, [r4, #4]
	ldr	r7, [r4, #12]
	bl	lower_32_bits
	mov	r1, r6
	mov	r2, r0
	mov	r0, r7
	bl	pci_write_config_dword
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r5
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L13:
	ldr	r0, [r4, #4]
	ldr	r7, [r4, #12]
	bl	upper_32_bits
	add	r1, r6, #4
	mov	r2, r0
	mov	r0, r7
	bl	pci_write_config_dword
	b	.L7
.L12:
	mov	r1, r5
	ldr	r0, .L15+32
	bl	DRM_DEBUG_DRIVER
	str	r7, [r4, #4]
	b	.L1
.L11:
	ldr	r0, [r4, #12]
	add	r2, sp, #24
	add	r1, r6, #4
	bl	pci_read_config_dword
	b	.L4
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC2
	.word	MCHBAR_I965
	.word	MCHBAR_I915
	.word	IORESOURCE_MEM
	.word	pcibios_align_resource
	.word	PCIBIOS_MIN_MEM
	.word	MCHBAR_SIZE
	.word	.LC0
	.word	.LC1
	.size	intel_alloc_mchbar_resource, .-intel_alloc_mchbar_resource
	.comm	pcibios_align_resource,4,4
	.comm	PCIBIOS_MIN_MEM,4,4
	.comm	MCHBAR_SIZE,4,4
	.comm	MCHBAR_I965,4,4
	.comm	MCHBAR_I915,4,4
	.comm	IORESOURCE_MEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
