	.file	"extr_rtas_pci.c_rtas_read_config.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	rtas_read_config
	.type	rtas_read_config, @function
rtas_read_config:
.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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 4[rsp], -1
	test	rdi, rdi
	je	.L14
	mov	rbx, rdi
	mov	r12d, esi
	mov	r13d, edx
	mov	rbp, rcx
	call	config_access_valid@PLT
	test	eax, eax
	jne	.L4
	mov	eax, DWORD PTR PCIBIOS_BAD_REGISTER_NUMBER[rip]
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L16
	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
.L4:
	.cfi_restore_state
	mov	esi, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR 20[rbx]
	mov	edx, r12d
	call	rtas_config_addr@PLT
	mov	r12, rax
	mov	rax, QWORD PTR 8[rbx]
	mov	r14, QWORD PTR [rax]
	test	r14, r14
	jne	.L17
	mov	edi, DWORD PTR read_pci_config[rip]
	lea	rcx, 4[rsp]
	mov	r9d, r13d
	xor	eax, eax
	mov	r8, r12
	mov	edx, 2
	mov	esi, 2
	call	rtas_call@PLT
.L6:
	mov	edx, DWORD PTR 4[rsp]
	mov	DWORD PTR 0[rbp], edx
	test	eax, eax
	jne	.L14
	mov	edi, r13d
	call	EEH_IO_ERROR_VALUE@PLT
	cmp	eax, DWORD PTR 4[rsp]
	je	.L18
.L8:
	mov	eax, DWORD PTR PCIBIOS_SUCCESSFUL[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edi, DWORD PTR [rbx]
	xor	esi, esi
	call	eeh_dn_check_failure@PLT
	test	rax, rax
	je	.L8
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR PCIBIOS_DEVICE_NOT_FOUND[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, r14
	call	BUID_LO@PLT
	mov	rdi, r14
	mov	r15d, eax
	call	BUID_HI@PLT
	lea	rcx, 4[rsp]
	push	r13
	.cfi_def_cfa_offset 88
	mov	edi, DWORD PTR ibm_read_pci_config[rip]
	push	r15
	.cfi_def_cfa_offset 96
	mov	r9d, eax
	mov	edx, 2
	mov	r8, r12
	mov	esi, 4
	xor	eax, eax
	call	rtas_call@PLT
	pop	rdx
	.cfi_def_cfa_offset 88
	pop	rcx
	.cfi_def_cfa_offset 80
	jmp	.L6
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rtas_read_config, .-rtas_read_config
	.comm	read_pci_config,4,4
	.comm	ibm_read_pci_config,4,4
	.comm	PCIBIOS_SUCCESSFUL,4,4
	.comm	PCIBIOS_DEVICE_NOT_FOUND,4,4
	.comm	PCIBIOS_BAD_REGISTER_NUMBER,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_rtas_pci.c_rtas_read_config.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	rtas_read_config
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtas_read_config, %function
rtas_read_config:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mvn	ip, #0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r6, r3
	ldr	r3, .L19
	sub	sp, sp, #28
	subs	r5, r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	str	ip, [sp, #16]
	beq	.L14
	mov	r7, r2
	mov	r4, r1
	bl	config_access_valid
	cmp	r0, #0
	bne	.L4
	ldr	r3, .L19+4
	ldr	r0, [r3]
.L1:
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L4:
	mov	r2, r4
	ldr	r1, [r5, #8]
	ldr	r0, [r5, #12]
	bl	rtas_config_addr
	ldr	r3, [r5, #4]
	mov	r8, r0
	ldr	r4, [r3]
	cmp	r4, #0
	bne	.L17
	mov	r2, #2
	ldr	r3, .L19+8
	str	r7, [sp, #4]
	str	r0, [sp]
	ldr	r0, [r3]
	mov	r1, r2
	add	r3, sp, #16
	bl	rtas_call
	mov	r4, r0
.L6:
	ldr	r3, [sp, #16]
	cmp	r4, #0
	str	r3, [r6]
	bne	.L14
	mov	r0, r7
	bl	EEH_IO_ERROR_VALUE
	ldr	r3, [sp, #16]
	cmp	r0, r3
	beq	.L18
.L8:
	ldr	r3, .L19+12
	ldr	r0, [r3]
	b	.L1
.L18:
	mov	r1, r4
	ldr	r0, [r5]
	bl	eeh_dn_check_failure
	cmp	r0, #0
	beq	.L8
.L14:
	ldr	r3, .L19+16
	ldr	r0, [r3]
	b	.L1
.L17:
	ldr	r3, .L19+20
	mov	r0, r4
	ldr	r9, [r3]
	bl	BUID_HI
	mov	r3, r0
	mov	r0, r4
	mov	r4, r3
	bl	BUID_LO
	mov	r3, r0
	str	r4, [sp, #4]
	str	r3, [sp, #8]
	mov	r0, r9
	mov	r2, #2
	mov	r1, #4
	str	r7, [sp, #12]
	str	r8, [sp]
	add	r3, sp, #16
	bl	rtas_call
	mov	r4, r0
	b	.L6
.L16:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	.LC0
	.word	PCIBIOS_BAD_REGISTER_NUMBER
	.word	read_pci_config
	.word	PCIBIOS_SUCCESSFUL
	.word	PCIBIOS_DEVICE_NOT_FOUND
	.word	ibm_read_pci_config
	.size	rtas_read_config, .-rtas_read_config
	.comm	read_pci_config,4,4
	.comm	ibm_read_pci_config,4,4
	.comm	PCIBIOS_SUCCESSFUL,4,4
	.comm	PCIBIOS_DEVICE_NOT_FOUND,4,4
	.comm	PCIBIOS_BAD_REGISTER_NUMBER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
