	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mcp77_ram_new                  ## -- Begin function mcp77_ram_new
	.p2align	4, 0x90
_mcp77_ram_new:                         ## @mcp77_ram_new
	.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	%rsi, %r13
	movq	%rdi, %r12
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	movl	$1052176, %esi                  ## imm = 0x100E10
	callq	_nvkm_rd32
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	$1052180, %esi                  ## imm = 0x100E14
	callq	_nvkm_rd32
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	shll	$12, %r14d
	leaq	4(%rax), %r8
	movq	%r8, (%r13)
	movq	_NVKM_RAM_TYPE_STOLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_mcp77_ram_func@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	movl	%r14d, %ecx
	callq	_nvkm_ram_ctor
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:
	shll	$12, %r15d
	leal	-1052672(%r14), %eax
	movl	%eax, (%rbx)
	movl	%r15d, 4(%rbx)
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_nvkm_mm_fini
	movq	_NVKM_RAM_MM_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NVKM_RAM_MM_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$262144, %edx                   ## imm = 0x40000
	shrl	%cl, %edx
	addl	$-1314816, %r14d                ## imm = 0xFFEBF000
	sarl	%cl, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %ecx
	movl	$1, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_mm_init                   ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mcp77_ram_func,4,2             ## @mcp77_ram_func
	.comm	_NVKM_RAM_TYPE_STOLEN,4,2       ## @NVKM_RAM_TYPE_STOLEN
	.comm	_NVKM_RAM_MM_NORMAL,4,2         ## @NVKM_RAM_MM_NORMAL
	.comm	_NVKM_RAM_MM_SHIFT,4,2          ## @NVKM_RAM_MM_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mcp77_ram_new                  ; -- Begin function mcp77_ram_new
	.p2align	2
_mcp77_ram_new:                         ; @mcp77_ram_new
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x22, [x0]
	mov	w23, #3600
	movk	w23, #16, lsl #16
	mov	x0, x22
	mov	w1, #3600
	movk	w1, #16, lsl #16
	bl	_nvkm_rd32
	mov	x19, x0
	orr	w1, w23, #0x4
	mov	x0, x22
	bl	_nvkm_rd32
	mov	x23, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	lsl	w23, w23, #12
	add	x4, x0, #4
	str	x4, [x21]
Lloh3:
	adrp	x8, _NVKM_RAM_TYPE_STOLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NVKM_RAM_TYPE_STOLEN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x0, _mcp77_ram_func@GOTPAGE
Lloh7:
	ldr	x0, [x0, _mcp77_ram_func@GOTPAGEOFF]
	mov	x1, x20
	mov	x3, x23
	bl	_nvkm_ram_ctor
	cbnz	w0, LBB0_4
; %bb.2:
	lsl	w8, w19, #12
	sub	w20, w23, #321, lsl #12         ; =1314816
	add	w9, w20, #64, lsl #12           ; =262144
	stp	w9, w8, [x22]
	add	x19, x22, #8
	mov	x0, x19
	bl	_nvkm_mm_fini
Lloh8:
	adrp	x8, _NVKM_RAM_MM_NORMAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NVKM_RAM_MM_NORMAL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _NVKM_RAM_MM_SHIFT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NVKM_RAM_MM_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	w9, #262144
	lsr	w2, w9, w8
	asr	w3, w20, w8
	mov	x0, x19
	mov	w4, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_nvkm_mm_init
LBB0_3:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mcp77_ram_func,4,2             ; @mcp77_ram_func
	.comm	_NVKM_RAM_TYPE_STOLEN,4,2       ; @NVKM_RAM_TYPE_STOLEN
	.comm	_NVKM_RAM_MM_NORMAL,4,2         ; @NVKM_RAM_MM_NORMAL
	.comm	_NVKM_RAM_MM_SHIFT,4,2          ; @NVKM_RAM_MM_SHIFT
.subsections_via_symbols
