	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vgpu_get_plane_info
_vgpu_get_plane_info:                   ## @vgpu_get_plane_info
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdx, %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	_DRM_PLANE_TYPE_PRIMARY@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_5
## %bb.1:
	leaq	-88(%rbp), %rsi
	movq	%r14, %rdi
	callq	_intel_vgpu_decode_primary_plane
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_24
## %bb.2:
	movl	-88(%rbp), %eax
	movl	%eax, (%r15)
	movl	-64(%rbp), %eax
	movl	%eax, 60(%r15)
	movl	-84(%rbp), %eax
	movl	%eax, 4(%r15)
	movl	-68(%rbp), %eax
	movl	%eax, 16(%r15)
	movl	-80(%rbp), %eax
	movl	%eax, 8(%r15)
	movl	-72(%rbp), %eax
	movl	%eax, 56(%r15)
	movl	-76(%rbp), %esi
	leal	-128(%rsi), %eax
	cmpl	$3, %eax
	ja	LBB0_10
## %bb.3:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	_I915_FORMAT_MOD_Yf_TILED@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	movq	_DRM_PLANE_TYPE_CURSOR@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_9
## %bb.6:
	leaq	-88(%rbp), %rsi
	movq	%r14, %rdi
	callq	_intel_vgpu_decode_cursor_plane
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_24
## %bb.7:
	movl	-88(%rbp), %eax
	movl	%eax, (%r15)
	movl	-40(%rbp), %eax
	movl	%eax, 60(%r15)
	movl	-84(%rbp), %eax
	movl	%eax, 4(%r15)
	movl	-44(%rbp), %ecx
	movl	%ecx, 16(%r15)
	movl	-80(%rbp), %ecx
	leal	7(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$3, %edx
	imull	%eax, %edx
	movl	%edx, 8(%r15)
	movl	-48(%rbp), %eax
	movl	%eax, 56(%r15)
	movq	$0, 48(%r15)
	movl	-52(%rbp), %eax
	movl	%eax, 44(%r15)
	movl	-56(%rbp), %eax
	movl	%eax, 40(%r15)
	leaq	-88(%rbp), %rdi
	callq	_validate_hotspot
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	movups	-72(%rbp), %xmm0
	movups	%xmm0, 24(%r15)
	jmp	LBB0_16
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_gvt_vgpu_err
	jmp	LBB0_22
LBB0_10:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_gvt_vgpu_err
	jmp	LBB0_16
LBB0_11:
	movq	_I915_FORMAT_MOD_Y_TILED@GOTPCREL(%rip), %rax
LBB0_12:
	movq	(%rax), %rax
	movq	%rax, 48(%r15)
	movl	$32, %esi
	jmp	LBB0_17
LBB0_13:
	movq	_I915_FORMAT_MOD_X_TILED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r15)
	movl	$8, %esi
	jmp	LBB0_17
LBB0_14:
	movq	_DRM_FORMAT_MOD_LINEAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r15)
	jmp	LBB0_16
LBB0_15:
	movq	_UINT_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r15)
	movq	%rax, 24(%r15)
LBB0_16:
	movl	$1, %esi
LBB0_17:
	movl	8(%r15), %ebx
	movl	16(%r15), %edi
	callq	_roundup
	imull	%ebx, %eax
	movl	%eax, 12(%r15)
	testl	%eax, %eax
	je	LBB0_21
## %bb.18:
	movl	(%r15), %esi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	decl	%ecx
	testl	%esi, %ecx
	je	LBB0_25
## %bb.19:
	leaq	L_.str.3(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_gvt_vgpu_err
LBB0_20:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_21:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_gvt_vgpu_err
LBB0_22:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_23:
	subl	(%rax), %r12d
LBB0_24:
	movl	%r12d, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_intel_gvt_ggtt_validate_range
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jne	LBB0_24
## %bb.26:
	leaq	L_.str.4(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_gvt_vgpu_err
	jmp	LBB0_20
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_11
	.long	L0_0_set_13
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ## @DRM_PLANE_TYPE_PRIMARY
	.comm	_DRM_FORMAT_MOD_LINEAR,8,3      ## @DRM_FORMAT_MOD_LINEAR
	.comm	_I915_FORMAT_MOD_X_TILED,8,3    ## @I915_FORMAT_MOD_X_TILED
	.comm	_I915_FORMAT_MOD_Y_TILED,8,3    ## @I915_FORMAT_MOD_Y_TILED
	.comm	_I915_FORMAT_MOD_Yf_TILED,8,3   ## @I915_FORMAT_MOD_Yf_TILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid tiling mode: %x\n"

	.comm	_DRM_PLANE_TYPE_CURSOR,4,2      ## @DRM_PLANE_TYPE_CURSOR
	.comm	_UINT_MAX,8,3                   ## @UINT_MAX
L_.str.1:                               ## @.str.1
	.asciz	"invalid plane id:%d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"fb size is zero\n"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"Not aligned fb address:0x%llx\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
L_.str.4:                               ## @.str.4
	.asciz	"invalid gma addr\n"

	.no_dead_strip	_vgpu_get_plane_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vgpu_get_plane_info
_vgpu_get_plane_info:                   ; @vgpu_get_plane_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x0, x2
	mov	w1, #0
	mov	w2, #64
	bl	_memset
Lloh0:
	adrp	x8, _DRM_PLANE_TYPE_PRIMARY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_PLANE_TYPE_PRIMARY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_5
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	bl	_intel_vgpu_decode_primary_plane
	cbnz	w0, LBB0_24
; %bb.2:
	ldp	w8, w9, [sp, #28]
	ldr	d0, [sp, #8]
	str	d0, [x20]
	str	w8, [x20, #16]
	ldr	w11, [sp, #16]
	ldp	w8, w10, [sp, #20]
	str	w11, [x20, #8]
	stp	w10, w9, [x20, #56]
	sub	w9, w8, #128
	cmp	w9, #3
	b.hi	LBB0_10
; %bb.3:
Lloh3:
	adrp	x8, lJTI0_0@PAGE
Lloh4:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
Lloh5:
	adrp	x8, _I915_FORMAT_MOD_Yf_TILED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I915_FORMAT_MOD_Yf_TILED@GOTPAGEOFF]
	b	LBB0_12
LBB0_5:
Lloh7:
	adrp	x8, _DRM_PLANE_TYPE_CURSOR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DRM_PLANE_TYPE_CURSOR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.6:
	add	x1, sp, #8
	mov	x0, x19
	bl	_intel_vgpu_decode_cursor_plane
	cbnz	w0, LBB0_24
; %bb.7:
	ldp	w9, w8, [sp, #48]
	str	w8, [x20, #16]
	ldp	w11, w8, [sp, #12]
	add	w10, w8, #7
	cmp	w8, #0
	csel	w8, w10, w8, lt
	ldr	w10, [sp, #8]
	stp	w10, w11, [x20]
	asr	w8, w8, #3
	mul	w8, w8, w11
	ldr	w10, [sp, #56]
	str	w8, [x20, #8]
	stp	w9, w10, [x20, #56]
	str	xzr, [x20, #48]
	ldr	d0, [sp, #40]
	str	d0, [x20, #40]
	add	x0, sp, #8
	bl	_validate_hotspot
	cbz	x0, LBB0_15
; %bb.8:
	ldp	x9, x8, [sp, #24]
	stp	x9, x8, [x20, #24]
	b	LBB0_16
LBB0_9:
	str	x21, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_22
LBB0_10:
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_gvt_vgpu_err
	b	LBB0_16
LBB0_11:
Lloh14:
	adrp	x8, _I915_FORMAT_MOD_Y_TILED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _I915_FORMAT_MOD_Y_TILED@GOTPAGEOFF]
LBB0_12:
	ldr	x8, [x8]
	str	x8, [x20, #48]
	mov	w1, #32
	b	LBB0_17
LBB0_13:
Lloh16:
	adrp	x8, _I915_FORMAT_MOD_X_TILED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _I915_FORMAT_MOD_X_TILED@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x20, #48]
	mov	w1, #8
	b	LBB0_17
LBB0_14:
Lloh19:
	adrp	x8, _DRM_FORMAT_MOD_LINEAR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DRM_FORMAT_MOD_LINEAR@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	str	x8, [x20, #48]
	b	LBB0_16
LBB0_15:
Lloh22:
	adrp	x8, _UINT_MAX@GOTPAGE
Lloh23:
	ldr	x8, [x8, _UINT_MAX@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	stp	x8, x8, [x20, #24]
LBB0_16:
	mov	w1, #1
LBB0_17:
	ldr	w21, [x20, #8]
	ldr	w0, [x20, #16]
	bl	_roundup
	mul	w2, w0, w21
	str	w2, [x20, #12]
	cbz	w2, LBB0_21
; %bb.18:
	ldr	w1, [x20]
Lloh25:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	sub	w8, w8, #1
	tst	w8, w1
	b.eq	LBB0_25
; %bb.19:
	str	x1, [sp]
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_20:
	bl	_gvt_vgpu_err
Lloh30:
	adrp	x8, _EFAULT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_23
LBB0_21:
Lloh32:
	adrp	x0, l_.str.2@PAGE
Lloh33:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_22:
	bl	_gvt_vgpu_err
Lloh34:
	adrp	x8, _EINVAL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_24:
	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
	add	sp, sp, #112
	ret
LBB0_25:
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_intel_gvt_ggtt_validate_range
	cbz	w0, LBB0_27
; %bb.26:
	mov	w0, #0
	b	LBB0_24
LBB0_27:
Lloh36:
	adrp	x0, l_.str.4@PAGE
Lloh37:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
	.byte	(LBB0_13-LBB0_4)>>2
	.byte	(LBB0_14-LBB0_4)>>2
                                        ; -- End function
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ; @DRM_PLANE_TYPE_PRIMARY
	.comm	_DRM_FORMAT_MOD_LINEAR,8,3      ; @DRM_FORMAT_MOD_LINEAR
	.comm	_I915_FORMAT_MOD_X_TILED,8,3    ; @I915_FORMAT_MOD_X_TILED
	.comm	_I915_FORMAT_MOD_Y_TILED,8,3    ; @I915_FORMAT_MOD_Y_TILED
	.comm	_I915_FORMAT_MOD_Yf_TILED,8,3   ; @I915_FORMAT_MOD_Yf_TILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid tiling mode: %x\n"

	.comm	_DRM_PLANE_TYPE_CURSOR,4,2      ; @DRM_PLANE_TYPE_CURSOR
	.comm	_UINT_MAX,8,3                   ; @UINT_MAX
l_.str.1:                               ; @.str.1
	.asciz	"invalid plane id:%d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"fb size is zero\n"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"Not aligned fb address:0x%llx\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
l_.str.4:                               ; @.str.4
	.asciz	"invalid gma addr\n"

	.no_dead_strip	_vgpu_get_plane_info
.subsections_via_symbols
