	.file	"extr_ramnv1a.c_nv1a_ram_new.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"no bridge device\n"
	.text
	.p2align 4
	.globl	nv1a_ram_new
	.type	nv1a_ram_new, @function
nv1a_ram_new:
.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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	mov	edi, DWORD PTR 4[rax]
	call	dev_is_pci@PLT
	test	rax, rax
	jne	.L2
.L4:
	xor	r12d, r12d
.L3:
	mov	esi, 1
	xor	edi, edi
	call	PCI_DEVFN@PLT
	mov	edi, r12d
	xor	esi, esi
	mov	edx, eax
	call	pci_get_domain_bus_and_slot@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L15
	mov	rax, QWORD PTR 0[rbp]
	lea	rdx, 4[rsp]
	cmp	DWORD PTR [rax], 26
	je	.L16
	mov	esi, 132
	call	pci_read_config_dword@PLT
	mov	ecx, DWORD PTR 4[rsp]
	sar	ecx, 4
	and	ecx, 127
	add	ecx, 1
.L8:
	mov	edx, DWORD PTR NVKM_RAM_TYPE_STOLEN[rip]
	sal	ecx, 20
	mov	r8, rbx
	mov	rsi, rbp
	lea	rdi, nv04_ram_func[rip]
	call	nvkm_ram_new_@PLT
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L17
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	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
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR 4[rax]
	call	to_pci_dev@PLT
	test	rax, rax
	je	.L4
	mov	edi, DWORD PTR [rax]
	call	pci_domain_nr@PLT
	mov	r12d, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	mov	esi, 124
	call	pci_read_config_dword@PLT
	mov	ecx, DWORD PTR 4[rsp]
	sar	ecx, 6
	and	ecx, 31
	add	ecx, 1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	nvkm_error@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nv1a_ram_new, .-nv1a_ram_new
	.comm	nv04_ram_func,4,4
	.comm	NVKM_RAM_TYPE_STOLEN,4,4
	.comm	ENODEV,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_ramnv1a.c_nv1a_ram_new.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"no bridge device\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	nv1a_ram_new
	.syntax unified
	.arm
	.fpu softvfp
	.type	nv1a_ram_new, %function
nv1a_ram_new:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, [r0]
	mov	r4, r0
	ldr	r0, [r3, #4]
	ldr	r3, .L18
	sub	sp, sp, #16
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	dev_is_pci
	cmp	r0, #0
	bne	.L2
.L4:
	mov	r6, #0
.L3:
	mov	r1, #1
	mov	r0, #0
	bl	PCI_DEVFN
	mov	r1, #0
	mov	r2, r0
	mov	r0, r6
	bl	pci_get_domain_bus_and_slot
	cmp	r0, #0
	beq	.L15
	ldr	r3, [r4]
	add	r2, sp, #8
	ldr	r3, [r3]
	cmp	r3, #26
	beq	.L16
	mov	r1, #132
	bl	pci_read_config_dword
	ldr	r3, [sp, #8]
	asr	r3, r3, #4
	and	r3, r3, #127
	add	r3, r3, #1
.L8:
	ldr	r2, .L18+4
	str	r5, [sp]
	mov	r1, r4
	ldr	r2, [r2]
	ldr	r0, .L18+8
	lsl	r3, r3, #20
	bl	nvkm_ram_new_
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r3, [r4]
	ldr	r0, [r3, #4]
	bl	to_pci_dev
	cmp	r0, #0
	beq	.L4
	ldr	r0, [r0]
	bl	pci_domain_nr
	mov	r6, r0
	b	.L3
.L16:
	mov	r1, #124
	bl	pci_read_config_dword
	ldr	r3, [sp, #8]
	asr	r3, r3, #6
	and	r3, r3, #31
	add	r3, r3, #1
	b	.L8
.L15:
	mov	r0, r4
	ldr	r1, .L18+12
	bl	nvkm_error
	ldr	r3, .L18+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC1
	.word	NVKM_RAM_TYPE_STOLEN
	.word	nv04_ram_func
	.word	.LC0
	.word	ENODEV
	.size	nv1a_ram_new, .-nv1a_ram_new
	.comm	nv04_ram_func,4,4
	.comm	NVKM_RAM_TYPE_STOLEN,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
