	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gru_lock_kernel_context
_gru_lock_kernel_context:               ## @gru_lock_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	%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
	movl	%edi, %r14d
	movq	_lock_kernel_context@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STAT
	movq	_gru_base@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %r15d
	testl	%r14d, %r14d
	jns	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_uv_numa_blade_id
	movl	%eax, %r15d
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rax
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %r12
	leaq	8(%r12), %rbx
	movq	%rbx, %rdi
	callq	_down_read
	testl	%r14d, %r14d
	jns	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_uv_numa_blade_id
	cmpl	%eax, %r15d
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_up_read
	jmp	LBB0_1
LBB0_6:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	cmpl	$0, (%rax)
	jne	LBB0_9
LBB0_8:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_gru_load_kernel_context
LBB0_9:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lock_kernel_context,4,2        ## @lock_kernel_context
	.comm	_gru_base,8,3                   ## @gru_base
	.no_dead_strip	_gru_lock_kernel_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gru_lock_kernel_context
_gru_lock_kernel_context:               ; @gru_lock_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
	mov	x19, x0
Lloh0:
	adrp	x8, _lock_kernel_context@GOTPAGE
Lloh1:
	ldr	x8, [x8, _lock_kernel_context@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_STAT
	tbnz	w19, #31, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _gru_base@GOTPAGE
Lloh4:
	ldr	x8, [x8, _gru_base@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x20, [x8, w19, uxtw #3]
	add	x0, x20, #8
	bl	_down_read
LBB0_2:
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w8, [x8]
	cbnz	w8, LBB0_5
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	bl	_gru_load_kernel_context
LBB0_5:
	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
LBB0_6:
	bl	_uv_numa_blade_id
	mov	x19, x0
Lloh6:
	adrp	x22, _gru_base@GOTPAGE
Lloh7:
	ldr	x22, [x22, _gru_base@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x20, [x8, w0, sxtw #3]
	add	x21, x20, #8
	mov	x0, x21
	bl	_down_read
	bl	_uv_numa_blade_id
	cmp	w19, w0
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_up_read
	bl	_uv_numa_blade_id
	mov	x19, x0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_lock_kernel_context,4,2        ; @lock_kernel_context
	.comm	_gru_base,8,3                   ; @gru_base
	.no_dead_strip	_gru_lock_kernel_context
.subsections_via_symbols
