	.file	"extr_ttm_bo.c_ttm_bo_cleanup_refs_or_queue.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ttm_bo_cleanup_refs_or_queue, @function
ttm_bo_cleanup_refs_or_queue:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13, QWORD PTR 24[rdi]
	mov	r12, QWORD PTR 32[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], 0
	mov	rdi, r13
	mov	r14, QWORD PTR 16[r12]
	lea	r15, 8[r12]
	call	mtx_lock@PLT
	xor	r8d, r8d
	xor	ecx, ecx
	mov	edx, 1
	xor	esi, esi
	mov	rdi, rbp
	call	ttm_bo_reserve_nolru@PLT
	mov	rdi, r15
	mov	ebx, eax
	call	mtx_lock@PLT
	mov	rdi, rbp
	mov	ecx, 1
	xor	edx, edx
	xor	esi, esi
	call	ttm_bo_wait@PLT
	mov	rdi, QWORD PTR 16[rbp]
	test	ebx, ebx
	jne	.L2
	test	rdi, rdi
	je	.L17
	call	[QWORD PTR 16[r14]]
	mov	rdi, r15
	mov	QWORD PTR [rsp], rax
	call	mtx_unlock@PLT
	lea	rdi, 8[rbp]
	xor	esi, esi
	call	atomic_set@PLT
	mov	rdi, rbp
	call	wakeup@PLT
.L7:
	lea	rdi, 4[rbp]
	call	refcount_acquire@PLT
	lea	rsi, 4[r12]
	mov	rdi, rbp
	call	list_add_tail@PLT
	mov	rdi, r13
	call	mtx_unlock@PLT
	mov	rdi, QWORD PTR [rsp]
	test	rdi, rdi
	je	.L5
	call	[QWORD PTR 8[r14]]
	mov	rdi, rsp
	call	[QWORD PTR [r14]]
.L5:
	mov	eax, DWORD PTR hz[rip]
	mov	edx, 1
	cmp	eax, 99
	jle	.L6
	movsx	rdx, eax
	sar	eax, 31
	imul	rdx, rdx, 1374389535
	sar	rdx, 37
	sub	edx, eax
.L6:
	mov	edi, DWORD PTR taskqueue_thread[rip]
	mov	rsi, r12
	call	taskqueue_enqueue_timeout@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 24
	.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
.L2:
	.cfi_restore_state
	test	rdi, rdi
	jne	.L19
	mov	rdi, r15
	call	mtx_unlock@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	call	[QWORD PTR 16[r14]]
	mov	rdi, r15
	mov	QWORD PTR [rsp], rax
	call	mtx_unlock@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, r15
	call	mtx_unlock@PLT
	mov	rdi, rbp
	call	ttm_bo_del_from_lru@PLT
	mov	rdi, r13
	mov	r12d, eax
	call	mtx_unlock@PLT
	mov	rdi, rbp
	call	ttm_bo_cleanup_memtype_use@PLT
	mov	edx, 1
	mov	esi, r12d
	mov	rdi, rbp
	call	ttm_bo_list_ref_sub@PLT
	jmp	.L1
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ttm_bo_cleanup_refs_or_queue, .-ttm_bo_cleanup_refs_or_queue
	.comm	taskqueue_thread,4,4
	.comm	hz,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_ttm_bo.c_ttm_bo_cleanup_refs_or_queue.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ttm_bo_cleanup_refs_or_queue, %function
ttm_bo_cleanup_refs_or_queue:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, #0
	mov	r4, r0
	ldr	r10, [r0, #16]
	ldr	r6, [r0, #20]
	ldr	r3, .L19
	sub	sp, sp, #16
	mov	r0, r10
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r9, [r6, #12]
	str	r5, [sp, #8]
	bl	mtx_lock
	mov	r3, r5
	mov	r1, r5
	mov	r2, #1
	mov	r0, r4
	str	r5, [sp]
	bl	ttm_bo_reserve_nolru
	mov	r7, r0
	add	r8, r6, #8
	mov	r0, r8
	bl	mtx_lock
	mov	r0, r4
	mov	r2, r5
	mov	r1, r5
	mov	r3, #1
	bl	ttm_bo_wait
	cmp	r7, r5
	ldr	r0, [r4, #12]
	bne	.L2
	cmp	r0, r5
	beq	.L16
	ldr	r3, [r9, #8]
	blx	r3
	mov	r3, r0
	mov	r0, r8
	str	r3, [sp, #8]
	bl	mtx_unlock
	mov	r1, r7
	add	r0, r4, #8
	bl	atomic_set
	mov	r0, r4
	bl	wakeup
.L7:
	add	r0, r4, #4
	bl	refcount_acquire
	add	r1, r6, #4
	mov	r0, r4
	bl	list_add_tail
	mov	r0, r10
	bl	mtx_unlock
	ldr	r0, [sp, #8]
	cmp	r0, #0
	beq	.L5
	ldr	r3, [r9, #4]
	blx	r3
	ldr	r3, [r9]
	add	r0, sp, #8
	blx	r3
.L5:
	ldr	r3, .L19+4
	ldr	r2, .L19+8
	ldr	r3, [r3]
	ldr	r0, [r2]
	cmp	r3, #99
	ldrgt	r1, .L19+12
	asrgt	r2, r3, #31
	smullgt	ip, r3, r1, r3
	movle	r2, #1
	mov	r1, r6
	rsbgt	r2, r2, r3, asr #5
	bl	taskqueue_enqueue_timeout
.L1:
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	cmp	r0, #0
	bne	.L18
	mov	r0, r8
	bl	mtx_unlock
	b	.L7
.L18:
	ldr	r3, [r9, #8]
	blx	r3
	mov	r3, r0
	mov	r0, r8
	str	r3, [sp, #8]
	bl	mtx_unlock
	b	.L7
.L16:
	mov	r0, r8
	bl	mtx_unlock
	mov	r0, r4
	bl	ttm_bo_del_from_lru
	mov	r5, r0
	mov	r0, r10
	bl	mtx_unlock
	mov	r0, r4
	bl	ttm_bo_cleanup_memtype_use
	mov	r1, r5
	mov	r0, r4
	mov	r2, #1
	bl	ttm_bo_list_ref_sub
	b	.L1
.L17:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	.LC0
	.word	hz
	.word	taskqueue_thread
	.word	1374389535
	.size	ttm_bo_cleanup_refs_or_queue, .-ttm_bo_cleanup_refs_or_queue
	.comm	taskqueue_thread,4,4
	.comm	hz,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
