	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_vgpu_create_ggtt_mm
_intel_vgpu_create_ggtt_mm:             ## @intel_vgpu_create_ggtt_mm
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_vgpu_alloc_mm
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r14
	movq	_INTEL_GVT_MM_GGTT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	(%rbx), %rdi
	callq	_gvt_ggtt_gm_sz
	movq	_I915_GTT_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rax
	movq	(%rbx), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_array_size
	movl	%eax, %edi
	callq	_vzalloc
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	%r14, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	%r14, %rdi
	callq	_vgpu_free_mm
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_INTEL_GVT_MM_GGTT,4,2          ## @INTEL_GVT_MM_GGTT
	.comm	_I915_GTT_PAGE_SHIFT,8,3        ## @I915_GTT_PAGE_SHIFT
	.no_dead_strip	_intel_vgpu_create_ggtt_mm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_vgpu_create_ggtt_mm
_intel_vgpu_create_ggtt_mm:             ; @intel_vgpu_create_ggtt_mm
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_vgpu_alloc_mm
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _INTEL_GVT_MM_GGTT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTEL_GVT_MM_GGTT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #4]
	ldr	x0, [x20]
	bl	_gvt_ggtt_gm_sz
Lloh3:
	adrp	x8, _I915_GTT_PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I915_GTT_PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	lsr	x0, x0, x8
	ldr	x8, [x20]
	ldr	w1, [x8]
	bl	_array_size
	bl	_vzalloc
	str	w0, [x19]
	cbz	w0, LBB0_3
; %bb.2:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x0, x19
	bl	_vgpu_free_mm
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_INTEL_GVT_MM_GGTT,4,2          ; @INTEL_GVT_MM_GGTT
	.comm	_I915_GTT_PAGE_SHIFT,8,3        ; @I915_GTT_PAGE_SHIFT
	.no_dead_strip	_intel_vgpu_create_ggtt_mm
.subsections_via_symbols
