	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_tt_init                    ## -- Begin function ttm_tt_init
	.p2align	4, 0x90
_ttm_tt_init:                           ## @ttm_tt_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%ecx, %eax
	movq	%rdi, %rbx
	movq	%rsi, 56(%rdi)
	movl	(%rsi), %ecx
	movl	%ecx, 48(%rdi)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%rcx, %rdx
	decq	%rdx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rdx
	movq	%rdx, (%rdi)
	movq	_tt_cached@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 44(%rdi)
	movl	%eax, 40(%rdi)
	movq	%r8, 32(%rdi)
	movq	_tt_unpopulated@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdi)
	movq	$0, 16(%rdi)
	callq	_ttm_tt_alloc_page_directory
	xorl	%eax, %eax
	cmpl	$0, 8(%rbx)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_ttm_tt_destroy
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_tt_cached,4,2                  ## @tt_cached
	.comm	_tt_unpopulated,4,2             ## @tt_unpopulated
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed allocating page table\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_tt_init                    ; -- Begin function ttm_tt_init
	.p2align	2
_ttm_tt_init:                           ; @ttm_tt_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	x1, [x0, #56]
	ldr	w8, [x1]
	str	w8, [x0, #48]
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x8, x2, x8
	sub	x8, x8, #1
Lloh3:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	lsr	x8, x8, x9
	str	x8, [x0]
Lloh6:
	adrp	x8, _tt_cached@GOTPAGE
Lloh7:
	ldr	x8, [x8, _tt_cached@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	w3, w8, [x0, #40]
	str	x4, [x0, #32]
Lloh9:
	adrp	x8, _tt_unpopulated@GOTPAGE
Lloh10:
	ldr	x8, [x8, _tt_unpopulated@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	str	xzr, [x0, #16]
	bl	_ttm_tt_alloc_page_directory
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_ttm_tt_destroy
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_tt_cached,4,2                  ; @tt_cached
	.comm	_tt_unpopulated,4,2             ; @tt_unpopulated
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed allocating page table\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
