	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_ttm_init               ## -- Begin function nouveau_ttm_init
	.p2align	4, 0x90
_nouveau_ttm_init:                      ## @nouveau_ttm_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	48(%rdi), %r14
	movl	40(%rdi), %edi
	callq	_nouveau_vmmgr
	movq	24(%r15), %rcx
	movq	_ENABLED@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rcx
	je	LBB0_2
## %bb.1:
	movl	(%rax), %r12d
	movl	(%r14), %ebx
	movl	%r12d, %edi
	callq	_DMA_BIT_MASK
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_pci_dma_supported
	testl	%eax, %eax
	jne	LBB0_3
LBB0_2:
	movl	$32, %r12d
LBB0_3:
	movl	(%r14), %ebx
	movl	%r12d, %edi
	callq	_DMA_BIT_MASK
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_pci_set_dma_mask
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.4:
	movl	(%r14), %ebx
	movl	%r12d, %edi
	callq	_DMA_BIT_MASK
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_pci_set_consistent_dma_mask
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	(%r14), %ebx
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_pci_set_consistent_dma_mask
LBB0_6:
	movq	%r15, %rdi
	callq	_nouveau_ttm_global_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.7:
	leaq	8(%r15), %rdi
	movl	16(%r15), %esi
	movq	_DRM_FILE_PAGE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r8d, %r8d
	cmpl	$33, %r12d
	setl	%r8b
	movq	_nouveau_bo_driver@GOTPCREL(%rip), %rdx
	movq	%rdi, %r12
	callq	_ttm_bo_device_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_9
LBB0_10:
	movl	40(%r15), %edi
	callq	_nouveau_fb
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movl	40(%r15), %edi
	callq	_nouveau_instmem
	movl	(%r15), %edx
	subl	(%rax), %edx
	movl	%edx, (%r15)
	movq	_TTM_PL_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edx
	movq	%r12, %rdi
	callq	_ttm_bo_init_mm
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_12:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	movl	$1, %esi
	callq	_pci_resource_start
	movl	%eax, %ebx
	movl	(%r14), %edi
	movl	$1, %esi
	callq	_pci_resource_len
	movq	_DRM_MTRR_WC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_drm_mtrr_add
	movl	%eax, 12(%r15)
	movq	24(%r15), %rax
	cmpq	(%r13), %rax
	jne	LBB0_13
## %bb.14:
	movl	32(%r15), %edx
	jmp	LBB0_15
LBB0_13:
	movl	40(%r15), %edi
	callq	_nouveau_vmmgr
	movl	4(%rax), %eax
	cmpl	$536870912, %eax                ## imm = 0x20000000
	movl	$536870912, %edx                ## imm = 0x20000000
	cmovll	%eax, %edx
LBB0_15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movl	%edx, 4(%r15)
	movq	_TTM_PL_TT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	(%rcx), %cl
	sarl	%cl, %edx
	callq	_ttm_bo_init_mm
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_9:
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_NV_ERROR
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	(%r15), %edx
	sarl	$20, %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_NV_INFO
	movl	4(%r15), %edx
	sarl	$20, %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_NV_INFO
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_ENABLED,8,3                    ## @ENABLED
	.comm	_nouveau_bo_driver,4,2          ## @nouveau_bo_driver
	.comm	_DRM_FILE_PAGE_OFFSET,4,2       ## @DRM_FILE_PAGE_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error initialising bo driver, %d\n"

	.comm	_TTM_PL_VRAM,4,2                ## @TTM_PL_VRAM
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"VRAM mm init failed, %d\n"

	.comm	_DRM_MTRR_WC,4,2                ## @DRM_MTRR_WC
	.comm	_TTM_PL_TT,4,2                  ## @TTM_PL_TT
L_.str.2:                               ## @.str.2
	.asciz	"GART mm init failed, %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"VRAM: %d MiB\n"

L_.str.4:                               ## @.str.4
	.asciz	"GART: %d MiB\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_ttm_init               ; -- Begin function nouveau_ttm_init
	.p2align	2
_nouveau_ttm_init:                      ; @nouveau_ttm_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	ldr	x24, [x0, #48]
	ldr	w0, [x0, #40]
	bl	_nouveau_vmmgr
	ldr	x8, [x19, #24]
Lloh0:
	adrp	x23, _ENABLED@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ENABLED@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	ldr	w21, [x0]
	ldr	w20, [x24]
	mov	x0, x21
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_pci_dma_supported
	cbnz	w0, LBB0_3
LBB0_2:
	mov	w21, #32
LBB0_3:
	ldr	w20, [x24]
	mov	x0, x21
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_pci_set_dma_mask
	mov	x22, x0
	cbnz	w0, LBB0_17
; %bb.4:
	ldr	w20, [x24]
	mov	x0, x21
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_pci_set_consistent_dma_mask
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w20, [x24]
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_pci_set_consistent_dma_mask
LBB0_6:
	mov	x0, x19
	bl	_nouveau_ttm_global_init
	mov	x22, x0
	cbnz	w0, LBB0_17
; %bb.7:
	add	x20, x19, #8
	ldr	w1, [x19, #16]
Lloh2:
	adrp	x8, _DRM_FILE_PAGE_OFFSET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DRM_FILE_PAGE_OFFSET@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	cmp	w21, #33
	cset	w4, lt
Lloh5:
	adrp	x2, _nouveau_bo_driver@GOTPAGE
Lloh6:
	ldr	x2, [x2, _nouveau_bo_driver@GOTPAGEOFF]
	mov	x0, x20
	bl	_ttm_bo_device_init
	cbz	w0, LBB0_9
; %bb.8:
	mov	x22, x0
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_9:
	ldr	w0, [x19, #40]
	bl	_nouveau_fb
	ldr	w8, [x0]
	str	w8, [x19]
	ldr	w0, [x19, #40]
	bl	_nouveau_instmem
	ldr	w8, [x0]
	ldr	w9, [x19]
	sub	w8, w9, w8
Lloh9:
	adrp	x9, _TTM_PL_VRAM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TTM_PL_VRAM@GOTPAGEOFF]
	str	w8, [x19]
Lloh11:
	ldr	w1, [x9]
Lloh12:
	adrp	x25, _PAGE_SHIFT@GOTPAGE
Lloh13:
	ldr	x25, [x25, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x25]
	asr	w2, w8, w9
	mov	x0, x20
	bl	_ttm_bo_init_mm
	cbz	w0, LBB0_11
; %bb.10:
	mov	x22, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_11:
	ldr	w0, [x24]
	mov	w1, #1
	bl	_pci_resource_start
	mov	x21, x0
	ldr	w0, [x24]
	mov	w1, #1
	bl	_pci_resource_len
	mov	x1, x0
Lloh16:
	adrp	x8, _DRM_MTRR_WC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DRM_MTRR_WC@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_drm_mtrr_add
	str	w0, [x19, #12]
	ldr	x8, [x19, #24]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
	ldr	w8, [x19, #32]
	b	LBB0_14
LBB0_13:
	ldr	w0, [x19, #40]
	bl	_nouveau_vmmgr
	ldr	w8, [x0, #4]
	mov	w9, #536870912
	cmp	w8, w9
	csel	w8, w8, w9, lt
LBB0_14:
	str	w8, [x19, #4]
Lloh19:
	adrp	x9, _TTM_PL_TT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _TTM_PL_TT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x9]
	ldr	w9, [x25]
	asr	w2, w8, w9
	mov	x0, x20
	bl	_ttm_bo_init_mm
	mov	x22, x0
	cbz	w0, LBB0_18
; %bb.15:
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_16:
	mov	x0, x19
	mov	x2, x22
	bl	_NV_ERROR
LBB0_17:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_18:
	ldr	w8, [x19]
	asr	w2, w8, #20
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_NV_INFO
	ldr	w8, [x19, #4]
	asr	w2, w8, #20
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_NV_INFO
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ENABLED,8,3                    ; @ENABLED
	.comm	_nouveau_bo_driver,4,2          ; @nouveau_bo_driver
	.comm	_DRM_FILE_PAGE_OFFSET,4,2       ; @DRM_FILE_PAGE_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error initialising bo driver, %d\n"

	.comm	_TTM_PL_VRAM,4,2                ; @TTM_PL_VRAM
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"VRAM mm init failed, %d\n"

	.comm	_DRM_MTRR_WC,4,2                ; @DRM_MTRR_WC
	.comm	_TTM_PL_TT,4,2                  ; @TTM_PL_TT
l_.str.2:                               ; @.str.2
	.asciz	"GART mm init failed, %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"VRAM: %d MiB\n"

l_.str.4:                               ; @.str.4
	.asciz	"GART: %d MiB\n"

.subsections_via_symbols
