	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd_handler_mi_batch_buffer_start
_cmd_handler_mi_batch_buffer_start:     ## @cmd_handler_mi_batch_buffer_start
	.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), %rax
	movq	_BATCH_BUFFER_2ND_LEVEL@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	callq	_gvt_vgpu_err
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rdi, %rbx
	xorl	%esi, %esi
	callq	_cmd_val
	movl	%eax, %edi
	callq	_BATCH_BUFFER_2ND_LEVEL_BIT
	movl	%eax, %r14d
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.4:
	movq	(%rbx), %rax
	movq	_BATCH_BUFFER_INSTRUCTION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_6:
	movl	48(%rbx), %eax
	movl	%eax, 52(%rbx)
	movq	%rbx, %rdi
	callq	_addr_type_update_snb
	movq	(%rbx), %rax
	movq	_RING_BUFFER_INSTRUCTION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	24(%rbx), %r14
	movq	%rbx, %rdi
	callq	_cmd_length
	cltq
	leaq	(%r14,%rax,4), %rax
	movq	%rax, 40(%rbx)
	movq	_BATCH_BUFFER_INSTRUCTION@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_10
LBB0_8:
	cmpl	$1, %r14d
	jne	LBB0_10
## %bb.9:
	movq	(%r15), %rax
	movq	%rax, (%rbx)
	movq	24(%rbx), %r14
	movq	%rbx, %rdi
	callq	_cmd_length
	cltq
	leaq	(%r14,%rax,4), %rax
	movq	%rax, 32(%rbx)
	movq	8(%rbx), %r14
	movq	%rbx, %rdi
	callq	_cmd_length
	cltq
	leaq	(%r14,%rax,4), %rax
	movq	%rax, 16(%rbx)
LBB0_10:
	movq	%rbx, %rdi
	callq	_batch_buffer_needs_scan
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	callq	_perform_bb_shadow
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	callq	_gvt_vgpu_err
	jmp	LBB0_13
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cmd_handler_mi_batch_buffer_end ## TAILCALL
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_BATCH_BUFFER_2ND_LEVEL,8,3     ## @BATCH_BUFFER_2ND_LEVEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Found MI_BATCH_BUFFER_START in 2nd level BB\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_BATCH_BUFFER_INSTRUCTION,8,3   ## @BATCH_BUFFER_INSTRUCTION
L_.str.1:                               ## @.str.1
	.asciz	"Jumping to 2nd level BB from RB is not allowed\n"

	.comm	_RING_BUFFER_INSTRUCTION,8,3    ## @RING_BUFFER_INSTRUCTION
L_.str.2:                               ## @.str.2
	.asciz	"invalid shadow batch buffer\n"

	.no_dead_strip	_cmd_handler_mi_batch_buffer_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd_handler_mi_batch_buffer_start
_cmd_handler_mi_batch_buffer_start:     ; @cmd_handler_mi_batch_buffer_start
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x21, _BATCH_BUFFER_2ND_LEVEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BATCH_BUFFER_2ND_LEVEL@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_gvt_vgpu_err
Lloh4:
	adrp	x8, _EFAULT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_3:
	mov	x0, x19
	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
LBB0_4:
	mov	x19, x0
	mov	w1, #0
	bl	_cmd_val
	bl	_BATCH_BUFFER_2ND_LEVEL_BIT
	mov	x20, x0
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x19]
Lloh7:
	adrp	x9, _BATCH_BUFFER_INSTRUCTION@GOTPAGE
Lloh8:
	ldr	x9, [x9, _BATCH_BUFFER_INSTRUCTION@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
LBB0_6:
	ldr	w8, [x19, #48]
	str	w8, [x19, #52]
	mov	x0, x19
	bl	_addr_type_update_snb
	ldr	x8, [x19]
Lloh10:
	adrp	x9, _RING_BUFFER_INSTRUCTION@GOTPAGE
Lloh11:
	ldr	x9, [x9, _RING_BUFFER_INSTRUCTION@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	x20, [x19, #24]
	mov	x0, x19
	bl	_cmd_length
	add	x8, x20, w0, sxtw #2
	str	x8, [x19, #40]
Lloh13:
	adrp	x8, _BATCH_BUFFER_INSTRUCTION@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BATCH_BUFFER_INSTRUCTION@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_10
LBB0_8:
	cmp	w20, #1
	b.ne	LBB0_10
; %bb.9:
	ldr	x8, [x21]
	str	x8, [x19]
	ldr	x20, [x19, #24]
	mov	x0, x19
	bl	_cmd_length
	add	x8, x20, w0, sxtw #2
	str	x8, [x19, #32]
	ldr	x20, [x19, #8]
	mov	x0, x19
	bl	_cmd_length
	add	x8, x20, w0, sxtw #2
	str	x8, [x19, #16]
LBB0_10:
	mov	x0, x19
	bl	_batch_buffer_needs_scan
	cbz	x0, LBB0_13
; %bb.11:
	mov	x0, x19
	bl	_perform_bb_shadow
	mov	x19, x0
	tbz	w0, #31, LBB0_3
; %bb.12:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_gvt_vgpu_err
	b	LBB0_3
LBB0_13:
	mov	x0, x19
	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
	b	_cmd_handler_mi_batch_buffer_end
LBB0_14:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_BATCH_BUFFER_2ND_LEVEL,8,3     ; @BATCH_BUFFER_2ND_LEVEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Found MI_BATCH_BUFFER_START in 2nd level BB\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_BATCH_BUFFER_INSTRUCTION,8,3   ; @BATCH_BUFFER_INSTRUCTION
l_.str.1:                               ; @.str.1
	.asciz	"Jumping to 2nd level BB from RB is not allowed\n"

	.comm	_RING_BUFFER_INSTRUCTION,8,3    ; @RING_BUFFER_INSTRUCTION
l_.str.2:                               ; @.str.2
	.asciz	"invalid shadow batch buffer\n"

	.no_dead_strip	_cmd_handler_mi_batch_buffer_start
.subsections_via_symbols
