	.file	"extr_portdrv_core.c_init_service_irqs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	init_service_irqs, @function
init_service_irqs:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	test	DWORD PTR PCIE_PORT_SERVICE_HP[rip], edx
	je	.L2
	xor	eax, eax
	call	pciehp_no_msi@PLT
	test	rax, rax
	jne	.L28
.L2:
	mov	edx, r12d
	mov	rsi, rbx
	mov	rdi, rbp
	call	pcie_port_enable_msix@PLT
	test	eax, eax
	jne	.L7
.L13:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rdi, rbp
	call	pci_enable_msi@PLT
	mov	rdx, QWORD PTR PCIE_PORT_SERVICE_VC_SHIFT[rip]
	test	eax, eax
	mov	eax, DWORD PTR PCIE_PORT_DEVICE_MAXSERVICES[rip]
	lea	rcx, [rbx+rdx*4]
	je	.L10
	cmp	QWORD PTR 8[rbp], 0
	je	.L26
.L10:
.L6:
	endbr64
	mov	edx, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L11
.L4:
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L12:
	mov	DWORD PTR [rbx+rax*4], edx
	add	rax, 1
	cmp	DWORD PTR PCIE_PORT_DEVICE_MAXSERVICES[rip], eax
	jg	.L12
.L11:
	mov	DWORD PTR [rcx], -1
	test	edx, edx
	jns	.L13
.L5:
	mov	eax, DWORD PTR ENODEV[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	rdx, QWORD PTR PCIE_PORT_SERVICE_VC_SHIFT[rip]
	cmp	QWORD PTR 8[rbp], 0
	mov	eax, DWORD PTR PCIE_PORT_DEVICE_MAXSERVICES[rip]
	lea	rcx, [rbx+rdx*4]
	jne	.L10
.L26:
	mov	edx, -1
	test	eax, eax
	jg	.L4
	mov	DWORD PTR [rcx], -1
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	init_service_irqs, .-init_service_irqs
	.comm	PCIE_PORT_SERVICE_VC_SHIFT,8,8
	.comm	PCIE_PORT_SERVICE_PME,4,4
	.comm	PCIE_PORT_SERVICE_HP,4,4
	.comm	PCIE_PORT_DEVICE_MAXSERVICES,4,4
	.comm	ENODEV,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_portdrv_core.c_init_service_irqs.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_service_irqs, %function
init_service_irqs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L29
	push	{r4, r5, r6, lr}
	ldr	r3, [r3]
	mov	r5, r2
	tst	r2, r3
	mov	r6, r0
	mov	r4, r1
	beq	.L2
	bl	pciehp_no_msi
	cmp	r0, #0
	bne	.L27
.L2:
	mov	r2, r5
	mov	r1, r4
	mov	r0, r6
	bl	pcie_port_enable_msix
	cmp	r0, #0
	bne	.L7
.L13:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L7:
	mov	r0, r6
	bl	pci_enable_msi
	cmp	r0, #0
	bne	.L27
	ldr	r3, .L29+4
	ldr	ip, .L29+8
	ldr	lr, [r3]
	ldr	r3, [ip]
	add	lr, r4, lr, lsl #2
.L10:
.L6:
	cmp	r3, #0
	ldr	r0, [r6]
	ble	.L11
.L4:
	mov	r3, #0
	sub	r1, r4, #4
.L12:
	str	r0, [r1, #4]!
	ldr	r2, [ip]
	add	r3, r3, #1
	cmp	r2, r3
	bgt	.L12
.L11:
	mvn	r3, #0
	cmp	r0, #0
	str	r3, [lr]
	bge	.L13
.L5:
	ldr	r3, .L29+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L27:
	ldr	r2, .L29+4
	ldr	r3, [r6, #4]
	ldr	r2, [r2]
	ldr	ip, .L29+8
	cmp	r3, #0
	add	lr, r4, r2, lsl #2
	ldr	r3, [ip]
	bne	.L10
	cmp	r3, #0
	mvnle	r3, #0
	strle	r3, [r4, r2, lsl #2]
	ble	.L5
	mvn	r0, #0
	b	.L4
.L30:
	.align	2
.L29:
	.word	PCIE_PORT_SERVICE_HP
	.word	PCIE_PORT_SERVICE_VC_SHIFT
	.word	PCIE_PORT_DEVICE_MAXSERVICES
	.word	ENODEV
	.size	init_service_irqs, .-init_service_irqs
	.comm	PCIE_PORT_SERVICE_VC_SHIFT,4,4
	.comm	PCIE_PORT_SERVICE_PME,4,4
	.comm	PCIE_PORT_SERVICE_HP,4,4
	.comm	PCIE_PORT_DEVICE_MAXSERVICES,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
