	.file	"extr_tegra-gart.c_gart_iommu_attach_dev.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gart_iommu_attach_dev, @function
gart_iommu_attach_dev:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR gart_handle[rip]
	mov	rdi, rbp
	call	spin_lock@PLT
	mov	rax, QWORD PTR 8[rbp]
	cmp	rax, rbx
	je	.L2
	test	rax, rax
	je	.L2
	mov	r13d, DWORD PTR EBUSY[rip]
	neg	r13d
.L3:
	mov	rdi, rbp
	call	spin_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
	xor	r13d, r13d
	cmp	QWORD PTR [r12], rbx
	je	.L3
	mov	QWORD PTR [r12], rbx
	add	DWORD PTR 4[rbp], 1
	mov	QWORD PTR 8[rbp], rbx
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	gart_iommu_attach_dev, .-gart_iommu_attach_dev
	.comm	gart_handle,8,8
	.comm	EBUSY,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-gart.c_gart_iommu_attach_dev.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gart_iommu_attach_dev, %function
gart_iommu_attach_dev:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r3, .L8
	mov	r7, r1
	ldr	r6, [r3]
	mov	r0, r6
	bl	spin_lock
	ldr	r3, [r6, #8]
	cmp	r3, r5
	cmpne	r3, #0
	movne	r4, #1
	moveq	r4, #0
	bne	.L7
	ldr	r3, [r7]
	cmp	r3, r5
	ldrne	r3, [r6, #4]
	strne	r5, [r7]
	addne	r3, r3, #1
	stmibne	r6, {r3, r5}
.L3:
	mov	r0, r6
	bl	spin_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r3, .L8+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L3
.L9:
	.align	2
.L8:
	.word	gart_handle
	.word	EBUSY
	.size	gart_iommu_attach_dev, .-gart_iommu_attach_dev
	.comm	gart_handle,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
