	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_switch_context            ## -- Begin function i915_switch_context
	.p2align	4, 0x90
_i915_switch_context:                   ## @i915_switch_context
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rdi), %rax
	movq	(%rax), %r8
	xorl	%eax, %eax
	cmpq	$0, 8(%r8)
	je	LBB0_1
LBB0_8:
	popq	%rbp
	retq
LBB0_1:
	movq	_RCS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$4, %rcx
	addq	(%r8), %rcx
	cmpq	%rdi, %rcx
	jne	LBB0_8
## %bb.2:
	movq	_DEFAULT_CONTEXT_ID@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_5
## %bb.3:
	movq	(%rdi), %rdi
	jmp	LBB0_4
LBB0_5:
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.9:
	movl	(%rsi), %edi
	movl	%edx, %esi
	callq	_i915_gem_context_get
	movq	%rax, %rdi
	testq	%rax, %rax
	je	LBB0_10
LBB0_4:
	popq	%rbp
	jmp	_do_switch                      ## TAILCALL
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_10:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCS,8,3                        ## @RCS
	.comm	_DEFAULT_CONTEXT_ID,4,2         ## @DEFAULT_CONTEXT_ID
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_switch_context            ; -- Begin function i915_switch_context
	.p2align	2
_i915_switch_context:                   ; @i915_switch_context
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_2
; %bb.1:
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _RCS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RCS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #4
	cmp	x8, x0
	b.eq	LBB0_3
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh3:
	adrp	x8, _DEFAULT_CONTEXT_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEFAULT_CONTEXT_ID@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_5
; %bb.4:
	ldr	x0, [x0]
	b	LBB0_7
LBB0_5:
	cbz	x1, LBB0_8
; %bb.6:
	ldr	w0, [x1]
	mov	x1, x2
	bl	_i915_gem_context_get
	cbz	x0, LBB0_9
LBB0_7:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_do_switch
LBB0_8:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh8:
	adrp	x8, _ENOENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_RCS,8,3                        ; @RCS
	.comm	_DEFAULT_CONTEXT_ID,4,2         ; @DEFAULT_CONTEXT_ID
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
