	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv04_mem_map                   ## -- Begin function nv04_mem_map
	.p2align	4, 0x90
_nv04_mem_map:                          ## @nv04_mem_map
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdx, -72(%rbp)
	movl	%ecx, -44(%rbp)
	movq	(%rdi), %r15
	movq	%rsi, %rdi
	callq	_nvkm_memory_addr
	movq	%rax, %r14
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	subl	(%rax), %edi
	movl	(%rbx), %ecx
	leaq	-72(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_nvif_unvers
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	(%r15), %rax
	movq	%r15, %rdi
	movl	$1, %esi
	callq	*(%rax)
	addq	%r14, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	%r13, %rdi
	callq	_nvkm_memory_size
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_ERR_PTR
	movq	16(%rbp), %rcx
	movq	%rax, (%rcx)
LBB0_2:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv04_mem_map                   ; -- Begin function nv04_mem_map
	.p2align	2
_nv04_mem_map:                          ; @nv04_mem_map
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x6
	mov	x20, x5
	mov	x21, x4
	mov	x23, x2
	mov	x22, x1
	str	x2, [sp, #8]
	str	w3, [sp, #4]
	ldr	x24, [x0]
	mov	x0, x1
	bl	_nvkm_memory_addr
	mov	x25, x0
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldr	w3, [x23]
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_nvif_unvers
	mov	x23, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	x0, x24
	mov	w1, #1
	blr	x8
	add	x8, x0, x25
	str	x8, [x21]
	mov	x0, x22
	bl	_nvkm_memory_size
	str	x0, [x20]
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	str	x0, [x19]
LBB0_2:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
