	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gru_read_gpa                   ## -- Begin function gru_read_gpa
	.p2align	4, 0x90
_gru_read_gpa:                          ## @gru_read_gpa
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_read_gpa@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STAT
	movq	_GRU_NUM_KERNEL_DSR_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	callq	_gru_get_cpu_resources
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_MQE_BUG_NO_RESOURCES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	movq	%r15, %rbx
	shrq	$62, %rbx
	movq	-48(%rbp), %r12
	movq	-40(%rbp), %rdi
	callq	_gru_get_tri
	movq	_IMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_gru_vload_phys
	movq	-48(%rbp), %rdi
	callq	_gru_wait
	movl	%eax, %ebx
	movq	_CBS_IDLE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_3
## %bb.4:
	movq	-40(%rbp), %rsi
	movq	(%rsi), %rax
	movq	%rax, (%r14)
	jmp	LBB0_5
LBB0_3:
	movq	-40(%rbp), %rsi
LBB0_5:
	movq	-48(%rbp), %rdi
	callq	_gru_free_cpu_resources
LBB0_6:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_read_gpa,4,2                   ## @read_gpa
	.comm	_GRU_NUM_KERNEL_DSR_BYTES,4,2   ## @GRU_NUM_KERNEL_DSR_BYTES
	.comm	_MQE_BUG_NO_RESOURCES,4,2       ## @MQE_BUG_NO_RESOURCES
	.comm	_IMA,4,2                        ## @IMA
	.comm	_CBS_IDLE,4,2                   ## @CBS_IDLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gru_read_gpa                   ; -- Begin function gru_read_gpa
	.p2align	2
_gru_read_gpa:                          ; @gru_read_gpa
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _read_gpa@GOTPAGE
Lloh1:
	ldr	x8, [x8, _read_gpa@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_STAT
Lloh3:
	adrp	x8, _GRU_NUM_KERNEL_DSR_BYTES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GRU_NUM_KERNEL_DSR_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	x2, sp
	bl	_gru_get_cpu_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _MQE_BUG_NO_RESOURCES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MQE_BUG_NO_RESOURCES@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	b	LBB0_6
LBB0_2:
	lsr	x21, x20, #62
	ldp	x0, x22, [sp]
	bl	_gru_get_tri
	mov	x2, x0
Lloh9:
	adrp	x8, _IMA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IMA@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	mov	x0, x22
	mov	x1, x20
	mov	x3, x21
	bl	_gru_vload_phys
	ldr	x0, [sp, #8]
	bl	_gru_wait
	mov	x20, x0
Lloh12:
	adrp	x8, _CBS_IDLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CBS_IDLE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	x1, [sp]
	ldr	x8, [x1]
	str	x8, [x19]
	b	LBB0_5
LBB0_4:
	ldr	x1, [sp]
LBB0_5:
	ldr	x0, [sp, #8]
	bl	_gru_free_cpu_resources
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_read_gpa,4,2                   ; @read_gpa
	.comm	_GRU_NUM_KERNEL_DSR_BYTES,4,2   ; @GRU_NUM_KERNEL_DSR_BYTES
	.comm	_MQE_BUG_NO_RESOURCES,4,2       ; @MQE_BUG_NO_RESOURCES
	.comm	_IMA,4,2                        ; @IMA
	.comm	_CBS_IDLE,4,2                   ; @CBS_IDLE
.subsections_via_symbols
