	.file	"extr_pcie-rcar.c_rcar_pcie_enable_msi.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"failed to create IRQ domain\n"
.LC1:
	.string	"failed to request IRQ: %d\n"
	.text
	.p2align 4
	.type	rcar_pcie_enable_msi, @function
rcar_pcie_enable_msi:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	add	rdi, 48
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r13, QWORD PTR 8[rdi]
	call	mutex_init@PLT
	mov	eax, DWORD PTR rcar_msi_setup_irq[rip]
	lea	rcx, 24[rbp]
	mov	esi, DWORD PTR INT_PCI_MSI_NR[rip]
	mov	QWORD PTR 40[rbp], r13
	mov	edi, DWORD PTR 0[r13]
	lea	rdx, msi_domain_ops[rip]
	mov	DWORD PTR 32[rbp], eax
	mov	eax, DWORD PTR rcar_msi_setup_irqs[rip]
	mov	DWORD PTR 28[rbp], eax
	mov	eax, DWORD PTR rcar_msi_teardown_irq[rip]
	mov	DWORD PTR 24[rbp], eax
	call	irq_domain_add_linear@PLT
	mov	DWORD PTR 16[rbp], eax
	test	eax, eax
	je	.L2
	mov	edi, eax
	mov	eax, DWORD PTR INT_PCI_MSI_NR[rip]
	xor	ebx, ebx
	test	eax, eax
	jg	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR 16[rbp]
.L3:
	mov	esi, ebx
	add	ebx, 1
	call	irq_create_mapping@PLT
	cmp	DWORD PTR INT_PCI_MSI_NR[rip], ebx
	jg	.L15
.L4:
	mov	esi, DWORD PTR 12[rbp]
	mov	r8d, DWORD PTR rcar_msi_irq_chip[rip]
	mov	r9, rbp
	mov	rdi, r13
	mov	edx, DWORD PTR rcar_pcie_msi_irq[rip]
	mov	ecx, DWORD PTR IRQF_SHARED[rip]
	or	ecx, DWORD PTR IRQF_NO_THREAD[rip]
	call	devm_request_irq@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L13
	mov	esi, DWORD PTR 8[rbp]
	mov	r8d, DWORD PTR rcar_msi_irq_chip[rip]
	mov	r9, rbp
	mov	rdi, r13
	mov	edx, DWORD PTR rcar_pcie_msi_irq[rip]
	mov	ecx, DWORD PTR IRQF_SHARED[rip]
	or	ecx, DWORD PTR IRQF_NO_THREAD[rip]
	call	devm_request_irq@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L13
	mov	edi, DWORD PTR GFP_KERNEL[rip]
	xor	esi, esi
	call	__get_free_pages@PLT
	mov	QWORD PTR 0[rbp], rax
	mov	rdi, rax
	test	rax, rax
	jne	.L9
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
.L7:
	mov	rdi, rbp
	call	rcar_pcie_unmap_msi@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	edx, r12d
	lea	rsi, .LC1[rip]
	mov	rdi, r13
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	call	virt_to_phys@PLT
	mov	r13d, DWORD PTR PCIEMSIALR[rip]
	mov	edi, eax
	mov	r12d, eax
	call	lower_32_bits@PLT
	or	eax, DWORD PTR MSIFE[rip]
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, eax
	call	rcar_pci_write_reg@PLT
	mov	r13d, DWORD PTR PCIEMSIAUR[rip]
	mov	edi, r12d
	xor	r12d, r12d
	call	upper_32_bits@PLT
	mov	rdi, rbp
	mov	edx, r13d
	mov	esi, eax
	call	rcar_pci_write_reg@PLT
	mov	edx, DWORD PTR PCIEMSIIER[rip]
	mov	rdi, rbp
	mov	esi, -1
	call	rcar_pci_write_reg@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, r13
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	rcar_pcie_enable_msi, .-rcar_pcie_enable_msi
	.comm	rcar_pcie_msi_irq,4,4
	.comm	rcar_msi_teardown_irq,4,4
	.comm	rcar_msi_setup_irqs,4,4
	.comm	rcar_msi_setup_irq,4,4
	.comm	rcar_msi_irq_chip,4,4
	.comm	msi_domain_ops,4,4
	.comm	PCIEMSIIER,4,4
	.comm	PCIEMSIAUR,4,4
	.comm	PCIEMSIALR,4,4
	.comm	MSIFE,4,4
	.comm	IRQF_SHARED,4,4
	.comm	IRQF_NO_THREAD,4,4
	.comm	INT_PCI_MSI_NR,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_pcie-rcar.c_rcar_pcie_enable_msi.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to create IRQ domain\012\000"
	.align	2
.LC1:
	.ascii	"failed to request IRQ: %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rcar_pcie_enable_msi, %function
rcar_pcie_enable_msi:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	sub	sp, sp, #8
	add	r0, r0, #32
	ldr	r7, [r5, #36]
	bl	mutex_init
	mov	r3, r5
	ldr	r0, .L15
	ldr	r1, .L15+4
	ldr	r2, .L15+8
	ldr	r0, [r0]
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	r6, .L15+12
	str	r0, [r5, #24]
	str	r1, [r5, #20]
	str	r7, [r5, #28]
	ldr	r0, [r7]
	str	r2, [r3, #16]!
	ldr	r1, [r6]
	ldr	r2, .L15+16
	bl	irq_domain_add_linear
	cmp	r0, #0
	str	r0, [r5, #12]
	beq	.L2
	ldr	r3, [r6]
	cmp	r3, #0
	movgt	r4, #0
	bgt	.L3
	b	.L4
.L14:
	ldr	r0, [r5, #12]
.L3:
	mov	r1, r4
	bl	irq_create_mapping
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L14
.L4:
	ldr	r8, .L15+20
	ldr	r10, .L15+24
	ldr	r9, .L15+28
	ldr	r2, [r8]
	ldr	r1, [r10]
	ldr	r3, [r9]
	ldr	r6, .L15+32
	str	r5, [sp, #4]
	str	r2, [sp]
	orr	r3, r1, r3
	mov	r0, r7
	ldr	r2, [r6]
	ldr	r1, [r5, #8]
	bl	devm_request_irq
	subs	r4, r0, #0
	blt	.L12
	ldr	r2, [r8]
	ldr	r1, [r10]
	stm	sp, {r2, r5}
	ldr	r3, [r9]
	mov	r0, r7
	orr	r3, r1, r3
	ldr	r2, [r6]
	ldr	r1, [r5, #4]
	bl	devm_request_irq
	subs	r4, r0, #0
	blt	.L12
	ldr	r3, .L15+36
	mov	r1, #0
	ldr	r0, [r3]
	bl	__get_free_pages
	cmp	r0, #0
	str	r0, [r5]
	bne	.L9
	ldr	r3, .L15+40
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L7:
	mov	r0, r5
	bl	rcar_pcie_unmap_msi
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	mov	r0, r7
	mov	r2, r4
	ldr	r1, .L15+44
	bl	dev_err
	b	.L7
.L9:
	bl	virt_to_phys
	mov	r4, r0
	bl	lower_32_bits
	ldr	r3, .L15+48
	ldr	r2, .L15+52
	ldr	r1, [r3]
	ldr	r2, [r2]
	orr	r1, r0, r1
	mov	r0, r5
	bl	rcar_pci_write_reg
	mov	r0, r4
	bl	upper_32_bits
	mov	r4, #0
	ldr	r3, .L15+56
	mov	r1, r0
	ldr	r2, [r3]
	mov	r0, r5
	bl	rcar_pci_write_reg
	ldr	r3, .L15+60
	mov	r0, r5
	mvn	r1, #0
	ldr	r2, [r3]
	bl	rcar_pci_write_reg
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	mov	r0, r7
	ldr	r1, .L15+64
	bl	dev_err
	ldr	r3, .L15+40
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	.align	2
.L15:
	.word	rcar_msi_setup_irq
	.word	rcar_msi_setup_irqs
	.word	rcar_msi_teardown_irq
	.word	INT_PCI_MSI_NR
	.word	msi_domain_ops
	.word	rcar_msi_irq_chip
	.word	IRQF_SHARED
	.word	IRQF_NO_THREAD
	.word	rcar_pcie_msi_irq
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	.LC1
	.word	MSIFE
	.word	PCIEMSIALR
	.word	PCIEMSIAUR
	.word	PCIEMSIIER
	.word	.LC0
	.size	rcar_pcie_enable_msi, .-rcar_pcie_enable_msi
	.comm	rcar_pcie_msi_irq,4,4
	.comm	rcar_msi_teardown_irq,4,4
	.comm	rcar_msi_setup_irqs,4,4
	.comm	rcar_msi_setup_irq,4,4
	.comm	rcar_msi_irq_chip,4,4
	.comm	msi_domain_ops,4,4
	.comm	PCIEMSIIER,4,4
	.comm	PCIEMSIAUR,4,4
	.comm	PCIEMSIALR,4,4
	.comm	MSIFE,4,4
	.comm	IRQF_SHARED,4,4
	.comm	IRQF_NO_THREAD,4,4
	.comm	INT_PCI_MSI_NR,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
