	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function nvif_vmm_init
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_nvif_vmm_init
	.p2align	4, 0x90
_nvif_vmm_init:                         ## @nvif_vmm_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	%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	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %r13
	movq	%rcx, %r14
	movl	%edx, %r15d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	24(%rbp), %rax
	movq	16(%rbp), %rcx
	leaq	40(%rcx), %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r12
	movq	24(%rbp), %rax
	addq	$16, %rax
	movq	$0, 32(%r12)
	movl	%r15d, (%r12)
	movq	%rax, %r15
	movq	%r14, 16(%r12)
	movq	%r13, 8(%r12)
	movl	24(%r12), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	16(%rbp), %rdx
	callq	_memcpy
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r12, %rcx
	movq	%rbx, %r8
	movq	%r15, %r9
	callq	_nvif_object_init
	movl	%eax, %r14d
	testl	%eax, %eax
	movq	24(%rbp), %rbx
	je	LBB0_6
LBB0_2:
	movq	%rbx, %rdi
	callq	_nvif_vmm_fini
	jmp	LBB0_3
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_6:
	movups	8(%r12), %xmm0
	movups	%xmm0, 24(%rbx)
	movl	4(%r12), %edi
	movl	%edi, (%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$20, %esi
	callq	_kmalloc_array
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	cmpl	$0, (%rbx)
	jle	LBB0_14
## %bb.8:
	movl	$16, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-84(%rbp), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movl	$0, 16(%rax)
	movl	%r13d, -88(%rbp)
	movq	_NVIF_VMM_V0_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	leaq	-88(%rbp), %rdx
	movl	$24, %ecx
	callq	_nvif_object_mthd
	testl	%eax, %eax
	jne	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-68(%rbp), %eax
	movq	24(%rbp), %rdx
	movq	8(%rdx), %rcx
	movl	%eax, (%rcx,%rbx)
	movups	-84(%rbp), %xmm0
	movups	%xmm0, -16(%rcx,%rbx)
	incq	%r13
	movslq	(%rdx), %rax
	addq	$20, %rbx
	cmpq	%rax, %r13
	jl	LBB0_9
	jmp	LBB0_14
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.13:
	negl	%r14d
	jmp	LBB0_2
LBB0_14:
	xorl	%r14d, %r14d
LBB0_3:
	movq	%r12, %rdi
	callq	_kfree
LBB0_5:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	%eax, %r14d
	movq	24(%rbp), %rbx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NVIF_VMM_V0_PAGE,4,2           ## @NVIF_VMM_V0_PAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvif_vmm_init                  ; -- Begin function nvif_vmm_init
	.p2align	2
_nvif_vmm_init:                         ; @nvif_vmm_init
	.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	x20, x7
	mov	x24, x6
	mov	x26, x5
	mov	x27, x4
	mov	x28, x3
	mov	x22, x2
	str	w1, [sp, #4]                    ; 4-byte Folded Spill
	mov	x25, x0
	add	x23, x6, #40
	mov	x21, x7
	str	xzr, [x21, #16]!
	stur	xzr, [x21, #-8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_kmalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	str	xzr, [x0, #32]
	str	w22, [x0]
	stp	x27, x28, [x0, #8]
	ldr	w0, [x0, #24]
	mov	x1, x26
	mov	x2, x24
	bl	_memcpy
	mov	x0, x25
	mov	w1, #0
	ldr	w2, [sp, #4]                    ; 4-byte Folded Reload
	mov	x3, x19
	mov	x4, x23
	mov	x5, x21
	bl	_nvif_object_init
	mov	x22, x0
	cbz	w0, LBB0_4
LBB0_2:
	mov	x0, x20
	bl	_nvif_vmm_fini
	b	LBB0_12
LBB0_3:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_4:
	ldr	x8, [x19, #16]
	str	x8, [x20, #32]
	ldr	x8, [x19, #8]
	str	x8, [x20, #24]
	ldr	w0, [x19, #4]
	str	w0, [x20]
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w1, #20
	bl	_kmalloc_array
	str	x0, [x20, #8]
	cbz	x0, LBB0_9
; %bb.5:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	x23, #0
	mov	x24, #0
	add	x8, sp, #8
	orr	x25, x8, #0x4
Lloh9:
	adrp	x26, _NVIF_VMM_V0_PAGE@GOTPAGE
Lloh10:
	ldr	x26, [x26, _NVIF_VMM_V0_PAGE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	stp	xzr, xzr, [x25]
	str	wzr, [x25, #16]
	str	w24, [sp, #8]
	ldr	w1, [x26]
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #24
	bl	_nvif_object_mthd
	cbnz	w0, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [sp, #28]
	ldr	x9, [x20, #8]
	add	x9, x9, x23
	str	w8, [x9, #16]
	ldur	q0, [sp, #12]
	str	q0, [x9]
	add	x24, x24, #1
	ldrsw	x8, [x20]
	add	x23, x23, #20
	cmp	x24, x8
	b.lt	LBB0_7
	b	LBB0_11
LBB0_9:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cbz	w8, LBB0_11
; %bb.10:
	neg	w22, w8
	b	LBB0_2
LBB0_11:
	mov	w22, #0
LBB0_12:
	mov	x0, x19
	bl	_kfree
LBB0_13:
	mov	x0, x22
	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
LBB0_14:
	mov	x22, x0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NVIF_VMM_V0_PAGE,4,2           ; @NVIF_VMM_V0_PAGE
.subsections_via_symbols
