	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_bb_size
_find_bb_size:                          ## @find_bb_size
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	_GTT_BUFFER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	24(%r13), %rax
	addq	$8, %rax
	jmp	LBB0_3
LBB0_2:
	movq	8(%r13), %rax
LBB0_3:
	movq	(%rax), %r14
	movq	$0, (%r15)
	movq	$0, (%rbx)
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_get_gma_bb_from_cmd
	movq	%rax, %r12
	movq	_INTEL_GVT_INVALID_ADDR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_6
LBB0_4:
	movq	_EFAULT@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_17
LBB0_6:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_cmd_val
	movq	%rax, %rbx
	movq	%rax, -48(%rbp)
	movq	24(%r13), %rax
	movl	(%rax), %edi
	movl	16(%r13), %edx
	movq	%rbx, %rsi
	callq	_get_cmd_info
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	16(%r13), %esi
	movq	%rbx, %rdi
	callq	_get_opcode
	movq	_PPGTT_BUFFER@GOTPCREL(%rip), %rcx
	movq	(%r13), %rdx
	movq	8(%r13), %r9
	cmpq	(%rcx), %rdx
	leaq	L_.str.1(%rip), %rdx
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rdx, %rcx
	movl	16(%r13), %r8d
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_gvt_vgpu_err
	movq	_EBADRQC@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r15), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%r14d, %r14d
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_get_cmd_length
	shll	$2, %eax
	cltq
	addq	%rax, (%r15)
	addq	%rax, %r12
	testb	%r14b, %r14b
	je	LBB0_16
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rdi
	leaq	4(%r12), %rcx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	leaq	-48(%rbp), %r8
	callq	_copy_gma_to_hva
	testq	%rax, %rax
	js	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	24(%r13), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi
	movl	16(%r13), %edx
	callq	_get_cmd_info
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_OP_MI_BATCH_BUFFER_END@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movb	$1, %r14b
	movq	_OP_MI_BATCH_BUFFER_START@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rdi
	callq	_BATCH_BUFFER_2ND_LEVEL_BIT
	testq	%rax, %rax
	jne	LBB0_15
	jmp	LBB0_14
LBB0_16:
	xorl	%r14d, %r14d
LBB0_17:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	-48(%rbp), %rbx
	movl	16(%r13), %esi
	movq	%rbx, %rdi
	callq	_get_opcode
	movq	_PPGTT_BUFFER@GOTPCREL(%rip), %rcx
	movq	(%r13), %rdx
	movq	8(%r13), %r9
	cmpq	(%rcx), %rdx
	leaq	L_.str.1(%rip), %rdx
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rdx, %rcx
	movl	16(%r13), %r8d
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_gvt_vgpu_err
	movq	_EBADRQC@GOTPCREL(%rip), %rax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_GTT_BUFFER,8,3                 ## @GTT_BUFFER
	.comm	_INTEL_GVT_INVALID_ADDR,8,3     ## @INTEL_GVT_INVALID_ADDR
	.comm	_EFAULT,4,2                     ## @EFAULT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown cmd 0x%x, opcode=0x%x, addr_type=%s, ring %d, workload=%p\n"

	.comm	_PPGTT_BUFFER,8,3               ## @PPGTT_BUFFER
L_.str.1:                               ## @.str.1
	.asciz	"ppgtt"

L_.str.2:                               ## @.str.2
	.asciz	"ggtt"

	.comm	_EBADRQC,4,2                    ## @EBADRQC
	.comm	_OP_MI_BATCH_BUFFER_END,8,3     ## @OP_MI_BATCH_BUFFER_END
	.comm	_OP_MI_BATCH_BUFFER_START,8,3   ## @OP_MI_BATCH_BUFFER_START
	.no_dead_strip	_find_bb_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_bb_size
_find_bb_size:                          ; @find_bb_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _GTT_BUFFER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GTT_BUFFER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #24]
	add	x8, x8, #8
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
LBB0_3:
	ldr	x22, [x8]
	str	xzr, [x21]
	str	xzr, [x20]
	mov	x0, x19
	mov	w1, #1
	bl	_get_gma_bb_from_cmd
Lloh3:
	adrp	x8, _INTEL_GVT_INVALID_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INTEL_GVT_INVALID_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_19
LBB0_5:
	mov	x23, x0
	mov	x0, x19
	mov	w1, #0
	bl	_cmd_val
	mov	x24, x0
	str	x0, [sp, #8]
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	ldr	w2, [x19, #16]
	mov	x1, x24
	bl	_get_cmd_info
	cbz	x0, LBB0_15
; %bb.6:
Lloh8:
	adrp	x25, _OP_MI_BATCH_BUFFER_END@GOTPAGE
Lloh9:
	ldr	x25, [x25, _OP_MI_BATCH_BUFFER_END@GOTPAGEOFF]
Lloh10:
	adrp	x26, _OP_MI_BATCH_BUFFER_START@GOTPAGE
Lloh11:
	ldr	x26, [x26, _OP_MI_BATCH_BUFFER_START@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	w27, #0
	ldr	x8, [x21]
	str	x8, [x20]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x1, [sp, #8]
	mov	x0, x24
	bl	_get_cmd_length
	lsl	w8, w0, #2
	sxtw	x8, w8
	ldr	x9, [x21]
	add	x9, x9, x8
	str	x9, [x21]
	add	x23, x23, x8
	tbz	w27, #0, LBB0_16
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #24]
	add	x3, x23, #4
	add	x4, sp, #8
	mov	x1, x22
	mov	x2, x23
	bl	_copy_gma_to_hva
	tbnz	x0, #63, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	ldr	x1, [sp, #8]
	ldr	w2, [x19, #16]
	bl	_get_cmd_info
	cbz	x0, LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x24, x0
	ldr	x8, [x0]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x0, [sp, #8]
	bl	_BATCH_BUFFER_2ND_LEVEL_BIT
	cbz	x0, LBB0_7
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	w27, #1
	b	LBB0_8
LBB0_15:
	ldr	w1, [x19, #16]
	mov	x0, x24
	bl	_get_opcode
	mov	x2, x0
Lloh12:
	adrp	x8, _PPGTT_BUFFER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PPGTT_BUFFER@GOTPAGEOFF]
Lloh14:
	adrp	x9, l_.str.2@PAGE
Lloh15:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh16:
	adrp	x10, l_.str.1@PAGE
Lloh17:
	add	x10, x10, l_.str.1@PAGEOFF
Lloh18:
	ldr	x8, [x8]
	ldp	x11, x5, [x19]
	cmp	x11, x8
	csel	x3, x10, x9, eq
	ldr	w4, [x19, #16]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x24
	b	LBB0_18
LBB0_16:
	mov	w0, #0
	b	LBB0_20
LBB0_17:
	ldr	x20, [sp, #8]
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_get_opcode
	mov	x2, x0
Lloh21:
	adrp	x8, _PPGTT_BUFFER@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PPGTT_BUFFER@GOTPAGEOFF]
Lloh23:
	adrp	x9, l_.str.2@PAGE
Lloh24:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh25:
	adrp	x10, l_.str.1@PAGE
Lloh26:
	add	x10, x10, l_.str.1@PAGEOFF
Lloh27:
	ldr	x8, [x8]
	ldp	x11, x5, [x19]
	cmp	x11, x8
	csel	x3, x10, x9, eq
	ldr	w4, [x19, #16]
Lloh28:
	adrp	x0, l_.str@PAGE
Lloh29:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
LBB0_18:
	bl	_gvt_vgpu_err
Lloh30:
	adrp	x8, _EBADRQC@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EBADRQC@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh18
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_GTT_BUFFER,8,3                 ; @GTT_BUFFER
	.comm	_INTEL_GVT_INVALID_ADDR,8,3     ; @INTEL_GVT_INVALID_ADDR
	.comm	_EFAULT,4,2                     ; @EFAULT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown cmd 0x%x, opcode=0x%x, addr_type=%s, ring %d, workload=%p\n"

	.comm	_PPGTT_BUFFER,8,3               ; @PPGTT_BUFFER
l_.str.1:                               ; @.str.1
	.asciz	"ppgtt"

l_.str.2:                               ; @.str.2
	.asciz	"ggtt"

	.comm	_EBADRQC,4,2                    ; @EBADRQC
	.comm	_OP_MI_BATCH_BUFFER_END,8,3     ; @OP_MI_BATCH_BUFFER_END
	.comm	_OP_MI_BATCH_BUFFER_START,8,3   ; @OP_MI_BATCH_BUFFER_START
	.no_dead_strip	_find_bb_size
.subsections_via_symbols
