	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function active_engine
_active_engine:                         ## @active_engine
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_prng@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_RND_STATE
	movq	8(%r15), %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	leaq	-112(%rbp), %rdi
	callq	_ARRAY_SIZE
	movq	%rsp, %r12
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	(%rbx), %rdi
	callq	_mock_file
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_25
LBB0_2:
	movq	%r15, -144(%rbp)                ## 8-byte Spill
	movq	%r12, -120(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	xorl	%r15d, %r15d
	testq	%rax, %rax
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	movq	%r14, -136(%rbp)                ## 8-byte Spill
	je	LBB0_6
## %bb.3:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	callq	_mutex_lock
	movq	(%rbx), %rdi
	movq	%r14, %rsi
	callq	_live_context
	movq	%rax, (%r13,%r12,8)
	movq	(%rbx), %rdi
	callq	_mutex_unlock
	movq	(%r13,%r12,8), %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r12
	jb	LBB0_4
	jmp	LBB0_7
LBB0_6:
	xorl	%r12d, %r12d
LBB0_7:
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testl	%eax, %eax
	jne	LBB0_20
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-112(%rbp), %rdi
	callq	_ARRAY_SIZE
	movq	%rax, %r15
	decl	%r15d
	andl	%r12d, %r15d
	movq	-112(%rbp,%r15,8), %rax
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	movq	(%rbx), %rdi
	callq	_mutex_lock
	movq	(%r13,%r15,8), %rdi
	movq	%rbx, %rsi
	callq	_igt_request_alloc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_18
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_TEST_PRIORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-144(%rbp), %rcx                ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	$512, %edi                      ## imm = 0x200
	movq	_prng@GOTPCREL(%rip), %rsi
	callq	_i915_prandom_u32_max_state
	movq	(%r13,%r15,8), %rcx
	movl	%eax, (%rcx)
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	callq	_i915_request_get
	movq	%rax, -112(%rbp,%r15,8)
	movq	%r14, %rdi
	callq	_i915_request_add
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_mutex_unlock
	movq	-152(%rbp), %rdi                ## 8-byte Reload
	callq	_active_request_put
	testl	%eax, %eax
	jne	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_cond_resched
	xorl	%eax, %eax
	callq	_kthread_should_stop
	incq	%r12
	testl	%eax, %eax
	je	LBB0_8
	jmp	LBB0_20
LBB0_13:
	movq	(%r13,%r12,8), %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	cmpq	$1, %r12
	je	LBB0_23
## %bb.15:
	decq	%r12
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%r12,8), %rdi
	callq	_i915_gem_context_put
	decq	%r12
	jne	LBB0_16
	jmp	LBB0_23
LBB0_18:
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_PTR_ERR
LBB0_19:
	movl	%eax, %r15d
LBB0_20:
	leaq	-112(%rbp), %rdi
	callq	_ARRAY_SIZE
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	xorl	%ebx, %ebx
	leaq	-112(%rbp), %r14
	movq	-120(%rbp), %r12                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	-112(%rbp,%rbx,8), %rdi
	callq	_active_request_put
	testl	%r15d, %r15d
	cmovel	%eax, %r15d
	incq	%rbx
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %rbx
	jb	LBB0_22
	jmp	LBB0_24
LBB0_23:
	movq	-120(%rbp), %r12                ## 8-byte Reload
LBB0_24:
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rdi
	movq	-136(%rbp), %rsi                ## 8-byte Reload
	callq	_mock_file_free
LBB0_25:
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_prng,4,2                       ## @prng
	.comm	_TEST_PRIORITY,4,2              ## @TEST_PRIORITY
	.no_dead_strip	_active_engine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function active_engine
_active_engine:                         ; @active_engine
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #80
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _prng@GOTPAGE
Lloh4:
	ldr	x8, [x8, _prng@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_I915_RND_STATE
	ldr	x19, [x21, #8]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x29, #-128]
	stp	q0, q0, [x29, #-160]
	sub	x0, x29, #160
	bl	_ARRAY_SIZE
	mov	x26, sp
	lsl	x8, x0, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xfffffffffffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	x0, [x19]
	bl	_mock_file
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x23, x0
	b	LBB0_21
LBB0_2:
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x27, #0
	cbz	x0, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	bl	_mutex_lock
	ldr	x0, [x19]
	mov	x1, x20
	bl	_live_context
	lsl	x23, x27, #3
	str	x0, [x22, x23]
	ldr	x0, [x19]
	bl	_mutex_unlock
	ldr	x0, [x22, x23]
	bl	_IS_ERR
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x27, x27, #1
	mov	x0, x22
	bl	_ARRAY_SIZE
	cmp	x27, x0
	b.lo	LBB0_3
LBB0_5:
	bl	_kthread_should_stop
	cbz	w0, LBB0_9
LBB0_6:
	mov	w23, #0
	b	LBB0_17
LBB0_7:
	ldr	x0, [x22, x27, lsl #3]
	bl	_PTR_ERR
	mov	x23, x0
	subs	x21, x27, #1
	b.eq	LBB0_20
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22, x21, lsl #3]
	bl	_i915_gem_context_put
	subs	x21, x21, #1
	b.ne	LBB0_8
	b	LBB0_20
LBB0_9:
	sub	x28, x29, #160
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sub	x0, x29, #160
	bl	_ARRAY_SIZE
	sub	w8, w0, #1
	and	w24, w27, w8
	lsl	x25, x24, #3
	ldr	x23, [x28, x25]
	ldr	x0, [x19]
	bl	_mutex_lock
	ldr	x0, [x22, x25]
	mov	x1, x19
	bl	_igt_request_alloc
	mov	x25, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x21]
Lloh8:
	adrp	x9, _TEST_PRIORITY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TEST_PRIORITY@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w0, #512
Lloh11:
	adrp	x1, _prng@GOTPAGE
Lloh12:
	ldr	x1, [x1, _prng@GOTPAGEOFF]
	bl	_i915_prandom_u32_max_state
	ldr	x8, [x22, x24, lsl #3]
	str	w0, [x8]
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x25
	bl	_i915_request_get
	str	x0, [x28, x24, lsl #3]
	mov	x0, x25
	bl	_i915_request_add
	ldr	x0, [x19]
	bl	_mutex_unlock
	mov	x0, x23
	bl	_active_request_put
	cbnz	w0, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	bl	_cond_resched
	bl	_kthread_should_stop
	add	x27, x27, #1
	cbz	w0, LBB0_10
	b	LBB0_6
LBB0_15:
	ldr	x0, [x19]
	bl	_mutex_unlock
	mov	x0, x25
	bl	_PTR_ERR
LBB0_16:
	mov	x23, x0
LBB0_17:
	sub	x21, x29, #160
	sub	x0, x29, #160
	bl	_ARRAY_SIZE
	cbz	x0, LBB0_20
; %bb.18:
	mov	x22, #0
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21, x22, lsl #3]
	bl	_active_request_put
	cmp	w23, #0
	csel	w23, w0, w23, eq
	add	x22, x22, #1
	sub	x0, x29, #160
	bl	_ARRAY_SIZE
	cmp	x22, x0
	b.lo	LBB0_19
LBB0_20:
	ldr	x0, [x19]
	mov	x1, x20
	bl	_mock_file_free
LBB0_21:
	mov	sp, x26
	ldur	x8, [x29, #-88]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
	mov	x0, x23
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_prng,4,2                       ; @prng
	.comm	_TEST_PRIORITY,4,2              ; @TEST_PRIORITY
	.no_dead_strip	_active_engine
.subsections_via_symbols
