	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function nv44_vmmgr_ctor
LCPI0_0:
	.long	39                              ## 0x27
	.long	20                              ## 0x14
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_nv44_vmmgr_ctor:                       ## @nv44_vmmgr_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	$24, %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
	movl	%r8d, %r13d
	movq	%rcx, %r14
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_nv_device
	movq	%rax, %r12
	movl	(%rax), %edi
	movq	_PCI_CAP_ID_AGP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_find_capability
	testq	%rax, %rax
	je	LBB0_1
LBB0_8:
	movq	_nv04_vmmgr_oclass@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rcx
	movl	%r13d, %r8d
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nouveau_object_ctor            ## TAILCALL
LBB0_1:
	movl	4(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	$1, %edx
	callq	_nouveau_boolopt
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	leaq	L_.str.1(%rip), %rcx
	leaq	L_.str.2(%rip), %r8
	leaq	-48(%rbp), %r9
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_nouveau_vmmgr_create
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	callq	_nv_object
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testl	%ebx, %ebx
	je	LBB0_3
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_nv04_vm_create@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rdx
	movl	%eax, 40(%rdx)
	movq	_NV44_GART_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, 8(%rdx)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [39,20,12,12]
	movups	%xmm0, 12(%rdx)
	movq	_nv44_vm_map_sg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rdx)
	movq	_nv44_vm_unmap@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rdx)
	movq	_nv44_vm_flush@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rdx)
	movl	(%r12), %edi
	addq	$48, %rdx
	movl	$16384, %esi                    ## imm = 0x4000
	callq	_pci_alloc_consistent
	movq	-48(%rbp), %r9
	movl	%eax, 44(%r9)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	leaq	8(%r9), %rdi
	movl	(%r14), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	movl	$4096, %r8d                     ## imm = 0x1000
	callq	_nouveau_vm_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	(%r14), %eax
	movq	_NV44_GART_PAGE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %edx
	movq	_NVOBJ_FLAG_ZERO_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	8(%rax), %r9
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$524288, %ecx                   ## imm = 0x80000
	callq	_nouveau_gpuobj_new
	movl	%eax, %ebx
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	$1, (%rax)
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str.3(%rip), %rsi
	movq	%r9, %rdi
	callq	_nv_error
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CAP_ID_AGP,4,2             ## @PCI_CAP_ID_AGP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NvPCIE"

	.comm	_nv04_vmmgr_oclass,4,2          ## @nv04_vmmgr_oclass
L_.str.1:                               ## @.str.1
	.asciz	"PCIEGART"

L_.str.2:                               ## @.str.2
	.asciz	"pciegart"

	.comm	_nv04_vm_create,4,2             ## @nv04_vm_create
	.comm	_NV44_GART_SIZE,4,2             ## @NV44_GART_SIZE
	.comm	_nv44_vm_map_sg,4,2             ## @nv44_vm_map_sg
	.comm	_nv44_vm_unmap,4,2              ## @nv44_vm_unmap
	.comm	_nv44_vm_flush,4,2              ## @nv44_vm_flush
L_.str.3:                               ## @.str.3
	.asciz	"unable to allocate dummy pages\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NV44_GART_PAGE,4,2             ## @NV44_GART_PAGE
	.comm	_NVOBJ_FLAG_ZERO_ALLOC,4,2      ## @NVOBJ_FLAG_ZERO_ALLOC
	.no_dead_strip	_nv44_vmmgr_ctor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function nv44_vmmgr_ctor
lCPI0_0:
	.long	39                              ; 0x27
	.long	20                              ; 0x14
	.long	12                              ; 0xc
	.long	12                              ; 0xc
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_nv44_vmmgr_ctor:                       ; @nv44_vmmgr_ctor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x5
	mov	x24, x4
	mov	x25, x3
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	bl	_nv_device
	mov	x20, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _PCI_CAP_ID_AGP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_CAP_ID_AGP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_pci_find_capability
	cbz	x0, LBB0_2
LBB0_1:
Lloh3:
	adrp	x2, _nv04_vmmgr_oclass@GOTPAGE
Lloh4:
	ldr	x2, [x2, _nv04_vmmgr_oclass@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x22
	mov	x3, x25
	mov	x4, x24
	mov	x5, x21
	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
	add	sp, sp, #96
	b	_nouveau_object_ctor
LBB0_2:
	ldr	w0, [x20, #4]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #1
	bl	_nouveau_boolopt
	cbz	w0, LBB0_1
; %bb.3:
Lloh7:
	adrp	x3, l_.str.1@PAGE
Lloh8:
	add	x3, x3, l_.str.1@PAGEOFF
Lloh9:
	adrp	x4, l_.str.2@PAGE
Lloh10:
	add	x4, x4, l_.str.2@PAGEOFF
	add	x5, sp, #8
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_nouveau_vmmgr_create
	mov	x22, x0
	ldr	x0, [sp, #8]
	bl	_nv_object
	str	x0, [x21]
	cbz	w22, LBB0_5
LBB0_4:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_5:
Lloh11:
	adrp	x8, _nv04_vm_create@GOTPAGE
Lloh12:
	ldr	x8, [x8, _nv04_vm_create@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
Lloh14:
	adrp	x21, _NV44_GART_SIZE@GOTPAGE
Lloh15:
	ldr	x21, [x21, _NV44_GART_SIZE@GOTPAGEOFF]
	ldr	w10, [x21]
	str	w10, [x9, #8]
Lloh16:
	adrp	x10, lCPI0_0@PAGE
Lloh17:
	ldr	q0, [x10, lCPI0_0@PAGEOFF]
	stur	q0, [x9, #12]
Lloh18:
	adrp	x10, _nv44_vm_map_sg@GOTPAGE
Lloh19:
	ldr	x10, [x10, _nv44_vm_map_sg@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #36]
Lloh21:
	adrp	x8, _nv44_vm_unmap@GOTPAGE
Lloh22:
	ldr	x8, [x8, _nv44_vm_unmap@GOTPAGEOFF]
Lloh23:
	adrp	x10, _nv44_vm_flush@GOTPAGE
Lloh24:
	ldr	x10, [x10, _nv44_vm_flush@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #28]
	ldr	w0, [x20]
	add	x2, x9, #48
	mov	w1, #16384
	bl	_pci_alloc_consistent
	ldr	x5, [sp, #8]
	str	w0, [x5, #44]
	cbz	w0, LBB0_8
; %bb.6:
	add	x0, x5, #8
	ldr	w2, [x21]
	mov	w1, #0
	mov	w3, #0
	mov	w4, #4096
	bl	_nouveau_vm_create
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.7:
	ldr	w8, [x21]
Lloh27:
	adrp	x9, _NV44_GART_PAGE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _NV44_GART_PAGE@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
Lloh30:
	adrp	x9, _NVOBJ_FLAG_ZERO_ALLOC@GOTPAGE
Lloh31:
	ldr	x9, [x9, _NVOBJ_FLAG_ZERO_ALLOC@GOTPAGEOFF]
	lsl	w2, w8, #2
Lloh32:
	ldr	w4, [x9]
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x5, [x8, #8]
	mov	x0, x19
	mov	x1, #0
	mov	w3, #524288
	bl	_nouveau_gpuobj_new
	mov	x22, x0
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_4
LBB0_8:
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x5
	bl	_nv_error
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdrp	Lloh16, Lloh18
	.loh AdrpLdr	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_CAP_ID_AGP,4,2             ; @PCI_CAP_ID_AGP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NvPCIE"

	.comm	_nv04_vmmgr_oclass,4,2          ; @nv04_vmmgr_oclass
l_.str.1:                               ; @.str.1
	.asciz	"PCIEGART"

l_.str.2:                               ; @.str.2
	.asciz	"pciegart"

	.comm	_nv04_vm_create,4,2             ; @nv04_vm_create
	.comm	_NV44_GART_SIZE,4,2             ; @NV44_GART_SIZE
	.comm	_nv44_vm_map_sg,4,2             ; @nv44_vm_map_sg
	.comm	_nv44_vm_unmap,4,2              ; @nv44_vm_unmap
	.comm	_nv44_vm_flush,4,2              ; @nv44_vm_flush
l_.str.3:                               ; @.str.3
	.asciz	"unable to allocate dummy pages\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NV44_GART_PAGE,4,2             ; @NV44_GART_PAGE
	.comm	_NVOBJ_FLAG_ZERO_ALLOC,4,2      ; @NVOBJ_FLAG_ZERO_ALLOC
	.no_dead_strip	_nv44_vmmgr_ctor
.subsections_via_symbols
