	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emulate_execlist_ctx_schedule_out
_emulate_execlist_ctx_schedule_out:     ## @emulate_execlist_ctx_schedule_out
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r13
	movq	16(%rdi), %rax
	movq	(%rax), %r12
	leaq	-64(%rbp), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	(%r14), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_gvt_dbg_el
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_same_context
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%r14), %rsi
	movq	(%rbx), %rax
	movq	(%rax), %rdx
	leaq	L_.str.1(%rip), %rdi
	callq	_gvt_vgpu_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_15:
	subl	(%rax), %r15d
	jmp	LBB0_16
LBB0_2:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	leaq	8(%r12), %r13
	movq	%r13, %rdi
	callq	_valid_context
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_same_context
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_gvt_dbg_el
	movq	%r13, (%rbx)
	movq	%rbx, %rdi
	callq	_emulate_execlist_status
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -64(%rbp)
	movq	(%r14), %rax
	movq	%rax, -48(%rbp)
	leaq	-64(%rbp), %rsi
	jmp	LBB0_11
LBB0_5:
	movq	%r13, %rdi
	callq	_valid_context
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	movq	%r13, %rdi
	callq	_valid_context
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_same_context
	testq	%rax, %rax
	jne	LBB0_9
LBB0_14:
	movl	$1, %edi
	callq	_WARN_ON
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_15
LBB0_6:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_same_context
	testq	%rax, %rax
	je	LBB0_7
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_gvt_dbg_el
	movq	%rbx, %rdi
	callq	_switch_virtual_execlist_slot
	movq	%rbx, %rdi
	callq	_emulate_execlist_status
	movl	$1, -56(%rbp)
	movl	$1, -64(%rbp)
	movq	(%r14), %rax
	movq	%rax, -48(%rbp)
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_10
## %bb.13:
	leaq	-64(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_emulate_csb_update
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	$1, -52(%rbp)
	movq	$0, -48(%rbp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	jmp	LBB0_12
LBB0_10:
	leaq	-64(%rbp), %rsi
	xorl	%r15d, %r15d
LBB0_11:
	movq	%rbx, %rdi
LBB0_12:
	xorl	%edx, %edx
	callq	_emulate_csb_update
LBB0_16:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"schedule out context id %x\n"

L_.str.1:                               ## @.str.1
	.asciz	"schedule out context is not running context,ctx id %x running ctx id %x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"ctx 1 valid, ctx/ctx 0 is scheduled-out\n"

L_.str.3:                               ## @.str.3
	.asciz	"need to switch virtual execlist slot\n"

	.no_dead_strip	_emulate_execlist_ctx_schedule_out
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emulate_execlist_ctx_schedule_out
_emulate_execlist_ctx_schedule_out:     ; @emulate_execlist_ctx_schedule_out
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
	ldp	x23, x8, [x0, #8]
	ldr	x21, [x8]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	x8, [x20]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_gvt_dbg_el
	ldr	x1, [x19]
	mov	x0, x20
	bl	_same_context
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x1, [x20]
	ldr	x8, [x19]
	ldr	x2, [x8]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_gvt_vgpu_err
LBB0_2:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_3:
	add	x22, x21, #8
	mov	x0, x22
	bl	_valid_context
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x21
	mov	x1, x20
	bl	_same_context
	cbz	x0, LBB0_6
; %bb.5:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_gvt_dbg_el
	str	x22, [x19]
	mov	x0, x19
	bl	_emulate_execlist_status
	movi.2s	v0, #1
	str	d0, [sp, #8]
	ldr	x8, [x20]
	str	x8, [sp, #24]
	b	LBB0_12
LBB0_6:
	mov	x0, x22
	bl	_valid_context
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x21
	mov	x1, x20
	bl	_same_context
	cbnz	x0, LBB0_10
LBB0_8:
	mov	x0, x22
	bl	_valid_context
	cbz	x0, LBB0_14
; %bb.9:
	mov	x0, x22
	mov	x1, x20
	bl	_same_context
	cbz	x0, LBB0_14
LBB0_10:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_gvt_dbg_el
	mov	x0, x19
	bl	_switch_virtual_execlist_slot
	mov	x0, x19
	bl	_emulate_execlist_status
	mov	w21, #1
	str	w21, [sp, #16]
	str	w21, [sp, #8]
	ldr	x8, [x20]
	str	x8, [sp, #24]
	cbz	x23, LBB0_12
; %bb.11:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_emulate_csb_update
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	str	w21, [sp, #20]
	str	xzr, [sp, #24]
LBB0_12:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	bl	_emulate_csb_update
	mov	w0, #0
LBB0_13:
	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
	add	sp, sp, #96
	ret
LBB0_14:
	mov	w0, #1
	bl	_WARN_ON
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"schedule out context id %x\n"

l_.str.1:                               ; @.str.1
	.asciz	"schedule out context is not running context,ctx id %x running ctx id %x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"ctx 1 valid, ctx/ctx 0 is scheduled-out\n"

l_.str.3:                               ; @.str.3
	.asciz	"need to switch virtual execlist slot\n"

	.no_dead_strip	_emulate_execlist_ctx_schedule_out
.subsections_via_symbols
