	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __execlists_context_pin
___execlists_context_pin:               ## @__execlists_context_pin
	.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	%rsi, %r14
	movq	%rdi, %r12
	xorl	%edi, %edi
	cmpq	$0, (%r12)
	sete	%dil
	callq	_GEM_BUG_ON
	movq	%r12, %rdi
	callq	_intel_context_active_acquire
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	(%r12), %rdi
	callq	_i915_vma_is_pinned
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_GEM_BUG_ON
	movq	(%r12), %rax
	movl	(%rax), %ebx
	movl	(%r14), %edi
	callq	_i915_coherent_map_type
	movq	_I915_MAP_OVERRIDE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_i915_gem_object_pin_map
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_3:
	movl	20(%r12), %edi
	callq	_i915_gem_context_pin_hw_id
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_i915_gem_object_unpin_map
LBB0_6:
	movq	%r12, %rdi
	callq	_intel_context_active_release
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_lrc_descriptor
	movl	%eax, 16(%r12)
	movq	_LRC_STATE_PN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	%rax, %rcx
	addq	%rcx, %r15
	movq	%r15, 8(%r12)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	___execlists_update_reg_state
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_MAP_OVERRIDE,4,2          ## @I915_MAP_OVERRIDE
	.comm	_LRC_STATE_PN,4,2               ## @LRC_STATE_PN
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	___execlists_context_pin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __execlists_context_pin
___execlists_context_pin:               ; @__execlists_context_pin
	.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, x1
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	mov	x0, x19
	bl	_intel_context_active_acquire
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	x0, [x19]
	bl	_i915_vma_is_pinned
	cmp	w0, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	ldr	x8, [x19]
	ldr	w21, [x8]
	ldr	w0, [x20]
	bl	_i915_coherent_map_type
Lloh0:
	adrp	x8, _I915_MAP_OVERRIDE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_MAP_OVERRIDE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w1, w8, w0
	mov	x0, x21
	bl	_i915_gem_object_pin_map
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_5
LBB0_3:
	ldr	w0, [x19, #20]
	bl	_i915_gem_context_pin_hw_id
	mov	x22, x0
	cbz	w0, LBB0_7
; %bb.4:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_i915_gem_object_unpin_map
LBB0_5:
	mov	x0, x19
	bl	_intel_context_active_release
LBB0_6:
	mov	x0, x22
	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_7:
	mov	x0, x19
	mov	x1, x20
	bl	_lrc_descriptor
	str	w0, [x19, #16]
Lloh3:
	adrp	x8, _LRC_STATE_PN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LRC_STATE_PN@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
Lloh6:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh8:
	ldrsw	x9, [x9]
	madd	x8, x9, x8, x21
	str	x8, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	bl	___execlists_update_reg_state
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_MAP_OVERRIDE,4,2          ; @I915_MAP_OVERRIDE
	.comm	_LRC_STATE_PN,4,2               ; @LRC_STATE_PN
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	___execlists_context_pin
.subsections_via_symbols
