	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gru_load_context               ## -- Begin function gru_load_context
	.p2align	4, 0x90
_gru_load_context:                      ## @gru_load_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %r12
	movl	(%rdi), %r15d
	movl	4(%r12), %edi
	movl	%r15d, %esi
	callq	_get_cch
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_lock_cch_handle
	movq	8(%rbx), %rax
	movq	_GRU_OPT_MISS_FMM_POLL@GOTPCREL(%rip), %rcx
	movq	_GRU_OPT_MISS_FMM_INTR@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	xorl	%esi, %esi
	cmpq	%rdx, %rax
	sete	%sil
	cmpq	(%rcx), %rax
	movl	$1, %ecx
	cmovnel	%esi, %ecx
	movl	%ecx, (%r14)
	movl	%esi, 4(%r14)
	cmpq	%rdx, %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_gru_cpu_fault_map_id
	movq	%rax, 24(%rbx)
	movq	%rax, 56(%r14)
LBB0_2:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	%rax, 16(%r14)
	movl	$1, %eax
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	movl	%eax, 8(%r14)
	movl	$0, 24(%r14)
	movl	32(%rbx), %eax
	movl	%eax, 68(%r14)
	movl	36(%rbx), %eax
	movl	%eax, 64(%r14)
	movq	%rbx, %rdi
	callq	_is_kernel_context
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 24(%r14)
	movl	$1, 32(%r14)
	movq	$0, 56(%r14)
	jmp	LBB0_8
LBB0_7:
	movq	$0, 24(%r14)
	movl	$0, 32(%r14)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_gru_load_mm_tracker
                                        ## kill: def $eax killed $eax def $rax
	movq	40(%r14), %rdx
	movq	48(%r14), %rcx
	movl	%eax, (%rdx)
	movl	56(%rbx), %esi
	movl	%esi, (%rcx)
	leal	1(%rax), %esi
	movl	%esi, 4(%rdx)
	movl	56(%rbx), %esi
	movl	%esi, 4(%rcx)
	leal	2(%rax), %esi
	movl	%esi, 8(%rdx)
	movl	56(%rbx), %esi
	movl	%esi, 8(%rcx)
	leal	3(%rax), %esi
	movl	%esi, 12(%rdx)
	movl	56(%rbx), %esi
	movl	%esi, 12(%rcx)
	leal	4(%rax), %esi
	movl	%esi, 16(%rdx)
	movl	56(%rbx), %esi
	movl	%esi, 16(%rcx)
	leal	5(%rax), %esi
	movl	%esi, 20(%rdx)
	movl	56(%rbx), %esi
	movl	%esi, 20(%rcx)
	leal	6(%rax), %esi
	movl	%esi, 24(%rdx)
	movl	56(%rbx), %esi
	movl	%esi, 24(%rcx)
	addl	$7, %eax
	movl	%eax, 28(%rdx)
	movl	56(%rbx), %eax
	movl	%eax, 28(%rcx)
LBB0_8:
	movq	%r14, %rdi
	callq	_cch_allocate
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	_grudev@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	32(%rbx), %r10d
	movl	36(%rbx), %r9d
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	movq	%r14, %rcx
	movq	%rbx, %r8
	xorl	%eax, %eax
	pushq	%r10
	callq	_gru_dbg
	addq	$16, %rsp
	xorl	%eax, %eax
	callq	_BUG
LBB0_10:
	movl	52(%rbx), %edi
	movl	4(%r12), %esi
	movl	32(%rbx), %r8d
	movl	36(%rbx), %ecx
	movl	48(%rbx), %r9d
	movl	%r15d, %edx
	callq	_gru_load_context_data
	movq	%r14, %rdi
	callq	_cch_start
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	callq	_BUG
LBB0_12:
	movq	%r14, %rdi
	callq	_unlock_cch_handle
	movq	_grudev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	40(%rbx), %rax
	movl	(%rax), %edx
	movl	36(%rbx), %r8d
	movl	32(%rbx), %r9d
	movq	8(%rbx), %rax
	xorl	%r10d, %r10d
	cmpq	(%r13), %rax
	sete	%r10b
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	pushq	24(%rbx)
	pushq	%r10
	callq	_gru_dbg
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRU_OPT_MISS_FMM_POLL,8,3      ## @GRU_OPT_MISS_FMM_POLL
	.comm	_GRU_OPT_MISS_FMM_INTR,8,3      ## @GRU_OPT_MISS_FMM_INTR
	.comm	_grudev,4,2                     ## @grudev
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"err %d: cch %p, gts %p, cbr 0x%lx, dsr 0x%lx\n"

L_.str.1:                               ## @.str.1
	.asciz	"gid %d, gts %p, cbrmap 0x%lx, dsrmap 0x%lx, tie %d, tis %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gru_load_context               ; -- Begin function gru_load_context
	.p2align	2
_gru_load_context:                      ; @gru_load_context
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x22, [x0, #40]
	ldr	w21, [x0]
	ldr	w0, [x22, #4]
	mov	x1, x21
	bl	_get_cch
	mov	x20, x0
	bl	_lock_cch_handle
Lloh0:
	adrp	x8, _GRU_OPT_MISS_FMM_POLL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRU_OPT_MISS_FMM_POLL@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x23, _GRU_OPT_MISS_FMM_INTR@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GRU_OPT_MISS_FMM_INTR@GOTPAGEOFF]
	ldr	x10, [x23]
	cmp	x9, x10
	cset	w11, eq
	cmp	x9, x8
	csinc	w8, w11, wzr, ne
	stp	w8, w11, [x20]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
	bl	_gru_cpu_fault_map_id
	str	x0, [x19, #24]
	str	x0, [x20, #56]
LBB0_2:
	ldr	x8, [x19, #16]
	tbnz	x8, #63, LBB0_4
; %bb.3:
	str	x8, [x20, #16]
	mov	w8, #1
	b	LBB0_5
LBB0_4:
	mov	w8, #0
LBB0_5:
	str	w8, [x20, #8]
	str	wzr, [x20, #24]
	ldr	d0, [x19, #32]
	rev64.2s	v0, v0
	str	d0, [x20, #64]
	mov	x0, x19
	bl	_is_kernel_context
	cbz	x0, LBB0_7
; %bb.6:
	movi.2s	v0, #1
	str	d0, [x20, #24]
	mov	w8, #1
	str	w8, [x20, #32]
	str	xzr, [x20, #56]
	b	LBB0_8
LBB0_7:
	str	xzr, [x20, #24]
	str	wzr, [x20, #32]
	mov	x0, x22
	mov	x1, x19
	bl	_gru_load_mm_tracker
	ldp	x8, x9, [x20, #40]
	str	w0, [x8]
	ldr	w10, [x19, #56]
	str	w10, [x9]
	add	w10, w0, #1
	str	w10, [x8, #4]
	ldr	w10, [x19, #56]
	str	w10, [x9, #4]
	add	w10, w0, #2
	str	w10, [x8, #8]
	ldr	w10, [x19, #56]
	str	w10, [x9, #8]
	add	w10, w0, #3
	str	w10, [x8, #12]
	ldr	w10, [x19, #56]
	str	w10, [x9, #12]
	add	w10, w0, #4
	str	w10, [x8, #16]
	ldr	w10, [x19, #56]
	str	w10, [x9, #16]
	add	w10, w0, #5
	str	w10, [x8, #20]
	ldr	w10, [x19, #56]
	str	w10, [x9, #20]
	add	w10, w0, #6
	str	w10, [x8, #24]
	ldr	w10, [x19, #56]
	str	w10, [x9, #24]
	add	w10, w0, #7
	str	w10, [x8, #28]
	ldr	w8, [x19, #56]
	str	w8, [x9, #28]
LBB0_8:
	mov	x0, x20
	bl	_cch_allocate
Lloh5:
	adrp	x24, _grudev@GOTPAGE
Lloh6:
	ldr	x24, [x24, _grudev@GOTPAGEOFF]
	cbz	w0, LBB0_10
; %bb.9:
	mov	x2, x0
	ldr	w0, [x24]
	ldp	w9, w8, [x19, #32]
	stp	x8, x9, [sp, #16]
	stp	x20, x19, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_gru_dbg
	bl	_BUG
LBB0_10:
	ldr	w1, [x22, #4]
	ldp	w4, w3, [x19, #32]
	ldp	w5, w0, [x19, #48]
	mov	x2, x21
	bl	_gru_load_context_data
	mov	x0, x20
	bl	_cch_start
	cbz	x0, LBB0_12
; %bb.11:
	bl	_BUG
LBB0_12:
	mov	x0, x20
	bl	_unlock_cch_handle
	ldr	w0, [x24]
	ldr	x8, [x19, #40]
	ldr	w2, [x8]
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	cset	w8, eq
	ldr	x9, [x19, #24]
	ldp	w11, w10, [x19, #32]
	stp	x8, x9, [sp, #24]
	stp	x10, x11, [sp, #8]
	str	x19, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_gru_dbg
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GRU_OPT_MISS_FMM_POLL,8,3      ; @GRU_OPT_MISS_FMM_POLL
	.comm	_GRU_OPT_MISS_FMM_INTR,8,3      ; @GRU_OPT_MISS_FMM_INTR
	.comm	_grudev,4,2                     ; @grudev
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"err %d: cch %p, gts %p, cbr 0x%lx, dsr 0x%lx\n"

l_.str.1:                               ; @.str.1
	.asciz	"gid %d, gts %p, cbrmap 0x%lx, dsrmap 0x%lx, tie %d, tis %d\n"

.subsections_via_symbols
