	.file	"extr_amd_iommu.c_get_device_resources.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Using protection domain %d for device %s\n"
	.text
	.p2align 4
	.type	get_device_resources, @function
get_device_resources:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rax, pci_bus_type[rip]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	QWORD PTR [rsi], 0
	mov	QWORD PTR [rdx], 0
	mov	QWORD PTR [rcx], 65535
	cmp	QWORD PTR [rdi], rax
	je	.L2
.L4:
	xor	r14d, r14d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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	rbp, rdi
	mov	r12, rsi
	mov	r13, rdx
	mov	rbx, rcx
	call	to_pci_dev@PLT
	mov	rdx, QWORD PTR 8[rax]
	mov	esi, DWORD PTR [rax]
	mov	edi, DWORD PTR [rdx]
	call	calc_devid@PLT
	cmp	QWORD PTR amd_iommu_last_bdf[rip], rax
	mov	r15, rax
	jb	.L4
	mov	rax, QWORD PTR amd_iommu_alias_table[rip]
	mov	rdi, QWORD PTR [rax+r15*8]
	mov	rax, QWORD PTR amd_iommu_rlookup_table[rip]
	mov	rax, QWORD PTR [rax+rdi*8]
	mov	QWORD PTR [rbx], rdi
	mov	QWORD PTR [r12], rax
	test	rax, rax
	je	.L4
	call	domain_for_device@PLT
	mov	QWORD PTR 0[r13], rax
	test	rax, rax
	je	.L14
.L5:
	mov	rdi, r15
	mov	r14d, 1
	call	domain_for_device@PLT
	test	rax, rax
	jne	.L1
	mov	rsi, QWORD PTR 0[r13]
	mov	rdi, QWORD PTR [r12]
	mov	rdx, r15
	call	attach_device@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, QWORD PTR [rbx]
	call	find_protection_domain@PLT
	mov	rdi, QWORD PTR [r12]
	mov	rsi, rax
	test	rax, rax
	je	.L6
.L7:
	mov	QWORD PTR 0[r13], rsi
	mov	rdx, QWORD PTR [rbx]
	call	attach_device@PLT
	mov	rdi, rbp
	call	dev_name@PLT
	lea	rdi, .LC0[rip]
	mov	edx, eax
	mov	rax, QWORD PTR 0[r13]
	mov	esi, DWORD PTR [rax]
	call	DUMP_printk@PLT
	jmp	.L5
.L6:
	mov	rsi, QWORD PTR [rdi]
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	get_device_resources, .-get_device_resources
	.comm	pci_bus_type,4,4
	.comm	amd_iommu_rlookup_table,8,8
	.comm	amd_iommu_last_bdf,8,8
	.comm	amd_iommu_alias_table,8,8
	.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_amd_iommu.c_get_device_resources.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Using protection domain %d for device %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_device_resources, %function
get_device_resources:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r3
	mov	r3, #0
	ldr	lr, [r0]
	ldr	ip, .L16
	str	r3, [r1]
	cmp	lr, ip
	ldr	ip, .L16+4
	str	r3, [r2]
	str	ip, [r4]
	beq	.L2
.L4:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r5, r1
	mov	r6, r2
	mov	r7, r0
	bl	to_pci_dev
	ldm	r0, {r1, r3}
	ldr	r0, [r3]
	bl	calc_devid
	ldr	r3, .L16+8
	mov	r8, r0
	ldr	r3, [r3]
	cmp	r3, r0
	bcc	.L4
	ldr	r2, .L16+12
	ldr	r3, .L16+16
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r0, [r2, r0, lsl #2]
	ldr	r3, [r3, r0, lsl #2]
	str	r0, [r4]
	cmp	r3, #0
	str	r3, [r5]
	beq	.L4
	bl	domain_for_device
	cmp	r0, #0
	str	r0, [r6]
	beq	.L14
.L5:
	mov	r0, r8
	bl	domain_for_device
	cmp	r0, #0
	beq	.L15
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r0, [r4]
	bl	find_protection_domain
	subs	r1, r0, #0
	ldr	r0, [r5]
	ldr	r2, [r4]
	ldreq	r1, [r0]
	str	r1, [r6]
	bl	attach_device
	ldr	r3, [r6]
	mov	r0, r7
	ldr	r4, [r3]
	bl	dev_name
	mov	r1, r4
	mov	r2, r0
	ldr	r0, .L16+20
	bl	DUMP_printk
	b	.L5
.L15:
	mov	r2, r8
	ldr	r1, [r6]
	ldr	r0, [r5]
	bl	attach_device
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	.align	2
.L16:
	.word	pci_bus_type
	.word	65535
	.word	amd_iommu_last_bdf
	.word	amd_iommu_alias_table
	.word	amd_iommu_rlookup_table
	.word	.LC0
	.size	get_device_resources, .-get_device_resources
	.comm	pci_bus_type,4,4
	.comm	amd_iommu_rlookup_table,4,4
	.comm	amd_iommu_last_bdf,4,4
	.comm	amd_iommu_alias_table,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
