	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_gvt_scan_and_shadow_workload ## -- Begin function intel_gvt_scan_and_shadow_workload
	.p2align	4, 0x90
_intel_gvt_scan_and_shadow_workload:    ## @intel_gvt_scan_and_shadow_workload
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %r15
	movq	(%r15), %rax
	movq	(%rax), %rdi
	callq	_lockdep_assert_held
	xorl	%ebx, %ebx
	cmpl	$0, (%r14)
	jne	LBB0_9
## %bb.1:
	movq	8(%r14), %rdi
	movl	16(%r15), %esi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	8(%r15), %rax
	movq	8(%r14), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	%r14, %rsi
	callq	_shadow_context_descriptor_update
LBB0_3:
	movq	%r14, %rdi
	callq	_intel_gvt_scan_and_shadow_ringbuffer
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	8(%r14), %rax
	movq	_RCS0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	cmpq	$0, 16(%r14)
	je	LBB0_7
## %bb.6:
	leaq	16(%r14), %r15
	movq	%r15, %rdi
	callq	_intel_gvt_scan_and_shadow_wa_ctx
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_release_shadow_wa_ctx
	jmp	LBB0_9
LBB0_7:
	movl	$1, (%r14)
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCS0,8,3                       ## @RCS0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_gvt_scan_and_shadow_workload ; -- Begin function intel_gvt_scan_and_shadow_workload
	.p2align	2
_intel_gvt_scan_and_shadow_workload:    ; @intel_gvt_scan_and_shadow_workload
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x20, [x0, #24]
	ldr	x8, [x20]
	ldr	x0, [x8]
	bl	_lockdep_assert_held
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_10
LBB0_2:
	ldr	x0, [x19, #8]
	ldr	w1, [x20, #16]
	bl	_test_and_set_bit
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	x9, [x19, #8]
	ldr	w0, [x8, x9, lsl #2]
	mov	x1, x19
	bl	_shadow_context_descriptor_update
LBB0_4:
	mov	x0, x19
	bl	_intel_gvt_scan_and_shadow_ringbuffer
	mov	x20, x0
	cbnz	w0, LBB0_10
; %bb.5:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _RCS0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RCS0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.6:
	mov	x21, x19
	ldr	x8, [x21, #16]!
	cbz	x8, LBB0_9
; %bb.7:
	mov	x0, x21
	bl	_intel_gvt_scan_and_shadow_wa_ctx
	cbz	w0, LBB0_9
; %bb.8:
	mov	x20, x0
	mov	x0, x21
	bl	_release_shadow_wa_ctx
	b	LBB0_10
LBB0_9:
	mov	w20, #0
	mov	w8, #1
	str	w8, [x19]
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RCS0,8,3                       ; @RCS0
.subsections_via_symbols
