	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_context_vma
_alloc_context_vma:                     ## @alloc_context_vma
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	24(%rdi), %rbx
	movl	16(%rdi), %esi
	movq	%rbx, %rdi
	callq	_i915_gem_object_create_shmem
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.14:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_1:
	movq	%rbx, %rdi
	callq	_IS_IVYBRIDGE
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_I915_CACHE_L3_LLC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_i915_gem_object_set_cache_coherency
LBB0_3:
	cmpq	$0, (%r12)
	je	LBB0_7
## %bb.4:
	movq	_I915_MAP_WB@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_i915_gem_object_pin_map
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.9:
	movq	%r15, %rdi
	jmp	LBB0_10
LBB0_5:
	movq	(%r12), %rdi
	movl	(%rbx), %esi
	callq	_i915_gem_object_pin_map
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.11:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_i915_gem_object_unpin_map
	jmp	LBB0_12
LBB0_6:
	movl	16(%r12), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_memcpy
	movq	(%r12), %rdi
	callq	_i915_gem_object_unpin_map
	movq	%r14, %rdi
	callq	_i915_gem_object_flush_map
	movq	%r14, %rdi
	callq	_i915_gem_object_unpin_map
LBB0_7:
	movq	8(%r12), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_i915_vma_instance
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	%rbx, %rdi
LBB0_10:
	callq	_PTR_ERR
	movl	%eax, %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_i915_gem_object_put
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_13:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_CACHE_L3_LLC,4,2          ## @I915_CACHE_L3_LLC
	.comm	_I915_MAP_WB,4,2                ## @I915_MAP_WB
	.no_dead_strip	_alloc_context_vma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_context_vma
_alloc_context_vma:                     ; @alloc_context_vma
	.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	x20, x0
	ldr	x21, [x0, #24]
	ldr	w1, [x0, #16]
	mov	x0, x21
	bl	_i915_gem_object_create_shmem
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	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	_ERR_CAST
LBB0_2:
	mov	x0, x21
	bl	_IS_IVYBRIDGE
	cbz	x0, LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _I915_CACHE_L3_LLC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_CACHE_L3_LLC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i915_gem_object_set_cache_coherency
LBB0_4:
	ldr	x8, [x20]
	cbz	x8, LBB0_10
; %bb.5:
Lloh3:
	adrp	x22, _I915_MAP_WB@GOTPAGE
Lloh4:
	ldr	x22, [x22, _I915_MAP_WB@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_i915_gem_object_pin_map
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x21
	b	LBB0_12
LBB0_7:
	ldr	x0, [x20]
	ldr	w1, [x22]
	bl	_i915_gem_object_pin_map
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x20, x0
	mov	x0, x19
	bl	_i915_gem_object_unpin_map
	b	LBB0_13
LBB0_9:
	ldr	w2, [x20, #16]
	mov	x0, x21
	mov	x1, x22
	bl	_memcpy
	ldr	x0, [x20]
	bl	_i915_gem_object_unpin_map
	mov	x0, x19
	bl	_i915_gem_object_flush_map
	mov	x0, x19
	bl	_i915_gem_object_unpin_map
LBB0_10:
	ldr	x8, [x20, #8]
	ldr	x1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_i915_vma_instance
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_14
; %bb.11:
	mov	x0, x20
LBB0_12:
	bl	_PTR_ERR
	mov	x20, x0
LBB0_13:
	mov	x0, x19
	bl	_i915_gem_object_put
	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
	b	_ERR_PTR
LBB0_14:
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_CACHE_L3_LLC,4,2          ; @I915_CACHE_L3_LLC
	.comm	_I915_MAP_WB,4,2                ; @I915_MAP_WB
	.no_dead_strip	_alloc_context_vma
.subsections_via_symbols
