	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_mm_init                ## -- Begin function nouveau_mm_init
	.p2align	4, 0x90
_nouveau_mm_init:                       ## @nouveau_mm_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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movq	%rcx, %r12
	leaq	24(%rbx), %rdi
	callq	_mutex_init
	leaq	12(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	8(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	%r12, 16(%rbx)
	movq	$0, (%rbx)
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movq	16(%rbx), %rsi
	movq	%r15, %rdi
	callq	_roundup
	movq	%rax, 8(%r12)
	addq	%r15, %r14
	movq	16(%rbx), %rsi
	movq	%r14, %rdi
	callq	_rounddown
	subl	8(%r12), %eax
	movl	%eax, 16(%r12)
LBB0_6:
	movq	%r12, %rdi
	addq	$4, %rdi
	leaq	12(%rbx), %rsi
	callq	_list_add_tail
	leaq	8(%rbx), %rsi
	movq	%r12, %rdi
	callq	_list_add_tail
	incq	(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_mm_init                ; -- Begin function nouveau_mm_init
	.p2align	2
_nouveau_mm_init:                       ; @nouveau_mm_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	x20, x2
	mov	x21, x1
	mov	x19, x0
	cbz	x3, LBB0_2
; %bb.1:
	mov	x22, x3
	add	x0, x19, #24
	bl	_mutex_init
	add	x0, x19, #12
	bl	_INIT_LIST_HEAD
	add	x0, x19, #8
	bl	_INIT_LIST_HEAD
	str	x22, [x19, #16]
	str	xzr, [x19]
LBB0_2:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x22, x0
	cbz	x20, LBB0_5
; %bb.4:
	ldr	x1, [x19, #16]
	mov	x0, x21
	bl	_roundup
	str	x0, [x22, #8]
	add	x0, x20, x21
	ldr	x1, [x19, #16]
	bl	_rounddown
	ldr	w8, [x22, #8]
	sub	w8, w0, w8
	str	w8, [x22, #16]
LBB0_5:
	add	x0, x22, #4
	add	x1, x19, #12
	bl	_list_add_tail
	add	x1, x19, #8
	mov	x0, x22
	bl	_list_add_tail
	mov	w0, #0
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	b	LBB0_7
LBB0_6:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
