	.file	"extr_pci-rt3883.c_rt3883_pci_config_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rt3883_pci_config_read, @function
rt3883_pci_config_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r8
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	pci_bus_to_rt3883_controller@PLT
	mov	rbp, rax
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L2
	cmp	DWORD PTR 0[r13], 1
	mov	eax, DWORD PTR PCIBIOS_DEVICE_NOT_FOUND[rip]
	je	.L1
.L2:
	mov	edi, r15d
	call	PCI_FUNC@PLT
	mov	edi, r15d
	mov	DWORD PTR 12[rsp], eax
	call	PCI_SLOT@PLT
	mov	edx, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR 0[r13]
	mov	ecx, ebx
	mov	esi, eax
	call	rt3883_pci_get_cfgaddr@PLT
	mov	edx, DWORD PTR RT3883_PCI_REG_CFGADDR[rip]
	mov	rdi, rbp
	mov	esi, eax
	call	rt3883_pci_w32@PLT
	mov	esi, DWORD PTR RT3883_PCI_REG_CFGDATA[rip]
	mov	rdi, rbp
	call	rt3883_pci_r32@PLT
	cmp	r12d, 2
	je	.L4
	cmp	r12d, 4
	je	.L5
	cmp	r12d, 1
	je	.L9
.L6:
	mov	eax, DWORD PTR PCIBIOS_SUCCESSFUL[rip]
.L1:
	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
	lea	ecx, 0[0+rbx*8]
	and	ecx, 24
	sar	eax, cl
	and	eax, 65535
	mov	DWORD PTR [r14], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	lea	ecx, 0[0+rbx*8]
	and	ecx, 24
	sar	eax, cl
	and	eax, 255
	mov	DWORD PTR [r14], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	DWORD PTR [r14], eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	rt3883_pci_config_read, .-rt3883_pci_config_read
	.comm	RT3883_PCI_REG_CFGDATA,4,4
	.comm	RT3883_PCI_REG_CFGADDR,4,4
	.comm	PCIBIOS_SUCCESSFUL,4,4
	.comm	PCIBIOS_DEVICE_NOT_FOUND,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-rt3883.c_rt3883_pci_config_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rt3883_pci_config_read, %function
rt3883_pci_config_read:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r3
	mov	r8, r0
	mov	r7, r1
	mov	r4, r2
	bl	pci_bus_to_rt3883_controller
	ldr	r3, [r0]
	mov	r5, r0
	cmp	r3, #0
	ldr	r8, [r8]
	bne	.L3
	cmp	r8, #1
	beq	.L10
.L3:
	mov	r0, r7
	bl	PCI_SLOT
	mov	r1, r0
	mov	r0, r7
	mov	r7, r1
	bl	PCI_FUNC
	mov	r3, r4
	mov	r2, r0
	mov	r1, r7
	mov	r0, r8
	bl	rt3883_pci_get_cfgaddr
	ldr	r3, .L12
	mov	r1, r0
	ldr	r2, [r3]
	mov	r0, r5
	bl	rt3883_pci_w32
	ldr	r3, .L12+4
	mov	r0, r5
	ldr	r1, [r3]
	bl	rt3883_pci_r32
	cmp	r6, #2
	beq	.L5
	cmp	r6, #4
	beq	.L6
	cmp	r6, #1
	beq	.L11
.L7:
	ldr	r3, .L12+8
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	ldr	r3, .L12+12
	lsl	r4, r4, #3
	and	r4, r4, #24
	and	r0, r3, r0, asr r4
	ldr	r3, [sp, #24]
	str	r0, [r3]
	b	.L7
.L11:
	lsl	r4, r4, #3
	and	r4, r4, #24
	ldr	r3, [sp, #24]
	asr	r0, r0, r4
	and	r0, r0, #255
	str	r0, [r3]
	b	.L7
.L6:
	ldr	r3, [sp, #24]
	str	r0, [r3]
	b	.L7
.L10:
	ldr	r3, .L12+16
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	RT3883_PCI_REG_CFGADDR
	.word	RT3883_PCI_REG_CFGDATA
	.word	PCIBIOS_SUCCESSFUL
	.word	65535
	.word	PCIBIOS_DEVICE_NOT_FOUND
	.size	rt3883_pci_config_read, .-rt3883_pci_config_read
	.comm	RT3883_PCI_REG_CFGDATA,4,4
	.comm	RT3883_PCI_REG_CFGADDR,4,4
	.comm	PCIBIOS_SUCCESSFUL,4,4
	.comm	PCIBIOS_DEVICE_NOT_FOUND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
