	.file	"extr_selftest_hangcheck.c_active_engine.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	active_engine, @function
active_engine:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	lea	r15, -128[rbp]
	push	r13
	push	r12
	push	rbx
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 136
	mov	QWORD PTR -168[rbp], rdi
	mov	edi, DWORD PTR prng[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	call	I915_RND_STATE@PLT
	pxor	xmm0, xmm0
	mov	rdi, r15
	mov	r12, QWORD PTR 8[rbx]
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm0
	movaps	XMMWORD PTR -96[rbp], xmm0
	movaps	XMMWORD PTR -80[rbp], xmm0
	call	ARRAY_SIZE@PLT
	mov	rcx, rsp
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L35:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L35
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L36
.L4:
	mov	rdi, QWORD PTR [r12]
	mov	r13, rsp
	xor	ebx, ebx
	call	mock_file@PLT
	mov	rdi, rax
	mov	QWORD PTR -136[rbp], rax
	call	IS_ERR@PLT
	test	rax, rax
	je	.L5
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, QWORD PTR [r12]
	call	mutex_lock@PLT
	mov	rsi, QWORD PTR -136[rbp]
	mov	rdi, QWORD PTR [r12]
	call	live_context@PLT
	mov	rdi, QWORD PTR [r12]
	mov	QWORD PTR 0[r13+rbx*8], rax
	call	mutex_unlock@PLT
	mov	rdi, QWORD PTR 0[r13+rbx*8]
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L38
	add	rbx, 1
.L5:
	mov	rdi, r13
	call	ARRAY_SIZE@PLT
	cmp	rbx, rax
	jb	.L10
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L41:
	mov	rdx, QWORD PTR [rdx]
	lea	rsi, prng[rip]
	mov	edi, 512
	mov	QWORD PTR -144[rbp], rdx
	call	i915_prandom_u32_max_state@PLT
	mov	rdx, QWORD PTR -144[rbp]
	mov	DWORD PTR [rdx], eax
.L14:
	mov	rdi, r14
	add	rbx, 1
	call	i915_request_get@PLT
	mov	rcx, QWORD PTR -160[rbp]
	mov	rdi, r14
	mov	QWORD PTR -128[rbp+rcx*8], rax
	call	i915_request_add@PLT
	mov	rdi, QWORD PTR [r12]
	call	mutex_unlock@PLT
	mov	rdi, QWORD PTR -152[rbp]
	call	active_request_put@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L15
	xor	eax, eax
	call	cond_resched@PLT
.L11:
	xor	eax, eax
	call	kthread_should_stop@PLT
	test	eax, eax
	jne	.L39
	mov	rdi, r15
	call	ARRAY_SIZE@PLT
	mov	rdi, QWORD PTR [r12]
	lea	r14d, -1[rax]
	mov	eax, r14d
	and	eax, ebx
	mov	r14, rax
	mov	QWORD PTR -160[rbp], rax
	mov	rax, QWORD PTR -128[rbp+rax*8]
	mov	QWORD PTR -152[rbp], rax
	call	mutex_lock@PLT
	lea	rdx, 0[r13+r14*8]
	mov	rsi, r12
	mov	rdi, QWORD PTR [rdx]
	mov	QWORD PTR -144[rbp], rdx
	call	igt_request_alloc@PLT
	mov	rdi, rax
	mov	r14, rax
	call	IS_ERR@PLT
	mov	rdx, QWORD PTR -144[rbp]
	test	rax, rax
	jne	.L40
	mov	rax, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR TEST_PRIORITY[rip], eax
	je	.L14
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L40:
	mov	rdi, QWORD PTR [r12]
	call	mutex_unlock@PLT
	mov	rdi, r14
	call	PTR_ERR@PLT
	mov	r14d, eax
.L15:
	xor	ebx, ebx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, QWORD PTR [r15+rbx*8]
	call	active_request_put@PLT
	test	r14d, r14d
	cmove	r14d, eax
	add	rbx, 1
.L13:
	mov	rdi, r15
	call	ARRAY_SIZE@PLT
	cmp	rbx, rax
	jb	.L18
.L8:
	mov	rsi, QWORD PTR -136[rbp]
	mov	rdi, QWORD PTR [r12]
	call	mock_file_free@PLT
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L42
	lea	rsp, -40[rbp]
	mov	eax, r14d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L38:
	.cfi_restore_state
	mov	rdi, QWORD PTR 0[r13+rbx*8]
	call	PTR_ERR@PLT
	mov	r14d, eax
	sub	rbx, 1
	je	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, QWORD PTR 0[r13+rbx*8]
	call	i915_gem_context_put@PLT
	sub	rbx, 1
	jne	.L9
	jmp	.L8
.L37:
	mov	rdi, QWORD PTR -136[rbp]
	call	PTR_ERR@PLT
	mov	r14d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L36:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L39:
	xor	r14d, r14d
	jmp	.L15
.L42:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	active_engine, .-active_engine
	.comm	prng,4,4
	.comm	TEST_PRIORITY,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_selftest_hangcheck.c_active_engine.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	active_engine, %function
active_engine:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #60
	mov	r4, r0
	ldr	r3, .L33
	mov	r7, r0
	ldr	r0, [r3]
	ldr	r3, .L33+4
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	I915_RND_STATE
	mov	r2, #32
	mov	r1, #0
	sub	r0, fp, #72
	ldr	r5, [r4, #4]
	bl	memset
	sub	r0, fp, #72
	bl	ARRAY_SIZE
	lsl	r3, r0, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r0, [r5]
	bl	mock_file
	mov	r9, r0
	bl	IS_ERR
	subs	r10, r0, #0
	moveq	r6, sp
	moveq	r4, r10
	beq	.L2
	b	.L28
.L7:
	ldr	r0, [r5]
	bl	mutex_lock
	mov	r1, r9
	ldr	r0, [r5]
	bl	live_context
	mov	r3, r0
	ldr	r0, [r5]
	str	r3, [r6, r4, lsl #2]
	bl	mutex_unlock
	ldr	r0, [r6, r4, lsl #2]
	bl	IS_ERR
	cmp	r0, #0
	bne	.L29
	add	r4, r4, #1
.L2:
	mov	r0, r6
	bl	ARRAY_SIZE
	cmp	r4, r0
	bcc	.L7
	str	r10, [fp, #-92]
	str	r6, [fp, #-80]
	mov	r10, r7
	str	r9, [fp, #-88]
	b	.L8
.L11:
	mov	r0, r7
	bl	i915_request_get
	mov	r3, r0
	sub	r2, fp, #36
	add	r8, r2, r8
	mov	r0, r7
	str	r3, [r8, #-36]
	bl	i915_request_add
	ldr	r0, [r5]
	bl	mutex_unlock
	mov	r0, r9
	bl	active_request_put
	cmp	r0, #0
	bne	.L18
	bl	cond_resched
.L8:
	bl	kthread_should_stop
	cmp	r0, #0
	bne	.L30
	sub	r0, fp, #72
	bl	ARRAY_SIZE
	sub	r3, r0, #1
	and	r6, r3, r4
	sub	r3, fp, #36
	add	r2, r3, r6, lsl #2
	ldr	r0, [r5]
	ldr	r9, [r2, #-36]
	bl	mutex_lock
	ldr	r3, [fp, #-80]
	mov	r1, r5
	ldr	r0, [r3, r6, lsl #2]
	bl	igt_request_alloc
	mov	r7, r0
	bl	IS_ERR
	cmp	r0, #0
	add	r4, r4, #1
	lsl	r8, r6, #2
	bne	.L31
	ldr	r3, .L33+8
	ldr	r1, [r10]
	ldr	r2, [r3]
	tst	r1, r2
	beq	.L11
	ldr	r3, [fp, #-80]
	mov	r0, #512
	ldr	r3, [r3, r6, lsl #2]
	ldr	r1, .L33
	str	r3, [fp, #-84]
	bl	i915_prandom_u32_max_state
	ldr	r3, [fp, #-84]
	str	r0, [r3]
	b	.L11
.L29:
	ldr	r0, [r6, r4, lsl #2]
	bl	PTR_ERR
	subs	r7, r4, #1
	mov	r10, r0
	beq	.L5
	sub	r4, r4, #-1073741823
	add	r6, r6, r4, lsl #2
.L6:
	ldr	r0, [r6], #-4
	bl	i915_gem_context_put
	subs	r7, r7, #1
	bne	.L6
.L5:
	mov	r1, r9
	ldr	r0, [r5]
	bl	mock_file_free
.L1:
	ldr	r3, .L33+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L32
	mov	r0, r10
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	mov	r0, r9
	bl	PTR_ERR
	mov	r10, r0
	b	.L1
.L30:
	ldr	r9, [fp, #-88]
	ldr	r10, [fp, #-92]
.L12:
	mov	r4, #0
	sub	r6, fp, #76
	b	.L10
.L15:
	ldr	r0, [r6, #4]!
	bl	active_request_put
	cmp	r10, #0
	moveq	r10, r0
	add	r4, r4, #1
.L10:
	sub	r0, fp, #72
	bl	ARRAY_SIZE
	cmp	r4, r0
	bcc	.L15
	b	.L5
.L31:
	ldr	r0, [r5]
	ldr	r9, [fp, #-88]
	bl	mutex_unlock
	mov	r0, r7
	bl	PTR_ERR
	mov	r10, r0
	b	.L12
.L18:
	mov	r10, r0
	ldr	r9, [fp, #-88]
	b	.L12
.L32:
	bl	__stack_chk_fail
.L34:
	.align	2
.L33:
	.word	prng
	.word	.LC0
	.word	TEST_PRIORITY
	.size	active_engine, .-active_engine
	.comm	prng,4,4
	.comm	TEST_PRIORITY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
