	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_uvmm_mthd_pfnmap
_nvkm_uvmm_mthd_pfnmap:                 ## @nvkm_uvmm_mthd_pfnmap
	.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	%rsi, %r13
	movq	%rsi, -56(%rbp)
	movl	%edx, -44(%rbp)
	movq	(%rdi), %r15
	movq	8(%rdi), %r14
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	movq	16(%rsi), %rax
	movq	%rax, 16(%rsp)
	movups	(%rsi), %xmm0
	movups	%xmm0, (%rsp)
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_nvif_unpack
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	%r15, %rdx
	movl	(%r13), %r12d
	movl	8(%r13), %r15d
	movl	%r15d, %eax
	movl	%r12d, %ecx
	sarl	%cl, %eax
	movslq	-44(%rbp), %rcx
	cltq
	shlq	$2, %rax
	cmpq	%rcx, %rax
	jne	LBB0_2
## %bb.4:
	cmpl	$0, (%r14)
	je	LBB0_5
## %bb.6:
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.8:
	movl	4(%r13), %ebx
	movq	16(%r13), %r13
	movq	%rdx, %r14
	movq	%rdx, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movq	%r13, %r8
	callq	_nvkm_vmm_pfn_map
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_9
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_nvkm_uvmm_mthd_pfnmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_uvmm_mthd_pfnmap
_nvkm_uvmm_mthd_pfnmap:                 ; @nvkm_uvmm_mthd_pfnmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	str	x1, [sp, #40]
	str	w2, [sp, #36]
	ldp	x19, x23, [x0]
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldr	q0, [x1]
	str	q0, [sp]
	ldr	x8, [x1, #16]
	str	x8, [sp, #16]
	add	x1, sp, #40
	add	x2, sp, #36
	mov	x3, sp
	mov	w4, #0
	mov	w5, #0
	mov	w6, #1
	bl	_nvif_unpack
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	w21, [x20]
	ldr	w22, [x20, #8]
	ldrsw	x8, [sp, #36]
	asr	w9, w22, w21
	cmp	x8, w9, sxtw #2
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x23]
	cbz	w8, LBB0_6
; %bb.3:
	cbz	w22, LBB0_9
; %bb.4:
	ldr	w23, [x20, #4]
	ldr	x20, [x20, #16]
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x22
	mov	x4, x20
	bl	_nvkm_vmm_pfn_map
	mov	x21, x0
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_8
LBB0_5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _ENOENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	mov	w21, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_nvkm_uvmm_mthd_pfnmap
.subsections_via_symbols
