	.file	"extr_pci.c_pci_remap_intr_method.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pci_remap_intr_method, @function
pci_remap_intr_method:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	DWORD PTR [rsp], edi
	mov	edi, esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	device_get_ivars@PLT
	mov	ecx, DWORD PTR 24[rax]
	mov	rbx, rax
	test	ecx, ecx
	jle	.L2
	xor	r8d, r8d
	cmp	QWORD PTR 32[rax], 0
	je	.L1
	lea	r15, 56[rax]
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L5:
	add	ebp, 1
	mov	esi, DWORD PTR SYS_RES_IRQ[rip]
	mov	rdi, r15
	mov	edx, ebp
	call	resource_list_find@PLT
	cmp	QWORD PTR [rax], r12
	je	.L20
	cmp	ebp, DWORD PTR 24[rbx]
	jl	.L5
.L18:
	mov	r8d, DWORD PTR ENOENT[rip]
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
	mov	edx, DWORD PTR [rax]
	mov	r8d, DWORD PTR ENOENT[rip]
	test	edx, edx
	jle	.L1
	lea	rax, 32[rsp]
	mov	ebp, 1
	xor	r15d, r15d
	mov	QWORD PTR 8[rsp], rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L8:
	add	r15, 24
	add	ebp, 1
	cmp	DWORD PTR [rbx], r10d
	jle	.L18
.L11:
	mov	r14, QWORD PTR 16[rbx]
	mov	r10d, ebp
	add	r14, r15
	cmp	QWORD PTR [r14], r12
	jne	.L8
	mov	edi, DWORD PTR [rsp]
	call	device_get_parent@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	rdx, r12
	mov	esi, r13d
	mov	edi, eax
	lea	rcx, 24[rsp]
	call	PCIB_MAP_MSI@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L1
	mov	rax, QWORD PTR 24[rsp]
	mov	r10d, ebp
	mov	QWORD PTR 16[r14], rax
	mov	rax, QWORD PTR 32[rsp]
	mov	QWORD PTR 8[r14], rax
	mov	eax, DWORD PTR 4[rbx]
	test	eax, eax
	jle	.L8
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, r14
	sal	rax, 4
	add	rax, QWORD PTR 8[rbx]
	cmp	DWORD PTR [rax], ebp
	jne	.L9
	cmp	QWORD PTR 8[rax], 0
	je	.L9
	mov	esi, r14d
	mov	edi, r13d
	mov	DWORD PTR 4[rsp], r10d
	call	pci_mask_msix@PLT
	mov	rcx, QWORD PTR 32[rsp]
	mov	esi, r14d
	mov	edi, r13d
	mov	rdx, QWORD PTR 24[rsp]
	call	pci_enable_msix@PLT
	mov	esi, r14d
	mov	edi, r13d
	call	pci_unmask_msix@PLT
	mov	r10d, DWORD PTR 4[rsp]
.L9:
	add	r14, 1
	cmp	DWORD PTR 4[rbx], r14d
	jg	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, DWORD PTR [rsp]
	call	device_get_parent@PLT
	lea	r8, 32[rsp]
	mov	rdx, r12
	mov	esi, r13d
	mov	edi, eax
	lea	rcx, 24[rsp]
	call	PCIB_MAP_MSI@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L1
	mov	edi, r13d
	mov	DWORD PTR [rsp], eax
	call	pci_disable_msi@PLT
	mov	rsi, QWORD PTR 24[rsp]
	mov	rdx, QWORD PTR 32[rsp]
	mov	edi, r13d
	mov	QWORD PTR 48[rbx], rsi
	mov	QWORD PTR 40[rbx], rdx
	call	pci_enable_msi@PLT
	mov	r8d, DWORD PTR [rsp]
	jmp	.L1
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pci_remap_intr_method, .-pci_remap_intr_method
	.comm	SYS_RES_IRQ,4,4
	.comm	ENOENT,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.c_pci_remap_intr_method.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pci_remap_intr_method, %function
pci_remap_intr_method:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L28
	sub	sp, sp, #28
	mov	r9, r0
	mov	r0, r1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r8, r1
	mov	r7, r2
	bl	device_get_ivars
	ldr	r3, [r0, #16]
	mov	r5, r0
	cmp	r3, #0
	ble	.L2
	ldr	r4, [r0, #20]
	cmp	r4, #0
	beq	.L1
	mov	r4, #0
	ldr	r10, .L28+4
	add	r6, r0, #32
.L5:
	add	r4, r4, #1
	mov	r2, r4
	mov	r0, r6
	ldr	r1, [r10]
	bl	resource_list_find
	ldr	r3, [r0]
	cmp	r3, r7
	beq	.L26
	ldr	r3, [r5, #16]
	cmp	r4, r3
	blt	.L5
.L6:
	ldr	r3, .L28+8
	ldr	r4, [r3]
.L1:
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r1, [r0]
	cmp	r1, #0
	ble	.L6
	mov	r10, #1
	mov	r6, #0
	b	.L11
.L8:
	cmp	r1, fp
	add	r6, r6, #12
	add	r10, r10, #1
	ble	.L6
.L11:
	ldr	r3, [r5, #12]
	ldr	r2, [r3, r6]
	add	fp, r3, r6
	cmp	r2, r7
	movne	fp, r10
	bne	.L8
	mov	r0, r9
	bl	device_get_parent
	add	r3, sp, #16
	str	r3, [sp]
	mov	r2, r7
	mov	r1, r8
	add	r3, sp, #12
	bl	PCIB_MAP_MSI
	subs	r4, r0, #0
	bne	.L1
	ldr	r1, [r5, #4]
	ldr	r2, [sp, #12]
	ldr	r3, [sp, #16]
	cmp	r1, #0
	str	r2, [fp, #8]
	str	r3, [fp, #4]
	mov	fp, r10
	ble	.L24
.L10:
	ldr	r3, [r5, #8]
	ldr	r2, [r3, r4, lsl #3]
	add	r3, r3, r4, lsl #3
	cmp	r2, r10
	bne	.L9
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L9
	mov	r1, r4
	mov	r0, r8
	bl	pci_mask_msix
	mov	r1, r4
	ldr	r3, [sp, #16]
	ldr	r2, [sp, #12]
	mov	r0, r8
	bl	pci_enable_msix
	mov	r1, r4
	mov	r0, r8
	bl	pci_unmask_msix
	ldr	r1, [r5, #4]
.L9:
	add	r4, r4, #1
	cmp	r1, r4
	bgt	.L10
.L24:
	ldr	r1, [r5]
	b	.L8
.L26:
	mov	r0, r9
	bl	device_get_parent
	add	r3, sp, #16
	str	r3, [sp]
	mov	r2, r7
	mov	r1, r8
	add	r3, sp, #12
	bl	PCIB_MAP_MSI
	subs	r4, r0, #0
	bne	.L1
	mov	r0, r8
	bl	pci_disable_msi
	ldr	r1, [sp, #12]
	ldr	r2, [sp, #16]
	mov	r0, r8
	str	r1, [r5, #28]
	str	r2, [r5, #24]
	bl	pci_enable_msi
	b	.L1
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC0
	.word	SYS_RES_IRQ
	.word	ENOENT
	.size	pci_remap_intr_method, .-pci_remap_intr_method
	.comm	SYS_RES_IRQ,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
