	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv44_vmmgr_init
_nv44_vmmgr_init:                       ## @nv44_vmmgr_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	addq	$4, %rdi
	callq	_nouveau_vmmgr_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$1049100, %esi                  ## imm = 0x10020C
	callq	_nv_rd32
	movl	%eax, %r15d
	movl	$524288, %eax                   ## imm = 0x80000
	addl	(%r12), %eax
	andl	$-524288, %eax                  ## imm = 0xFFF80000
	subl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$1050704, %esi                  ## imm = 0x100850
	movl	$-2147483648, %edx              ## imm = 0x80000000
	callq	_nv_wr32
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	movl	$1050648, %esi                  ## imm = 0x100818
	callq	_nv_wr32
	movq	_NV44_GART_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1050628, %esi                  ## imm = 0x100804
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$1050704, %esi                  ## imm = 0x100850
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$1048716, %esi                  ## imm = 0x10008C
	movl	$512, %edx                      ## imm = 0x200
	movl	$512, %ecx                      ## imm = 0x200
	callq	_nv_mask
	movq	%rbx, %rdi
	movl	$1050656, %esi                  ## imm = 0x100820
	xorl	%edx, %edx
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$1050668, %esi                  ## imm = 0x10082C
	movl	$1, %edx
	callq	_nv_wr32
	orl	$16, %r15d
	movq	%rbx, %rdi
	movl	$1050624, %esi                  ## imm = 0x100800
	movl	%r15d, %edx
	callq	_nv_wr32
LBB0_2:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV44_GART_SIZE,4,2             ## @NV44_GART_SIZE
	.no_dead_strip	_nv44_vmmgr_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv44_vmmgr_init
_nv44_vmmgr_init:                       ; @nv44_vmmgr_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x22, [x8]
	add	x0, x0, #4
	bl	_nouveau_vmmgr_init
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
	mov	w21, #2128
	movk	w21, #16, lsl #16
	sub	w1, w21, #1604
	mov	x0, x19
	bl	_nv_rd32
	ldr	w8, [x22]
	add	w8, w8, #128, lsl #12           ; =524288
	and	w8, w8, #0xfff80000
	sub	w22, w0, w8
	mov	x0, x19
	mov	w1, #2128
	movk	w1, #16, lsl #16
	mov	w2, #-2147483648
	bl	_nv_wr32
	ldr	w2, [x19]
	sub	w1, w21, #56
	mov	x0, x19
	bl	_nv_wr32
Lloh0:
	adrp	x8, _NV44_GART_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV44_GART_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	sub	w1, w21, #76
	mov	x0, x19
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #2128
	movk	w1, #16, lsl #16
	mov	w2, #32768
	bl	_nv_wr32
	sub	w1, w21, #1988
	mov	x0, x19
	mov	w2, #512
	mov	w3, #512
	bl	_nv_mask
	sub	w1, w21, #48
	mov	x0, x19
	mov	w2, #0
	bl	_nv_wr32
	sub	w1, w21, #36
	mov	x0, x19
	mov	w2, #1
	bl	_nv_wr32
	orr	w2, w22, #0x10
	sub	w1, w21, #80
	mov	x0, x19
	bl	_nv_wr32
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NV44_GART_SIZE,4,2             ; @NV44_GART_SIZE
	.no_dead_strip	_nv44_vmmgr_init
.subsections_via_symbols
