	.file	"extr_intel_ringbuffer.c_xcs_resume.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%s: ring:{HEAD:%04x, TAIL:%04x}\n"
	.align 8
.LC1:
	.string	"%s head not reset to zero ctl %08x head %08x tail %08x start %08x\n"
	.align 8
.LC2:
	.string	"failed to set %s head to zero ctl %08x head %08x tail %08x start %08x\n"
	.align 8
.LC3:
	.string	"%s initialization failed ctl %08x (valid? %d) head %08x [%08x] tail %08x [%08x] start %08x [expected %08x]\n"
	.text
	.p2align 4
	.type	xcs_resume, @function
xcs_resume:
.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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rbp, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR 24[rdi]
	mov	esi, DWORD PTR 4[rdi]
	lea	rdi, .LC0[rip]
	mov	ecx, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR 0[rbp]
	mov	QWORD PTR 8[rsp], rax
	call	GEM_TRACE@PLT
	mov	esi, DWORD PTR FORCEWAKE_ALL[rip]
	mov	edi, DWORD PTR [rbx]
	call	intel_uncore_forcewake_get@PLT
	mov	rdi, rbx
	call	stop_ring@PLT
	mov	r15, QWORD PTR RING_START@GOTPCREL[rip]
	test	eax, eax
	je	.L10
	mov	r12, QWORD PTR RING_TAIL@GOTPCREL[rip]
	mov	r13, QWORD PTR RING_HEAD@GOTPCREL[rip]
	mov	r14, QWORD PTR RING_CTL@GOTPCREL[rip]
.L2:
	mov	rdi, QWORD PTR 8[rsp]
	call	HWS_NEEDS_PHYSICAL@PLT
	mov	rdi, rbx
	test	rax, rax
	jne	.L13
	call	ring_setup_status_page@PLT
.L5:
	mov	rdi, rbx
	call	intel_engine_reset_breadcrumbs@PLT
	mov	rsi, r13
	mov	rdi, rbx
	call	ENGINE_POSTING_READ@PLT
	mov	edi, DWORD PTR 8[rbp]
	call	i915_ggtt_offset@PLT
	mov	rsi, r15
	mov	rdi, rbx
	mov	edx, eax
	call	ENGINE_WRITE@PLT
	mov	esi, DWORD PTR 0[rbp]
	mov	rdi, rbp
	call	intel_ring_offset_valid@PLT
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	GEM_BUG_ON@PLT
	mov	esi, DWORD PTR 4[rbp]
	mov	rdi, rbp
	call	intel_ring_offset_valid@PLT
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	GEM_BUG_ON@PLT
	mov	rdi, rbp
	call	intel_ring_update_space@PLT
	mov	edx, DWORD PTR 0[rbp]
	mov	rsi, r13
	mov	rdi, rbx
	call	ENGINE_WRITE@PLT
	mov	edx, DWORD PTR 0[rbp]
	mov	rsi, r12
	mov	rdi, rbx
	call	ENGINE_WRITE@PLT
	mov	rsi, r12
	mov	rdi, rbx
	call	ENGINE_POSTING_READ@PLT
	mov	edi, DWORD PTR 12[rbp]
	call	RING_CTL_SIZE@PLT
	or	eax, DWORD PTR RING_VALID[rip]
	mov	rsi, r14
	mov	rdi, rbx
	mov	edx, eax
	call	ENGINE_WRITE@PLT
	mov	edx, DWORD PTR RING_VALID[rip]
	mov	edi, DWORD PTR 8[rbx]
	mov	DWORD PTR 20[rsp], edx
	call	RING_CTL@PLT
	mov	edx, DWORD PTR 20[rsp]
	mov	edi, DWORD PTR [rbx]
	mov	r8d, 50
	mov	esi, eax
	mov	ecx, edx
	call	intel_wait_for_register@PLT
	test	rax, rax
	jne	.L14
	mov	rdi, QWORD PTR 8[rsp]
	call	INTEL_GEN@PLT
	cmp	eax, 2
	jg	.L15
.L7:
	mov	edx, DWORD PTR 4[rbp]
	cmp	edx, DWORD PTR 0[rbp]
	je	.L8
	mov	rsi, r12
	mov	rdi, rbx
	call	ENGINE_WRITE@PLT
	mov	rsi, r12
	mov	rdi, rbx
	call	ENGINE_POSTING_READ@PLT
.L8:
	mov	rdi, rbx
	xor	r12d, r12d
	call	intel_engine_queue_breadcrumbs@PLT
.L3:
	mov	edi, DWORD PTR [rbx]
	mov	esi, DWORD PTR FORCEWAKE_ALL[rip]
	call	intel_uncore_forcewake_put@PLT
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L10:
	.cfi_restore_state
	mov	rsi, r15
	mov	rdi, rbx
	call	ENGINE_READ@PLT
	mov	r12, QWORD PTR RING_TAIL@GOTPCREL[rip]
	mov	rdi, rbx
	mov	DWORD PTR 28[rsp], eax
	mov	rsi, r12
	call	ENGINE_READ@PLT
	mov	r13, QWORD PTR RING_HEAD@GOTPCREL[rip]
	mov	rdi, rbx
	mov	DWORD PTR 24[rsp], eax
	mov	rsi, r13
	call	ENGINE_READ@PLT
	mov	r14, QWORD PTR RING_CTL@GOTPCREL[rip]
	mov	rdi, rbx
	mov	DWORD PTR 20[rsp], eax
	mov	rsi, r14
	call	ENGINE_READ@PLT
	mov	esi, DWORD PTR 4[rbx]
	mov	r9d, DWORD PTR 28[rsp]
	lea	rdi, .LC1[rip]
	mov	r8d, DWORD PTR 24[rsp]
	mov	ecx, DWORD PTR 20[rsp]
	mov	edx, eax
	call	DRM_DEBUG_DRIVER@PLT
	mov	rdi, rbx
	call	stop_ring@PLT
	test	eax, eax
	jne	.L2
	mov	rsi, r15
	mov	rdi, rbx
	call	ENGINE_READ@PLT
	mov	rsi, r12
	mov	rdi, rbx
	mov	r15d, eax
	call	ENGINE_READ@PLT
	mov	rsi, r13
	mov	rdi, rbx
	mov	ebp, eax
	call	ENGINE_READ@PLT
	mov	rsi, r14
	mov	rdi, rbx
	mov	r12d, eax
	call	ENGINE_READ@PLT
	mov	esi, DWORD PTR 4[rbx]
	mov	ecx, r12d
	mov	r9d, r15d
	mov	edx, eax
	mov	r8d, ebp
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	DRM_ERROR@PLT
	mov	r12d, DWORD PTR EIO[rip]
	neg	r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	call	ring_setup_phys_status_page@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR 8[rbp]
	call	i915_ggtt_offset@PLT
	mov	rsi, r15
	mov	rdi, rbx
	mov	DWORD PTR 28[rsp], eax
	call	ENGINE_READ@PLT
	mov	r11d, DWORD PTR 4[rbp]
	mov	rsi, r12
	mov	rdi, rbx
	mov	r15d, eax
	mov	DWORD PTR 24[rsp], r11d
	call	ENGINE_READ@PLT
	mov	r9d, DWORD PTR 0[rbp]
	mov	rsi, r13
	mov	rdi, rbx
	mov	DWORD PTR 8[rsp], eax
	mov	DWORD PTR 20[rsp], r9d
	call	ENGINE_READ@PLT
	mov	rsi, r14
	mov	rdi, rbx
	mov	ebp, eax
	call	ENGINE_READ@PLT
	mov	r12d, DWORD PTR RING_VALID[rip]
	mov	rsi, r14
	mov	rdi, rbx
	and	r12d, eax
	call	ENGINE_READ@PLT
	mov	r10d, DWORD PTR 28[rsp]
	mov	esi, DWORD PTR 4[rbx]
	mov	ecx, r12d
	mov	edx, eax
	mov	r8d, ebp
	lea	rdi, .LC3[rip]
	push	r10
	.cfi_def_cfa_offset 104
	push	r15
	.cfi_def_cfa_offset 112
	mov	r11d, DWORD PTR 40[rsp]
	push	r11
	.cfi_def_cfa_offset 120
	mov	eax, DWORD PTR 32[rsp]
	push	rax
	.cfi_def_cfa_offset 128
	mov	r9d, DWORD PTR 52[rsp]
	xor	eax, eax
	call	DRM_ERROR@PLT
	mov	r12d, DWORD PTR EIO[rip]
	add	rsp, 32
	.cfi_def_cfa_offset 96
	neg	r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR STOP_RING[rip]
	call	_MASKED_BIT_DISABLE@PLT
	mov	rsi, QWORD PTR RING_MI_MODE@GOTPCREL[rip]
	mov	rdi, rbx
	mov	edx, eax
	call	ENGINE_WRITE@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	xcs_resume, .-xcs_resume
	.comm	STOP_RING,4,4
	.comm	RING_VALID,4,4
	.comm	FORCEWAKE_ALL,4,4
	.comm	EIO,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_intel_ringbuffer.c_xcs_resume.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: ring:{HEAD:%04x, TAIL:%04x}\012\000"
	.align	2
.LC1:
	.ascii	"%s head not reset to zero ctl %08x head %08x tail %"
	.ascii	"08x start %08x\012\000"
	.align	2
.LC2:
	.ascii	"failed to set %s head to zero ctl %08x head %08x ta"
	.ascii	"il %08x start %08x\012\000"
	.align	2
.LC3:
	.ascii	"%s initialization failed ctl %08x (valid? %d) head "
	.ascii	"%08x [%08x] tail %08x [%08x] start %08x [expected %"
	.ascii	"08x]\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xcs_resume, %function
xcs_resume:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r5, [r0, #12]
	ldr	r7, .L16
	ldr	r1, [r0, #4]
	sub	sp, sp, #36
	ldm	r5, {r2, r3}
	ldr	r0, .L16+4
	ldr	r9, [r4, #16]
	bl	GEM_TRACE
	ldr	r1, [r7]
	ldr	r0, [r4]
	bl	intel_uncore_forcewake_get
	mov	r0, r4
	bl	stop_ring
	cmp	r0, #0
	bne	.L2
	ldr	r1, .L16+8
	mov	r0, r4
	ldr	r10, [r4, #4]
	bl	ENGINE_READ
	ldr	r1, .L16+12
	mov	r6, r0
	mov	r0, r4
	bl	ENGINE_READ
	ldr	r1, .L16+16
	mov	r8, r0
	mov	r0, r4
	bl	ENGINE_READ
	ldr	r1, .L16+20
	mov	fp, r0
	mov	r0, r4
	bl	ENGINE_READ
	mov	r3, r8
	mov	r2, r6
	mov	r1, r10
	str	r0, [sp, #4]
	str	fp, [sp]
	ldr	r0, .L16+24
	bl	DRM_DEBUG_DRIVER
	mov	r0, r4
	bl	stop_ring
	cmp	r0, #0
	beq	.L12
.L2:
	mov	r0, r9
	bl	HWS_NEEDS_PHYSICAL
	cmp	r0, #0
	mov	r0, r4
	bne	.L13
	bl	ring_setup_status_page
.L5:
	mov	r0, r4
	bl	intel_engine_reset_breadcrumbs
	ldr	r1, .L16+12
	mov	r0, r4
	bl	ENGINE_POSTING_READ
	ldr	r0, [r5, #8]
	bl	i915_ggtt_offset
	ldr	r1, .L16+20
	mov	r2, r0
	mov	r0, r4
	bl	ENGINE_WRITE
	ldr	r1, [r5]
	mov	r0, r5
	bl	intel_ring_offset_valid
	clz	r0, r0
	lsr	r0, r0, #5
	bl	GEM_BUG_ON
	ldr	r1, [r5, #4]
	mov	r0, r5
	bl	intel_ring_offset_valid
	clz	r0, r0
	lsr	r0, r0, #5
	bl	GEM_BUG_ON
	mov	r0, r5
	bl	intel_ring_update_space
	ldr	r2, [r5]
	ldr	r1, .L16+12
	mov	r0, r4
	bl	ENGINE_WRITE
	ldr	r2, [r5]
	ldr	r1, .L16+16
	mov	r0, r4
	bl	ENGINE_WRITE
	ldr	r1, .L16+16
	mov	r0, r4
	bl	ENGINE_POSTING_READ
	ldr	r0, [r5, #12]
	bl	RING_CTL_SIZE
	mov	r2, r0
	ldr	r8, .L16+28
	ldr	r1, .L16+8
	ldr	r3, [r8]
	mov	r0, r4
	orr	r2, r2, r3
	bl	ENGINE_WRITE
	ldr	r0, [r4, #8]
	ldr	r6, [r4]
	bl	RING_CTL
	mov	ip, #50
	ldr	r3, [r8]
	mov	r1, r0
	mov	r2, r3
	mov	r0, r6
	str	ip, [sp]
	bl	intel_wait_for_register
	subs	r6, r0, #0
	bne	.L14
	mov	r0, r9
	bl	INTEL_GEN
	cmp	r0, #2
	bgt	.L15
.L7:
	ldr	r2, [r5, #4]
	ldr	r3, [r5]
	cmp	r2, r3
	beq	.L8
	ldr	r1, .L16+16
	mov	r0, r4
	bl	ENGINE_WRITE
	mov	r0, r4
	ldr	r1, .L16+16
	bl	ENGINE_POSTING_READ
.L8:
	mov	r0, r4
	bl	intel_engine_queue_breadcrumbs
.L3:
	ldr	r1, [r7]
	ldr	r0, [r4]
	bl	intel_uncore_forcewake_put
	mov	r0, r6
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	bl	ring_setup_phys_status_page
	b	.L5
.L14:
	ldr	r1, .L16+8
	mov	r0, r4
	ldr	r9, [r4, #4]
	bl	ENGINE_READ
	ldr	r1, .L16+8
	mov	r6, r0
	mov	r0, r4
	bl	ENGINE_READ
	mov	r2, r0
	ldr	r3, [r8]
	ldr	r1, .L16+12
	mov	r0, r4
	and	r8, r2, r3
	bl	ENGINE_READ
	mov	r2, r0
	ldr	r1, .L16+16
	mov	r0, r4
	str	r2, [sp, #28]
	ldr	r10, [r5]
	bl	ENGINE_READ
	mov	r3, r0
	ldr	r1, .L16+20
	mov	r0, r4
	ldr	fp, [r5, #4]
	str	r3, [sp, #24]
	bl	ENGINE_READ
	mov	r1, r0
	ldr	r0, [r5, #8]
	mov	r5, r1
	bl	i915_ggtt_offset
	ldr	r2, [sp, #28]
	ldr	r3, [sp, #24]
	str	r2, [sp]
	str	r3, [sp, #8]
	mov	r2, r6
	mov	r3, r8
	str	r0, [sp, #20]
	mov	r1, r9
	ldr	r0, .L16+32
	str	r5, [sp, #16]
	str	fp, [sp, #12]
	str	r10, [sp, #4]
	bl	DRM_ERROR
	ldr	r3, .L16+36
	ldr	r0, [r3]
	rsb	r6, r0, #0
	b	.L3
.L12:
	ldr	r1, .L16+8
	mov	r0, r4
	ldr	r9, [r4, #4]
	bl	ENGINE_READ
	ldr	r1, .L16+12
	mov	r5, r0
	mov	r0, r4
	bl	ENGINE_READ
	ldr	r1, .L16+16
	mov	r6, r0
	mov	r0, r4
	bl	ENGINE_READ
	ldr	r1, .L16+20
	mov	r8, r0
	mov	r0, r4
	bl	ENGINE_READ
	mov	r3, r6
	str	r0, [sp, #4]
	mov	r2, r5
	mov	r1, r9
	ldr	r0, .L16+40
	str	r8, [sp]
	bl	DRM_ERROR
	ldr	r3, .L16+36
	ldr	r0, [r3]
	rsb	r6, r0, #0
	b	.L3
.L15:
	ldr	r3, .L16+44
	ldr	r0, [r3]
	bl	_MASKED_BIT_DISABLE
	ldr	r1, .L16+48
	mov	r2, r0
	mov	r0, r4
	bl	ENGINE_WRITE
	b	.L7
.L17:
	.align	2
.L16:
	.word	FORCEWAKE_ALL
	.word	.LC0
	.word	RING_CTL
	.word	RING_HEAD
	.word	RING_TAIL
	.word	RING_START
	.word	.LC1
	.word	RING_VALID
	.word	.LC3
	.word	EIO
	.word	.LC2
	.word	STOP_RING
	.word	RING_MI_MODE
	.size	xcs_resume, .-xcs_resume
	.comm	STOP_RING,4,4
	.comm	RING_VALID,4,4
	.comm	FORCEWAKE_ALL,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
