	.file	"extr_tegra_pcie.c_tegra_pcib_msi_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s,%u"
	.text
	.p2align 4
	.type	tegra_pcib_msi_attach, @function
tegra_pcib_msi_attach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR TEGRA_PCIB_MAX_MSI[rip]
	mov	esi, DWORD PTR M_DEVBUF[rip]
	mov	edx, DWORD PTR M_WAITOK[rip]
	or	edx, DWORD PTR M_ZERO[rip]
	lea	edi, 0[0+rax*8]
	call	malloc@PLT
	mov	edi, DWORD PTR 0[r13]
	mov	QWORD PTR 8[r13], rax
	call	device_get_nameunit@PLT
	mov	edx, DWORD PTR TEGRA_PCIB_MAX_MSI[rip]
	test	edx, edx
	jle	.L2
	mov	r12, rax
	xor	ebx, ebx
	lea	rbp, .LC0[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	add	rbx, 1
	cmp	DWORD PTR TEGRA_PCIB_MAX_MSI[rip], ebx
	jle	.L2
.L4:
	mov	rax, QWORD PTR 8[r13]
	mov	esi, DWORD PTR 0[r13]
	xor	edx, edx
	mov	r9d, ebx
	mov	r8, r12
	mov	rcx, rbp
	lea	rdi, [rax+rbx*8]
	mov	DWORD PTR [rdi], ebx
	add	rdi, 4
	call	intr_isrc_register@PLT
	test	eax, eax
	je	.L9
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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	edi, DWORD PTR 0[r13]
	call	ofw_bus_get_node@PLT
	mov	edi, eax
	call	OF_xref_from_node@PLT
	mov	edi, DWORD PTR 0[r13]
	mov	esi, eax
	call	intr_msi_register@PLT
	test	rax, rax
	mov	eax, 0
	cmovne	eax, DWORD PTR ENXIO[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE0:
	.size	tegra_pcib_msi_attach, .-tegra_pcib_msi_attach
	.comm	TEGRA_PCIB_MAX_MSI,4,4
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_DEVBUF,4,4
	.comm	ENXIO,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_tegra_pcie.c_tegra_pcib_msi_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s,%u\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tegra_pcib_msi_attach, %function
tegra_pcib_msi_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r2, .L12
	ldr	r3, .L12+4
	ldr	r7, .L12+8
	ldr	r1, [r2]
	mov	r5, r0
	ldr	r2, [r3]
	ldr	r0, [r7]
	ldr	r3, .L12+12
	orr	r2, r1, r2
	sub	sp, sp, #8
	ldr	r1, [r3]
	lsl	r0, r0, #3
	bl	malloc
	mov	r3, r0
	ldr	r0, [r5]
	str	r3, [r5, #4]
	bl	device_get_nameunit
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L2
	mov	r6, r0
	mov	r4, #0
	ldr	r8, .L12+16
	b	.L4
.L11:
	ldr	r3, [r7]
	cmp	r3, r4
	ble	.L2
.L4:
	ldr	r2, [r5, #4]
	mov	r3, r8
	str	r4, [r2, r4, lsl #3]
	add	r0, r2, r4, lsl #3
	str	r4, [sp, #4]
	str	r6, [sp]
	mov	r2, #0
	ldr	r1, [r5]
	add	r0, r0, #4
	bl	intr_isrc_register
	cmp	r0, #0
	add	r4, r4, #1
	beq	.L11
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r4, [r5]
	mov	r0, r4
	bl	ofw_bus_get_node
	bl	OF_xref_from_node
	mov	r1, r0
	mov	r0, r4
	bl	intr_msi_register
	cmp	r0, #0
	ldrne	r3, .L12+20
	ldrne	r0, [r3]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	M_WAITOK
	.word	M_ZERO
	.word	TEGRA_PCIB_MAX_MSI
	.word	M_DEVBUF
	.word	.LC0
	.word	ENXIO
	.size	tegra_pcib_msi_attach, .-tegra_pcib_msi_attach
	.comm	TEGRA_PCIB_MAX_MSI,4,4
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_DEVBUF,4,4
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
