	.file	"extr_msi.c_msi_quota_for_device.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"rtas_msi: calc quota for %s, request %d\n"
	.align 8
.LC1:
	.string	"rtas_msi: couldn't find PE for %s\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"rtas_msi: found PE %pOF\n"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"rtas_msi: found 0 devices under PE for %s\n"
	.align 8
.LC4:
	.string	"rtas_msi: request clamped to quota %d\n"
	.text
	.p2align 4
	.type	msi_quota_for_device, @function
msi_quota_for_device:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	sub	rsp, 56
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	lea	r14, 12[rsp]
	call	pci_name@PLT
	mov	edx, r12d
	lea	rdi, .LC0[rip]
	mov	esi, eax
	xor	eax, eax
	call	pr_debug@PLT
	mov	rsi, r14
	mov	rdi, r13
	call	find_pe_total_msi@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L11
.L2:
	mov	esi, ebp
	lea	rdi, .LC2[rip]
	lea	r14, 16[rsp]
	xor	eax, eax
	call	pr_debug@PLT
	mov	edx, 24
	xor	esi, esi
	mov	rdi, r14
	call	memset@PLT
	mov	esi, DWORD PTR count_non_bridge_devices[rip]
	mov	rdx, r14
	mov	rdi, rbp
	call	pci_traverse_device_nodes@PLT
	mov	ecx, DWORD PTR 16[rsp]
	test	ecx, ecx
	je	.L12
	mov	eax, DWORD PTR 12[rsp]
	cdq
	idiv	ecx
	mov	DWORD PTR 20[rsp], eax
	cmp	eax, r12d
	jl	.L13
.L3:
	mov	rdi, rbp
	call	of_node_put@PLT
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rdi, r13
	call	pci_device_to_OF_node@PLT
	mov	rdx, r14
	mov	rdi, rbp
	mov	DWORD PTR 24[rsp], r12d
	mov	esi, DWORD PTR count_spare_msis[rip]
	mov	DWORD PTR 36[rsp], eax
	call	pci_traverse_device_nodes@PLT
	mov	eax, DWORD PTR 12[rsp]
	mov	ecx, DWORD PTR 32[rsp]
	cdq
	idiv	DWORD PTR 16[rsp]
	mov	eax, DWORD PTR 28[rsp]
	add	eax, edx
	mov	DWORD PTR 28[rsp], eax
	test	ecx, ecx
	jne	.L5
	mov	edi, DWORD PTR 20[rsp]
.L6:
	mov	esi, r12d
	call	min@PLT
	lea	rdi, .LC4[rip]
	mov	r12d, eax
	mov	esi, eax
	xor	eax, eax
	call	pr_debug@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	cdq
	idiv	ecx
	add	eax, DWORD PTR 20[rsp]
	mov	DWORD PTR 20[rsp], eax
	mov	edi, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rsi, r14
	mov	rdi, r13
	call	find_pe_dn@PLT
	mov	rbp, rax
	test	rax, rax
	jne	.L2
	mov	rdi, r13
	call	pci_name@PLT
	lea	rdi, .LC1[rip]
	mov	esi, eax
	call	pr_err@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, r13
	call	pci_name@PLT
	lea	rdi, .LC3[rip]
	mov	esi, eax
	call	pr_err@PLT
	jmp	.L3
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	msi_quota_for_device, .-msi_quota_for_device
	.comm	count_spare_msis,4,4
	.comm	count_non_bridge_devices,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_msi.c_msi_quota_for_device.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"rtas_msi: calc quota for %s, request %d\012\000"
	.align	2
.LC1:
	.ascii	"rtas_msi: couldn't find PE for %s\012\000"
	.align	2
.LC2:
	.ascii	"rtas_msi: found PE %pOF\012\000"
	.align	2
.LC3:
	.ascii	"rtas_msi: found 0 devices under PE for %s\012\000"
	.global	__aeabi_idiv
	.global	__aeabi_idivmod
	.align	2
.LC4:
	.ascii	"rtas_msi: request clamped to quota %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msi_quota_for_device, %function
msi_quota_for_device:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L14
	sub	sp, sp, #32
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	r6, r0
	bl	pci_name
	mov	r2, r5
	mov	r1, r0
	ldr	r0, .L14+4
	bl	pr_debug
	mov	r0, r6
	mov	r1, sp
	bl	find_pe_total_msi
	subs	r4, r0, #0
	beq	.L10
.L2:
	mov	r1, r4
	ldr	r0, .L14+8
	bl	pr_debug
	mov	r3, #0
	ldr	r1, .L14+12
	mov	r0, r4
	ldr	r1, [r1]
	add	r2, sp, #4
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	str	r3, [sp, #12]
	str	r3, [sp, #16]
	str	r3, [sp, #20]
	str	r3, [sp, #24]
	bl	pci_traverse_device_nodes
	ldr	r1, [sp, #4]
	cmp	r1, #0
	beq	.L11
	ldr	r0, [sp]
	bl	__aeabi_idiv
	cmp	r0, r5
	str	r0, [sp, #8]
	blt	.L12
.L3:
	mov	r0, r4
	bl	of_node_put
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r5
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, pc}
.L12:
	mov	r0, r6
	bl	pci_device_to_OF_node
	mov	r3, r0
	ldr	r1, .L14+16
	add	r2, sp, #4
	ldr	r1, [r1]
	mov	r0, r4
	str	r3, [sp, #24]
	str	r5, [sp, #12]
	bl	pci_traverse_device_nodes
	ldm	sp, {r0, r1}
	bl	__aeabi_idivmod
	ldr	r0, [sp, #16]
	ldr	r3, [sp, #20]
	add	r0, r1, r0
	cmp	r3, #0
	str	r0, [sp, #16]
	bne	.L5
	ldr	r0, [sp, #8]
.L6:
	mov	r1, r5
	bl	min
	mov	r5, r0
	ldr	r0, .L14+20
	mov	r1, r5
	bl	pr_debug
	b	.L3
.L5:
	mov	r1, r3
	bl	__aeabi_idiv
	ldr	r3, [sp, #8]
	add	r0, r0, r3
	str	r0, [sp, #8]
	b	.L6
.L10:
	mov	r1, sp
	mov	r0, r6
	bl	find_pe_dn
	subs	r4, r0, #0
	bne	.L2
	mov	r0, r6
	bl	pci_name
	mov	r1, r0
	ldr	r0, .L14+24
	bl	pr_err
	b	.L3
.L11:
	mov	r0, r6
	bl	pci_name
	mov	r1, r0
	ldr	r0, .L14+28
	bl	pr_err
	b	.L3
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC5
	.word	.LC0
	.word	.LC2
	.word	count_non_bridge_devices
	.word	count_spare_msis
	.word	.LC4
	.word	.LC1
	.word	.LC3
	.size	msi_quota_for_device, .-msi_quota_for_device
	.comm	count_spare_msis,4,4
	.comm	count_non_bridge_devices,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
