	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gru_reset_asid_limit
_gru_reset_asid_limit:                  ## @gru_reset_asid_limit
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	_grudev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_gru_dbg
	movq	_asid_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STAT
	movq	_MAX_ASID@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	cmpl	%r14d, %r15d
	jg	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_gru_wrap_asid
	movl	%eax, %r14d
LBB0_2:
	movq	%r13, %rdi
	callq	_gru_flush_all_tlb
	movq	_GRU_NUM_CCH@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jle	LBB0_13
## %bb.3:
	movslq	(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_4
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r15d, %ebx
	movl	%r15d, %eax
	cmovll	%ebx, %eax
	cmpl	%r14d, %ebx
	cmovgl	%eax, %r15d
	movq	_GRU_NUM_CCH@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	movslq	(%rbx), %rax
	cmpq	%rax, %r12
	jge	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rax
	movq	(%rax,%r12,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	callq	_is_kernel_context
	testq	%rax, %rax
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r13), %rax
	movq	(%rax,%r12,8), %rcx
	movq	(%rcx), %r8
	movq	(%r8), %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rax,%rdx,4), %ebx
	movq	_grudev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	movl	%r12d, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %r9d
	xorl	%eax, %eax
	callq	_gru_dbg
	cmpl	%r14d, %ebx
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_ASID_INC@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	cmpl	%r15d, %r14d
	jl	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_MAX_ASID@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	cmpl	%r15d, %r14d
	jl	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_gru_wrap_asid
	movl	%eax, %r14d
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_GRU_NUM_CCH@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	movl	$0, %r12d
	jg	LBB0_4
LBB0_13:
	movl	%r15d, 4(%r13)
	movl	%r14d, 8(%r13)
	movq	_grudev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_gru_dbg
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_grudev,4,2                     ## @grudev
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gid %d, asid 0x%x\n"

	.comm	_asid_next,4,2                  ## @asid_next
	.comm	_MAX_ASID,4,2                   ## @MAX_ASID
	.comm	_GRU_NUM_CCH,4,2                ## @GRU_NUM_CCH
L_.str.1:                               ## @.str.1
	.asciz	"gid %d, gts %p, gms %p, inuse 0x%x, cxt %d\n"

	.comm	_ASID_INC,8,3                   ## @ASID_INC
L_.str.2:                               ## @.str.2
	.asciz	"gid %d, new asid 0x%x, new_limit 0x%x\n"

	.no_dead_strip	_gru_reset_asid_limit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gru_reset_asid_limit
_gru_reset_asid_limit:                  ; @gru_reset_asid_limit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _grudev@GOTPAGE
Lloh1:
	ldr	x22, [x22, _grudev@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w2, [x19]
	str	x21, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_gru_dbg
Lloh4:
	adrp	x8, _asid_next@GOTPAGE
Lloh5:
	ldr	x8, [x8, _asid_next@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_STAT
Lloh7:
	adrp	x8, _MAX_ASID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAX_ASID@GOTPAGEOFF]
Lloh9:
	ldr	w23, [x8]
	mov	x20, x21
	cmp	w23, w21
	b.gt	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_gru_wrap_asid
	mov	x20, x0
LBB0_2:
	mov	x0, x19
	bl	_gru_flush_all_tlb
Lloh10:
	adrp	x25, _GRU_NUM_CCH@GOTPAGE
Lloh11:
	ldr	x25, [x25, _GRU_NUM_CCH@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.3:
	mov	x28, #0
	ldrsw	x26, [x19]
Lloh12:
	adrp	x21, l_.str.1@PAGE
Lloh13:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh14:
	adrp	x27, _ASID_INC@GOTPAGE
Lloh15:
	ldr	x27, [x27, _ASID_INC@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	cmp	w24, w23
	ccmp	w24, w20, #4, lt
	csel	w23, w24, w23, gt
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x28, x28, #1
	ldrsw	x8, [x25]
	cmp	x28, x8
	b.ge	LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x28, lsl #3]
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_is_kernel_context
	cbnz	x0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x28, lsl #3]
	ldr	x9, [x8]
	ldr	x10, [x9]
	ldr	w24, [x10, x26, lsl #2]
	ldr	w0, [x22]
	ldr	w2, [x19]
	stp	x24, x28, [sp, #16]
	stp	x8, x9, [sp]
	mov	x1, x21
	bl	_gru_dbg
	cmp	w24, w20
	b.ne	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27]
	add	w20, w20, w8
	cmp	w20, w23
	b.lt	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh16:
	adrp	x8, _MAX_ASID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MAX_ASID@GOTPAGEOFF]
Lloh18:
	ldr	w23, [x8]
	cmp	w20, w23
	b.lt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_gru_wrap_asid
	mov	x20, x0
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x28, #0
	ldr	w8, [x25]
	cmp	w8, #0
	b.gt	LBB0_6
LBB0_13:
	stp	w23, w20, [x19, #4]
	ldr	w0, [x22]
	ldr	w2, [x19]
	stp	x20, x23, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_gru_dbg
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_grudev,4,2                     ; @grudev
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gid %d, asid 0x%x\n"

	.comm	_asid_next,4,2                  ; @asid_next
	.comm	_MAX_ASID,4,2                   ; @MAX_ASID
	.comm	_GRU_NUM_CCH,4,2                ; @GRU_NUM_CCH
l_.str.1:                               ; @.str.1
	.asciz	"gid %d, gts %p, gms %p, inuse 0x%x, cxt %d\n"

	.comm	_ASID_INC,8,3                   ; @ASID_INC
l_.str.2:                               ; @.str.2
	.asciz	"gid %d, new asid 0x%x, new_limit 0x%x\n"

	.no_dead_strip	_gru_reset_asid_limit
.subsections_via_symbols
