	.file	"extr_memory.c_nvkm_memory_tags_get.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	nvkm_memory_tags_get
	.type	nvkm_memory_tags_get, @function
nvkm_memory_tags_get:
.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
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	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
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r15, QWORD PTR [rsi]
	mov	rdi, r15
	call	mutex_lock@PLT
	mov	rbx, QWORD PTR [rbx]
	test	rbx, rbx
	je	.L2
	mov	rax, QWORD PTR 8[rbx]
	test	rax, rax
	je	.L3
	cmp	QWORD PTR [rax], r12
	jne	.L16
.L3:
	mov	rdi, rbx
	call	refcount_inc@PLT
	mov	rdi, r15
	call	mutex_unlock@PLT
	mov	QWORD PTR 0[r13], rbx
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L16:
	.cfi_restore_state
	mov	rdi, r15
	call	mutex_unlock@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 16
	call	kmalloc@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L17
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	lea	rax, 8[rax]
	mov	rcx, r12
	mov	edx, 1
	push	rax
	.cfi_def_cfa_offset 80
	lea	rdi, 4[r15]
	mov	r9d, 1
	mov	r8, r12
	xor	esi, esi
	call	nvkm_mm_head@PLT
	pop	rdx
	.cfi_def_cfa_offset 72
	pop	rcx
	.cfi_def_cfa_offset 64
	test	eax, eax
	jne	.L6
	test	r14, r14
	je	.L7
	mov	rax, QWORD PTR 8[rbx]
	mov	rdi, rbp
	mov	rsi, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR [rax]
	call	r14
.L7:
	mov	rdi, rbx
	mov	esi, 1
	call	refcount_set@PLT
	mov	rdi, r15
	call	mutex_unlock@PLT
	mov	QWORD PTR 0[r13], rbx
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L6:
	.cfi_restore_state
	mov	QWORD PTR 8[rbx], 0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, r15
	call	mutex_unlock@PLT
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	nvkm_memory_tags_get, .-nvkm_memory_tags_get
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_memory.c_nvkm_memory_tags_get.c"
	.text
	.align	2
	.global	nvkm_memory_tags_get
	.syntax unified
	.arm
	.fpu softvfp
	.type	nvkm_memory_tags_get, %function
nvkm_memory_tags_get:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r6, r0
	ldr	r7, [r1]
	sub	sp, sp, #20
	mov	r0, r7
	mov	r4, r1
	mov	r5, r2
	mov	r8, r3
	bl	mutex_lock
	ldr	r6, [r6]
	cmp	r6, #0
	beq	.L2
	ldr	r3, [r6, #4]
	cmp	r3, #0
	beq	.L3
	ldr	r3, [r3]
	cmp	r3, r5
	bne	.L16
.L3:
	mov	r0, r6
	bl	refcount_inc
	mov	r0, r7
	bl	mutex_unlock
	mov	r0, #0
	ldr	r3, [sp, #48]
	str	r6, [r3]
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L16:
	mov	r0, r7
	bl	mutex_unlock
	ldr	r3, .L18
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r3, .L18+4
	mov	r0, #8
	ldr	r1, [r3]
	bl	kmalloc
	subs	r9, r0, #0
	beq	.L17
	mov	r2, #1
	add	r1, r9, #4
	str	r1, [sp, #8]
	mov	r3, r5
	mov	r1, r6
	str	r5, [sp]
	str	r2, [sp, #4]
	add	r0, r7, #4
	bl	nvkm_mm_head
	cmp	r0, #0
	strne	r6, [r9, #4]
	bne	.L7
	cmp	r8, #0
	beq	.L7
	ldr	r3, [r9, #4]
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r1, [r3, #4]
	blx	r8
.L7:
	mov	r1, #1
	mov	r0, r9
	bl	refcount_set
	mov	r0, r7
	bl	mutex_unlock
	mov	r0, #0
	ldr	r3, [sp, #48]
	str	r9, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L17:
	mov	r0, r7
	bl	mutex_unlock
	ldr	r3, .L18+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L19:
	.align	2
.L18:
	.word	EINVAL
	.word	GFP_KERNEL
	.word	ENOMEM
	.size	nvkm_memory_tags_get, .-nvkm_memory_tags_get
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
