	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function switch_to_kernel_context
_switch_to_kernel_context:              ## @switch_to_kernel_context
	.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), %rax
	movl	$1, %r12d
	cmpq	8(%rdi), %rax
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_intel_gt_is_wedged
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movl	16(%rbx), %edi
	callq	___timeline_mark_lock
	movq	%rax, %r14
	movl	16(%rbx), %edi
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	___i915_request_create
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	movl	$1, %r12d
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movl	4(%r15), %edi
	callq	_intel_timeline_enter
	movq	8(%rbx), %rax
	incq	%rax
	movq	%rax, (%rbx)
	movq	%r15, %rdi
	callq	_i915_request_add_active_barriers
	movq	_I915_PRIORITY_UNPREEMPTABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	___i915_request_commit
	leaq	20(%rbx), %rdi
	callq	___intel_wakeref_defer_park
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	___i915_request_queue
LBB0_4:
	movl	16(%rbx), %edi
	movq	%r14, %rsi
	callq	___timeline_mark_unlock
LBB0_5:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.comm	_I915_PRIORITY_UNPREEMPTABLE,4,2 ## @I915_PRIORITY_UNPREEMPTABLE
	.no_dead_strip	_switch_to_kernel_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function switch_to_kernel_context
_switch_to_kernel_context:              ; @switch_to_kernel_context
	.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
	ldp	x8, x9, [x0]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_intel_gt_is_wedged
	cbz	x0, LBB0_4
LBB0_2:
	mov	w21, #1
LBB0_3:
	mov	x0, x21
	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_4:
	ldr	w0, [x19, #16]
	bl	___timeline_mark_lock
	mov	x20, x0
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	___i915_request_create
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:
	mov	w21, #1
	b	LBB0_7
LBB0_6:
	ldr	w0, [x21, #4]
	bl	_intel_timeline_enter
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19]
	mov	x0, x21
	bl	_i915_request_add_active_barriers
Lloh3:
	adrp	x8, _I915_PRIORITY_UNPREEMPTABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I915_PRIORITY_UNPREEMPTABLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x21]
	mov	x0, x21
	bl	___i915_request_commit
	add	x0, x19, #20
	bl	___intel_wakeref_defer_park
	mov	x0, x21
	mov	x1, #0
	bl	___i915_request_queue
	mov	w21, #0
LBB0_7:
	ldr	w0, [x19, #16]
	mov	x1, x20
	bl	___timeline_mark_unlock
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.comm	_I915_PRIORITY_UNPREEMPTABLE,4,2 ; @I915_PRIORITY_UNPREEMPTABLE
	.no_dead_strip	_switch_to_kernel_context
.subsections_via_symbols
