	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_vmm_ctor                  ## -- Begin function nvkm_vmm_ctor
	.p2align	4, 0x90
_nvkm_vmm_ctor:                         ## @nvkm_vmm_ctor
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	32(%rbp), %r12
	movq	16(%rbp), %r14
	movq	24(%rbp), %rax
	movq	(%rdi), %rbx
	movq	%rdi, 80(%r12)
	movq	%rsi, 72(%r12)
	movq	%rax, (%r12)
	movl	(%rsi), %eax
	movl	%eax, 68(%r12)
	leaq	64(%r12), %rdi
	callq	_kref_init
	leaq	60(%r12), %rdi
	testq	%r14, %r14
	leaq	_nvkm_vmm_ctor._key(%rip), %rdx
	cmovneq	%r14, %rdx
	leaq	L_.str(%rip), %rsi
	callq	___mutex_init
	addq	$16, %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx)
	leaq	16(%rbx), %rbx
	jne	LBB0_1
## %bb.2:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	-24(%rbx), %r14
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.3:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	addl	%ecx, %r15d
	incl	%eax
	movl	12(%r14), %ecx
	addq	$12, %r14
	testl	%ecx, %ecx
	jne	LBB0_4
	jmp	LBB0_6
LBB0_5:
	xorl	%eax, %eax
	xorl	%r15d, %r15d
LBB0_6:
	addl	-32(%rbx), %r15d
	movq	_NVKM_VMM_LEVELS_MAX@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	setg	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_11
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%r12d, %r12d
LBB0_9:
	subl	(%rax), %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	-12(%r14), %rdi
	movq	%r12, %rbx
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_nvkm_vmm_pt_new
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_24
## %bb.12:
	movq	(%rax), %rax
	movl	$1, (%rax)
	leaq	56(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movl	-8(%r14), %eax
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movb	-12(%r14), %cl
	shll	%cl, %eax
	movslq	%eax, %rsi
	addq	-72(%rbp), %rsi                 ## 8-byte Folded Reload
	movl	-4(%r14), %edx
	movq	%r13, %rdi
	movl	$1, %ecx
	callq	_nvkm_mmu_ptc_get
	movq	48(%rbx), %rcx
	movq	8(%rcx), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	je	LBB0_30
LBB0_14:
	leaq	24(%rbx), %r13
	movq	%r13, %rdi
	callq	_INIT_LIST_HEAD
	movq	_RB_ROOT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%rbx)
	movq	%rax, 32(%rbx)
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_25
## %bb.15:
	movl	$1, %eax
	movl	%r15d, %ecx
	shlq	%cl, %rax
	movq	$0, 8(%rbx)
	movq	%rax, 16(%rbx)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	js	LBB0_7
## %bb.16:
	leaq	(%rsi,%r15), %r14
	cmpq	%rax, %r14
	ja	LBB0_7
## %bb.17:
	testq	%r15, %r15
	je	LBB0_19
## %bb.18:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_nvkm_vmm_ctor_managed
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_10
LBB0_19:
	testq	%rsi, %rsi
	movq	%rbx, %r12
	je	LBB0_22
## %bb.20:
	movq	%r15, %rdi
	callq	_nvkm_vma_new
	testq	%rax, %rax
	je	LBB0_30
## %bb.21:
	movq	%rax, %r15
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_nvkm_vmm_free_insert
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_list_add_tail
LBB0_22:
	movq	16(%r12), %rdx
	subq	%r14, %rdx
	je	LBB0_29
## %bb.23:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_nvkm_vmm_ctor_managed
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_29
LBB0_24:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_25:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, 8(%rbx)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rdi), %rax
	movl	$1, %edx
	movl	%r15d, %ecx
	shlq	%cl, %rdx
	testq	%rsi, %rsi
	cmoveq	%rdx, %rax
	movq	%rax, 16(%rbx)
	movq	%rax, %rsi
	subq	%rdi, %rsi
	jb	LBB0_7
## %bb.26:
	cmpq	%rdx, %rax
	ja	LBB0_7
## %bb.27:
	callq	_nvkm_vma_new
	testq	%rax, %rax
	je	LBB0_30
## %bb.28:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_nvkm_vmm_free_insert
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_list_add
LBB0_29:
	xorl	%r12d, %r12d
	jmp	LBB0_10
LBB0_30:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_nvkm_vmm_ctor._key,4,2 ## @nvkm_vmm_ctor._key
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"&vmm->mutex"

	.comm	_NVKM_VMM_LEVELS_MAX,4,2        ## @NVKM_VMM_LEVELS_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RB_ROOT,8,3                    ## @RB_ROOT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_vmm_ctor                  ; -- Begin function nvkm_vmm_ctor
	.p2align	2
_nvkm_vmm_ctor:                         ; @nvkm_vmm_ctor
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x25, x6
	mov	x21, x5
	mov	x20, x4
	mov	x22, x3
	mov	x24, x2
	mov	x23, x1
	ldr	x19, [x29, #16]
	ldr	x26, [x0]
	stp	x1, x0, [x19, #72]
	str	x7, [x19]
	ldr	w8, [x1]
	str	w8, [x19, #68]
	add	x0, x19, #64
	bl	_kref_init
	add	x0, x19, #60
Lloh0:
	adrp	x8, _nvkm_vmm_ctor._key@PAGE
Lloh1:
	add	x8, x8, _nvkm_vmm_ctor._key@PAGEOFF
	cmp	x25, #0
	csel	x2, x8, x25, eq
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	___mutex_init
	sub	x8, x26, #16
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, #32]
	add	x8, x8, #16
	cbnz	x9, LBB0_1
; %bb.2:
	ldr	x26, [x8, #8]
	ldr	w10, [x26]
	cbz	w10, LBB0_5
; %bb.3:
	mov	w25, #0
	mov	w9, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	w25, w10, w25
	ldr	w10, [x26, #12]!
	add	w9, w9, #1
	cbnz	w10, LBB0_4
	b	LBB0_6
LBB0_5:
	mov	w9, #0
	mov	w25, #0
LBB0_6:
	ldr	w27, [x8]
Lloh4:
	adrp	x8, _NVKM_VMM_LEVELS_MAX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NVKM_VMM_LEVELS_MAX@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w9, w8
	cset	w0, gt
	bl	_WARN_ON
	cbz	x0, LBB0_8
LBB0_7:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_27
LBB0_8:
	sub	x0, x26, #12
	mov	w1, #0
	mov	x2, #0
	bl	_nvkm_vmm_pt_new
	str	x0, [x19, #48]
	cbz	x0, LBB0_26
; %bb.9:
	ldr	x8, [x0]
	mov	w9, #1
	str	w9, [x8]
	add	x0, x19, #56
	bl	_INIT_LIST_HEAD
	ldur	w8, [x26, #-8]
	cbz	w8, LBB0_11
; %bb.10:
	ldur	w9, [x26, #-12]
	lsl	w8, w8, w9
	add	x1, x24, w8, sxtw
	ldur	w2, [x26, #-4]
	mov	x0, x23
	mov	w3, #1
	bl	_nvkm_mmu_ptc_get
	ldr	x8, [x19, #48]
	ldr	x8, [x8, #8]
	str	w0, [x8]
	cbz	w0, LBB0_26
LBB0_11:
	add	w24, w25, w27
	add	x23, x19, #24
	mov	x0, x23
	bl	_INIT_LIST_HEAD
Lloh9:
	adrp	x8, _RB_ROOT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RB_ROOT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #32]
	cbz	w22, LBB0_21
; %bb.12:
	mov	w8, #1
	lsl	x8, x8, x24
	stp	xzr, x8, [x19, #8]
	tbnz	x21, #63, LBB0_7
; %bb.13:
	add	x22, x21, x20
	cmp	x22, x8
	b.hi	LBB0_7
; %bb.14:
	cbz	x20, LBB0_16
; %bb.15:
	mov	x0, x19
	mov	x1, #0
	mov	x2, x20
	bl	_nvkm_vmm_ctor_managed
	cbnz	w0, LBB0_28
LBB0_16:
	cbz	x21, LBB0_19
; %bb.17:
	mov	x0, x20
	mov	x1, x21
	bl	_nvkm_vma_new
	cbz	x0, LBB0_26
; %bb.18:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_nvkm_vmm_free_insert
	mov	x0, x20
	mov	x1, x23
	bl	_list_add_tail
LBB0_19:
	ldr	x8, [x19, #16]
	subs	x2, x8, x22
	b.eq	LBB0_25
; %bb.20:
	mov	x0, x19
	mov	x1, x22
	bl	_nvkm_vmm_ctor_managed
	cbnz	w0, LBB0_28
	b	LBB0_25
LBB0_21:
	add	x9, x21, x20
	mov	w8, #1
	lsl	x8, x8, x24
	cmp	x21, #0
	csel	x9, x8, x9, eq
	stp	x20, x9, [x19, #8]
	subs	x1, x9, x20
	b.lo	LBB0_7
; %bb.22:
	cmp	x9, x8
	b.hi	LBB0_7
; %bb.23:
	mov	x0, x20
	bl	_nvkm_vma_new
	cbz	x0, LBB0_26
; %bb.24:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_nvkm_vmm_free_insert
	mov	x0, x20
	mov	x1, x23
	bl	_list_add
LBB0_25:
	mov	w0, #0
	b	LBB0_28
LBB0_26:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_28:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_nvkm_vmm_ctor._key,4,2 ; @nvkm_vmm_ctor._key
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"&vmm->mutex"

	.comm	_NVKM_VMM_LEVELS_MAX,4,2        ; @NVKM_VMM_LEVELS_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RB_ROOT,8,3                    ; @RB_ROOT
.subsections_via_symbols
