	.file	"extr_ops-sh4.c_sh4_pci_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sh4_pci_read, @function
sh4_pci_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	mov	rsi, r15
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, ecx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13, QWORD PTR [rdi]
	lea	rdi, pci_config_lock[rip]
	mov	QWORD PTR 8[rsp], r8
	call	raw_spin_lock_irqsave@PLT
	mov	rdi, r12
	mov	edx, ebx
	mov	esi, r14d
	mov	r9d, DWORD PTR SH4_PCIPAR[rip]
	mov	DWORD PTR 4[rsp], r9d
	call	CONFIG_CMD@PLT
	mov	r9d, DWORD PTR 4[rsp]
	mov	rdi, r13
	mov	esi, eax
	mov	edx, r9d
	call	pci_write_reg@PLT
	mov	esi, DWORD PTR SH4_PCIPDR[rip]
	mov	rdi, r13
	call	pci_read_reg@PLT
	mov	rsi, r15
	lea	rdi, pci_config_lock[rip]
	mov	r12d, eax
	call	raw_spin_unlock_irqrestore@PLT
	cmp	ebp, 2
	je	.L2
	cmp	ebp, 4
	je	.L3
	mov	eax, DWORD PTR PCIBIOS_FUNC_NOT_SUPPORTED[rip]
	cmp	ebp, 1
	je	.L9
	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
.L2:
	.cfi_restore_state
	lea	ecx, 0[0+rbx*8]
	mov	rax, QWORD PTR 8[rsp]
	and	ecx, 16
	sar	r12d, cl
	and	r12d, 65535
	mov	DWORD PTR [rax], r12d
.L5:
	mov	eax, DWORD PTR PCIBIOS_SUCCESSFUL[rip]
	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
.L9:
	.cfi_restore_state
	lea	ecx, 0[0+rbx*8]
	mov	rax, QWORD PTR 8[rsp]
	and	ecx, 24
	sar	r12d, cl
	and	r12d, 255
	mov	DWORD PTR [rax], r12d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 8[rsp]
	mov	DWORD PTR [rax], r12d
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	sh4_pci_read, .-sh4_pci_read
	.comm	pci_config_lock,4,4
	.comm	SH4_PCIPDR,4,4
	.comm	SH4_PCIPAR,4,4
	.comm	PCIBIOS_SUCCESSFUL,4,4
	.comm	PCIBIOS_FUNC_NOT_SUPPORTED,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_ops-sh4.c_sh4_pci_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sh4_pci_read, %function
sh4_pci_read:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, #0
	mov	r6, r0
	mov	r7, r1
	mov	r4, r2
	mov	r1, r8
	ldr	r0, .L10
	mov	r5, r3
	ldr	r9, [r6]
	bl	raw_spin_lock_irqsave
	mov	r2, r4
	mov	r1, r7
	mov	r0, r6
	bl	CONFIG_CMD
	ldr	r3, .L10+4
	mov	r1, r0
	ldr	r2, [r3]
	mov	r0, r9
	bl	pci_write_reg
	ldr	r3, .L10+8
	mov	r0, r9
	ldr	r1, [r3]
	bl	pci_read_reg
	mov	r1, r8
	mov	r6, r0
	ldr	r0, .L10
	bl	raw_spin_unlock_irqrestore
	cmp	r5, #2
	beq	.L2
	cmp	r5, #4
	beq	.L3
	cmp	r5, #1
	beq	.L9
	ldr	r3, .L10+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r3, .L10+16
	lsl	r4, r4, #3
	ldr	r2, [sp, #32]
	and	r4, r4, #16
	and	r3, r3, r6, asr r4
	str	r3, [r2]
.L5:
	ldr	r3, .L10+20
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	lsl	r3, r4, #3
	and	r3, r3, #24
	ldr	r2, [sp, #32]
	asr	r3, r6, r3
	and	r3, r3, #255
	str	r3, [r2]
	b	.L5
.L3:
	ldr	r3, [sp, #32]
	str	r6, [r3]
	b	.L5
.L11:
	.align	2
.L10:
	.word	pci_config_lock
	.word	SH4_PCIPAR
	.word	SH4_PCIPDR
	.word	PCIBIOS_FUNC_NOT_SUPPORTED
	.word	65535
	.word	PCIBIOS_SUCCESSFUL
	.size	sh4_pci_read, .-sh4_pci_read
	.comm	pci_config_lock,4,4
	.comm	SH4_PCIPDR,4,4
	.comm	SH4_PCIPAR,4,4
	.comm	PCIBIOS_SUCCESSFUL,4,4
	.comm	PCIBIOS_FUNC_NOT_SUPPORTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
