	.file	"extr_mtk-cmdq-mailbox.c_cmdq_thread_wait_end.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"GCE thread cannot run to end.\n"
	.text
	.p2align 4
	.type	cmdq_thread_wait_end, @function
cmdq_thread_wait_end:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rax, QWORD PTR 8[rdi]
	mov	r8, rsi
	xor	esi, esi
	xor	edx, edx
	cmp	rsi, r8
	mov	ecx, 1
	mov	r8d, 20
	mov	rax, QWORD PTR [rax]
	sete	dl
	mov	rbp, QWORD PTR [rax]
	mov	rax, QWORD PTR CMDQ_THR_CURR_ADDR[rip]
	add	rax, QWORD PTR [rdi]
	mov	rdi, rax
	call	readl_poll_timeout_atomic@PLT
	test	rax, rax
	jne	.L5
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, rbp
	lea	rsi, .LC0[rip]
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	dev_err@PLT
	.cfi_endproc
.LFE0:
	.size	cmdq_thread_wait_end, .-cmdq_thread_wait_end
	.comm	CMDQ_THR_CURR_ADDR,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_mtk-cmdq-mailbox.c_cmdq_thread_wait_end.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"GCE thread cannot run to end.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmdq_thread_wait_end, %function
cmdq_thread_wait_end:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	ldr	r2, .L6
	push	{r4, lr}
	ldr	r2, [r2]
	ldr	lr, [r0, #4]
	ldr	r0, [r0]
	mov	ip, #20
	add	r0, r0, r2
	sub	r2, r3, r1
	clz	r2, r2
	ldr	lr, [lr]
	sub	sp, sp, #8
	mov	r1, r3
	ldr	r4, [lr]
	mov	r3, #1
	lsr	r2, r2, #5
	str	ip, [sp]
	bl	readl_poll_timeout_atomic
	cmp	r0, #0
	bne	.L5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, pc}
.L5:
	mov	r0, r4
	ldr	r1, .L6+4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, lr}
	b	dev_err
.L7:
	.align	2
.L6:
	.word	CMDQ_THR_CURR_ADDR
	.word	.LC0
	.size	cmdq_thread_wait_end, .-cmdq_thread_wait_end
	.comm	CMDQ_THR_CURR_ADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
