	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv10_ram_new                   ## -- Begin function nv10_ram_new
	.p2align	4, 0x90
_nv10_ram_new:                          ## @nv10_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	movl	$1049100, %esi                  ## imm = 0x10020C
	callq	_nvkm_rd32
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	$1049088, %esi                  ## imm = 0x100200
	callq	_nvkm_rd32
	testb	$1, %al
	jne	LBB0_1
## %bb.2:
	movq	_NVKM_RAM_TYPE_SDRAM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_NVKM_RAM_TYPE_DDR1@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edx
	andl	$-16777216, %r12d               ## imm = 0xFF000000
	movq	_nv04_ram_func@GOTPCREL(%rip), %rdi
	movq	%r15, %rsi
	movl	%r12d, %ecx
	movq	%r14, %r8
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_ram_new_                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_RAM_TYPE_DDR1,4,2         ## @NVKM_RAM_TYPE_DDR1
	.comm	_NVKM_RAM_TYPE_SDRAM,4,2        ## @NVKM_RAM_TYPE_SDRAM
	.comm	_nv04_ram_func,4,2              ## @nv04_ram_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv10_ram_new                   ; -- Begin function nv10_ram_new
	.p2align	2
_nv10_ram_new:                          ; @nv10_ram_new
	.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, x1
	mov	x20, x0
	ldr	x21, [x0]
	mov	w8, #512
	movk	w8, #16, lsl #16
	orr	w1, w8, #0xc
	mov	x0, x21
	bl	_nvkm_rd32
	mov	x22, x0
	mov	x0, x21
	mov	w1, #512
	movk	w1, #16, lsl #16
	bl	_nvkm_rd32
Lloh0:
	adrp	x8, _NVKM_RAM_TYPE_SDRAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVKM_RAM_TYPE_SDRAM@GOTPAGEOFF]
Lloh2:
	adrp	x9, _NVKM_RAM_TYPE_DDR1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NVKM_RAM_TYPE_DDR1@GOTPAGEOFF]
	tst	w0, #0x1
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
Lloh4:
	adrp	x0, _nv04_ram_func@GOTPAGE
Lloh5:
	ldr	x0, [x0, _nv04_ram_func@GOTPAGEOFF]
	and	w3, w22, #0xff000000
	mov	x1, x20
	mov	x4, x19
	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
	b	_nvkm_ram_new_
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_RAM_TYPE_DDR1,4,2         ; @NVKM_RAM_TYPE_DDR1
	.comm	_NVKM_RAM_TYPE_SDRAM,4,2        ; @NVKM_RAM_TYPE_SDRAM
	.comm	_nv04_ram_func,4,2              ; @nv04_ram_func
.subsections_via_symbols
