	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv50_mem_new                   ## -- Begin function nv50_mem_new
	.p2align	4, 0x90
_nv50_mem_new:                          ## @nv50_mem_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movq	%rdi, %r12
	movq	%r8, -56(%rbp)
	movl	%r9d, -44(%rbp)
	movq	_ENOSYS@GOTPCREL(%rip), %r14
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	subl	(%r14), %edi
	movl	(%r8), %ecx
	movq	8(%r8), %r8
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_nvif_unpack
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %ecx
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%eax, %edi
	callq	_nvif_unvers
	testl	%eax, %eax
	je	LBB0_3
## %bb.6:
	xorl	%eax, %eax
	subl	(%r14), %eax
	jmp	LBB0_5
LBB0_1:
	cmpq	$1, 8(%rbx)
	movl	$2, %edx
	sbbl	$0, %edx
	movl	(%rbx), %r13d
	jmp	LBB0_4
LBB0_3:
	movl	$1, %edx
LBB0_4:
	movl	(%r12), %edi
	movq	_NVKM_RAM_MM_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	%r13d, %r9d
	pushq	16(%rbp)
	pushq	$0
	callq	_nvkm_ram_get
	addq	$16, %rsp
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_NVKM_RAM_MM_NORMAL,4,2         ## @NVKM_RAM_MM_NORMAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv50_mem_new                   ; -- Begin function nv50_mem_new
	.p2align	2
_nv50_mem_new:                          ; @nv50_mem_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x6
	mov	x23, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x0
	str	x4, [sp, #8]
	str	w5, [sp, #4]
Lloh0:
	adrp	x24, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ENOSYS@GOTPAGEOFF]
	ldr	w8, [x24]
	neg	w0, w8
	ldp	x3, x4, [x4]
	add	x1, sp, #8
	add	x2, sp, #4
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_nvif_unpack
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w3, [x23]
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_nvif_unvers
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w8, [x24]
	neg	w0, w8
	b	LBB0_6
LBB0_3:
	ldr	x8, [x23, #8]
	cmp	x8, #0
	mov	w8, #1
	cinc	w2, w8, ne
	ldr	w5, [x23]
	b	LBB0_5
LBB0_4:
	mov	w5, #0
	mov	w2, #1
LBB0_5:
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _NVKM_RAM_MM_NORMAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NVKM_RAM_MM_NORMAL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x3, x21
	mov	x4, x20
	mov	w6, #0
	mov	x7, x19
	bl	_nvkm_ram_get
LBB0_6:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_NVKM_RAM_MM_NORMAL,4,2         ; @NVKM_RAM_MM_NORMAL
.subsections_via_symbols
