	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gru_preload_tlb
_gru_preload_tlb:                       ## @gru_preload_tlb
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	32(%rbp), %rdx
	movq	(%rdx), %rax
	movq	_OP_BCOPY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.1:
	movl	%r9d, %r15d
	movl	%r8d, %ebx
	movq	%rsi, %r13
	movb	16(%rbp), %al
	cmpq	%r14, 8(%rdx)
	jne	LBB0_3
## %bb.2:
	movq	_GRU_CACHE_LINE_BYTES@GOTPCREL(%rip), %rcx
	movq	16(%rdx), %rdx
	imulq	(%rcx), %rdx
	leaq	(%r14,%rdx), %rdi
	decq	%rdi
	jmp	LBB0_6
LBB0_3:
	cmpq	%r14, 24(%rdx)
	jne	LBB0_4
## %bb.5:
	movb	32(%rdx), %cl
	movl	36(%rdx), %edx
	shll	%cl, %edx
	movslq	%edx, %rcx
	leaq	(%r14,%rcx), %rdi
	decq	%rdi
	jmp	LBB0_6
LBB0_4:
	xorl	%edi, %edi
LBB0_6:
	movq	_PAGE_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andq	%rcx, %r14
	andq	%rcx, %rdi
	movzbl	%al, %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %esi
	imulq	%rax, %rsi
	addq	%r14, %rsi
	callq	_min
	cmpq	%r14, %rax
	jbe	LBB0_11
## %bb.7:
	movq	%rax, %r12
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	leaq	-56(%rbp), %r8
	leaq	-48(%rbp), %r9
	callq	_gru_vtop
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rbx
	movq	%r14, %r15
	movq	-56(%rbp), %r14
	movq	_GAA_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	-48(%rbp), %edi
	callq	_GRU_PAGESIZE
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	movq	24(%rbp), %rdi
	movq	%r14, %rsi
	movq	%r15, %r14
	movq	%rbx, %r15
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	%r13d, %edx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r12, %rcx
	movl	%ebx, %r8d
	movl	%r15d, %r9d
	pushq	%rax
	callq	_tfh_write_only
	addq	$16, %rsp
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_grudev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	-48(%rbp), %eax
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %r8
	movq	24(%rbp), %r9
	pushq	-56(%rbp)
	pushq	%rax
	pushq	%r15
	pushq	%rbx
	pushq	%r12
	callq	_gru_dbg
	addq	$48, %rsp
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	subq	%rax, %r12
	movq	_tlb_preload_page@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STAT
	cmpq	%r14, %r12
	ja	LBB0_8
LBB0_11:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OP_BCOPY,8,3                   ## @OP_BCOPY
	.comm	_GRU_CACHE_LINE_BYTES,8,3       ## @GRU_CACHE_LINE_BYTES
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_PAGE_SIZE,1,0                  ## @PAGE_SIZE
	.comm	_GAA_RAM,4,2                    ## @GAA_RAM
	.comm	_grudev,4,2                     ## @grudev
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: gid %d, gts 0x%p, tfh 0x%p, vaddr 0x%lx, asid 0x%x, rw %d, ps %d, gpa 0x%lx\n"

L_.str.1:                               ## @.str.1
	.asciz	"atomic"

L_.str.2:                               ## @.str.2
	.asciz	"non-atomic"

	.comm	_tlb_preload_page,4,2           ## @tlb_preload_page
	.no_dead_strip	_gru_preload_tlb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gru_preload_tlb
_gru_preload_tlb:                       ; @gru_preload_tlb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	ldr	x8, [x29, #16]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _OP_BCOPY@GOTPAGE
Lloh1:
	ldr	x10, [x10, _OP_BCOPY@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_12
; %bb.1:
	mov	x19, x7
	mov	x20, x5
	mov	x21, x4
	mov	x22, x2
	mov	x23, x1
	ldr	x9, [x8, #8]
	cmp	x9, x3
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, _GRU_CACHE_LINE_BYTES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GRU_CACHE_LINE_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x8, [x8, #16]
	madd	x8, x8, x9, x3
	b	LBB0_5
LBB0_3:
	ldr	x9, [x8, #24]
	cmp	x9, x3
	b.ne	LBB0_6
; %bb.4:
	ldp	w9, w8, [x8, #32]
	lsl	w8, w8, w9
	add	x8, x3, w8, sxtw
LBB0_5:
	sub	x8, x8, #1
	b	LBB0_7
LBB0_6:
	mov	x8, #0
LBB0_7:
Lloh6:
	adrp	x9, _PAGE_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PAGE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	and	x24, x9, x3
	and	x0, x9, x8
	mov	w8, w6
Lloh9:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
	ldrb	w9, [x9]
	madd	x1, x9, x8, x24
	bl	_min
	cmp	x0, x24
	b.ls	LBB0_12
; %bb.8:
	mov	x25, x0
Lloh11:
	adrp	x8, l_.str.1@PAGE
Lloh12:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh13:
	adrp	x9, l_.str.2@PAGE
Lloh14:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w22, #0
	csel	x26, x9, x8, eq
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	x4, sp, #40
	add	x5, sp, #36
	mov	x0, x23
	mov	x1, x25
	mov	x2, x20
	mov	x3, x22
	bl	_gru_vtop
	cbnz	w0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x28, [sp, #40]
Lloh15:
	adrp	x8, _GAA_RAM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GAA_RAM@GOTPAGEOFF]
Lloh17:
	ldr	w27, [x8]
	ldr	w0, [sp, #36]
	bl	_GRU_PAGESIZE
	mov	x6, x0
	mov	x0, x19
	mov	x1, x28
	mov	x2, x27
	mov	x3, x25
	mov	x4, x21
	mov	x5, x20
	bl	_tfh_write_only
	cbnz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
Lloh18:
	adrp	x8, _grudev@GOTPAGE
Lloh19:
	ldr	x8, [x8, _grudev@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w3, [x8]
	ldr	w8, [sp, #36]
	ldr	x9, [sp, #40]
	str	x9, [sp, #8]
	stp	w20, w8, [sp]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x26
	mov	x4, x23
	mov	x5, x19
	mov	x6, x25
	mov	x7, x21
	bl	_gru_dbg
Lloh23:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
	ldrb	w8, [x8]
	sub	x25, x25, x8
Lloh25:
	adrp	x8, _tlb_preload_page@GOTPAGE
Lloh26:
	ldr	x8, [x8, _tlb_preload_page@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_STAT
	cmp	x25, x24
	b.hi	LBB0_9
LBB0_12:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_OP_BCOPY,8,3                   ; @OP_BCOPY
	.comm	_GRU_CACHE_LINE_BYTES,8,3       ; @GRU_CACHE_LINE_BYTES
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_PAGE_SIZE,1,0                  ; @PAGE_SIZE
	.comm	_GAA_RAM,4,2                    ; @GAA_RAM
	.comm	_grudev,4,2                     ; @grudev
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: gid %d, gts 0x%p, tfh 0x%p, vaddr 0x%lx, asid 0x%x, rw %d, ps %d, gpa 0x%lx\n"

l_.str.1:                               ; @.str.1
	.asciz	"atomic"

l_.str.2:                               ; @.str.2
	.asciz	"non-atomic"

	.comm	_tlb_preload_page,4,2           ; @tlb_preload_page
	.no_dead_strip	_gru_preload_tlb
.subsections_via_symbols
