	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gru_alloc_gts                  ## -- Begin function gru_alloc_gts
	.p2align	4, 0x90
_gru_alloc_gts:                         ## @gru_alloc_gts
	.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	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	%edx, %edi
	callq	_DSR_BYTES
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_CBR_BYTES
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rbx,%rax), %edi
	addl	$80, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	_gts_alloc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STAT
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	leaq	72(%rbx), %rdi
	movl	$1, %esi
	callq	_atomic_set
	movq	%rbx, %rdi
	addq	$68, %rdi
	callq	_mutex_init
	movl	%r12d, (%rbx)
	movl	%r15d, 4(%rbx)
	movb	%r13b, 8(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 12(%rbx)
	movq	$-1, 16(%rbx)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 24(%rbx)
	movq	_NULLCTX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movq	$-1, 28(%rbx)
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GRU_SIZEAVAIL
	movl	%eax, 60(%rbx)
	testq	%r14, %r14
	je	LBB0_4
## %bb.2:
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	%r14, 48(%rbx)
	xorl	%eax, %eax
	callq	_gru_register_mmu_notifier
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rbx, %rdi
	callq	_gts_drop
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movq	%r14, 40(%rbx)
LBB0_4:
	movq	_grudev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_gru_dbg
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_gts_alloc,4,2                  ## @gts_alloc
	.comm	_NULLCTX,4,2                    ## @NULLCTX
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_current,8,3                    ## @current
	.comm	_grudev,4,2                     ## @grudev
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"alloc gts %p\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gru_alloc_gts                  ; -- Begin function gru_alloc_gts
	.p2align	2
_gru_alloc_gts:                         ; @gru_alloc_gts
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x20, x0
	mov	x0, x2
	bl	_DSR_BYTES
	mov	x19, x0
	mov	x0, x25
	bl	_CBR_BYTES
	add	w8, w19, w0
	add	w0, w8, #80
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _gts_alloc@GOTPAGE
Lloh4:
	ldr	x8, [x8, _gts_alloc@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_STAT
	mov	x0, x19
	mov	w1, #0
	mov	w2, #80
	bl	_memset
	add	x0, x19, #72
	mov	w1, #1
	bl	_atomic_set
	add	x0, x19, #68
	bl	_mutex_init
	stp	w25, w24, [x19]
	strb	w23, [x19, #8]
	str	w22, [x19, #12]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x19, #16]
	str	w21, [x19, #24]
Lloh6:
	adrp	x8, _NULLCTX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NULLCTX@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #64]
	stur	d0, [x19, #28]
Lloh9:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_GRU_SIZEAVAIL
	str	w0, [x19, #60]
	cbz	x20, LBB0_6
; %bb.2:
Lloh12:
	adrp	x8, _current@GOTPAGE
Lloh13:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	w8, [x19, #56]
	str	x20, [x19, #48]
	bl	_gru_register_mmu_notifier
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_gts_drop
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ERR_CAST
LBB0_4:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_5:
	str	x20, [x19, #40]
LBB0_6:
Lloh18:
	adrp	x8, _grudev@GOTPAGE
Lloh19:
	ldr	x8, [x8, _grudev@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_gru_dbg
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_gts_alloc,4,2                  ; @gts_alloc
	.comm	_NULLCTX,4,2                    ; @NULLCTX
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_current,8,3                    ; @current
	.comm	_grudev,4,2                     ; @grudev
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alloc gts %p\n"

.subsections_via_symbols
