	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_ummu_type
_nvkm_ummu_type:                        ## @nvkm_ummu_type
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rsi, -32(%rbp)
	movl	%edx, -20(%rbp)
	movq	(%rdi), %r14
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	movups	(%rsi), %xmm0
	movups	16(%rsi), %xmm1
	movups	32(%rsi), %xmm2
	movups	%xmm2, 32(%rsp)
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	leaq	-32(%rbp), %rsi
	leaq	-20(%rbp), %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nvif_unpack
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	(%rbx), %rcx
	cmpq	(%r14), %rcx
	jae	LBB0_2
## %bb.3:
	movq	8(%r14), %rdx
	shlq	$4, %rcx
	movq	(%rdx,%rcx), %rax
	movl	8(%rdx,%rcx), %ecx
	movl	%ecx, 40(%rbx)
	movq	_NVKM_MEM_VRAM@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	setne	%dl
	movl	%edx, 8(%rbx)
	movq	_NVKM_MEM_HOST@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	setne	%dl
	movl	%edx, 12(%rbx)
	movq	_NVKM_MEM_COMP@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	setne	%dl
	movl	%edx, 16(%rbx)
	movq	_NVKM_MEM_DISP@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	setne	%dl
	movl	%edx, 20(%rbx)
	movq	_NVKM_MEM_KIND@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	setne	%dl
	movl	%edx, 24(%rbx)
	movq	_NVKM_MEM_MAPPABLE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	setne	%dl
	movl	%edx, 28(%rbx)
	movq	_NVKM_MEM_COHERENT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	setne	%dl
	movl	%edx, 32(%rbx)
	movq	_NVKM_MEM_UNCACHED@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andq	(%rcx), %rax
	setne	%dl
	movl	%edx, 36(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NVKM_MEM_VRAM,8,3              ## @NVKM_MEM_VRAM
	.comm	_NVKM_MEM_HOST,8,3              ## @NVKM_MEM_HOST
	.comm	_NVKM_MEM_COMP,8,3              ## @NVKM_MEM_COMP
	.comm	_NVKM_MEM_DISP,8,3              ## @NVKM_MEM_DISP
	.comm	_NVKM_MEM_KIND,8,3              ## @NVKM_MEM_KIND
	.comm	_NVKM_MEM_MAPPABLE,8,3          ## @NVKM_MEM_MAPPABLE
	.comm	_NVKM_MEM_COHERENT,8,3          ## @NVKM_MEM_COHERENT
	.comm	_NVKM_MEM_UNCACHED,8,3          ## @NVKM_MEM_UNCACHED
	.no_dead_strip	_nvkm_ummu_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_ummu_type
_nvkm_ummu_type:                        ; @nvkm_ummu_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x1
	stur	x1, [x29, #-24]
	stur	w2, [x29, #-28]
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	q0, q1, [x1]
	stp	q0, q1, [sp]
	ldr	q0, [x1, #32]
	str	q0, [sp, #32]
	sub	x1, x29, #24
	sub	x2, x29, #28
	mov	x3, sp
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_nvif_unpack
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.hs	LBB0_3
; %bb.2:
	mov	w0, #0
	ldr	x9, [x20, #8]
	add	x8, x9, x8, lsl #4
	ld1r.2d	{ v0 }, [x8], #8
Lloh3:
	adrp	x9, _NVKM_MEM_VRAM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NVKM_MEM_VRAM@GOTPAGEOFF]
Lloh5:
	ldr	d1, [x9]
Lloh6:
	adrp	x9, _NVKM_MEM_HOST@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NVKM_MEM_HOST@GOTPAGEOFF]
	ldr	w8, [x8]
	ld1.d	{ v1 }[1], [x9]
Lloh8:
	adrp	x9, _NVKM_MEM_COMP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NVKM_MEM_COMP@GOTPAGEOFF]
Lloh10:
	ldr	d2, [x9]
Lloh11:
	adrp	x9, _NVKM_MEM_DISP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NVKM_MEM_DISP@GOTPAGEOFF]
	ld1.d	{ v2 }[1], [x9]
	cmtst.2d	v2, v2, v0
	cmtst.2d	v1, v1, v0
	uzp1.4s	v1, v1, v2
	movi.4s	v2, #1
	and.16b	v1, v1, v2
Lloh13:
	adrp	x9, _NVKM_MEM_KIND@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NVKM_MEM_KIND@GOTPAGEOFF]
Lloh15:
	ldr	d3, [x9]
Lloh16:
	adrp	x9, _NVKM_MEM_MAPPABLE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _NVKM_MEM_MAPPABLE@GOTPAGEOFF]
	ld1.d	{ v3 }[1], [x9]
Lloh18:
	adrp	x9, _NVKM_MEM_COHERENT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _NVKM_MEM_COHERENT@GOTPAGEOFF]
	stur	q1, [x19, #8]
Lloh20:
	ldr	d1, [x9]
Lloh21:
	adrp	x9, _NVKM_MEM_UNCACHED@GOTPAGE
Lloh22:
	ldr	x9, [x9, _NVKM_MEM_UNCACHED@GOTPAGEOFF]
	ld1.d	{ v1 }[1], [x9]
	str	w8, [x19, #40]
	cmtst.2d	v1, v1, v0
	cmtst.2d	v0, v3, v0
	uzp1.4s	v0, v0, v1
	and.16b	v0, v0, v2
	stur	q0, [x19, #24]
	b	LBB0_4
LBB0_3:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NVKM_MEM_VRAM,8,3              ; @NVKM_MEM_VRAM
	.comm	_NVKM_MEM_HOST,8,3              ; @NVKM_MEM_HOST
	.comm	_NVKM_MEM_COMP,8,3              ; @NVKM_MEM_COMP
	.comm	_NVKM_MEM_DISP,8,3              ; @NVKM_MEM_DISP
	.comm	_NVKM_MEM_KIND,8,3              ; @NVKM_MEM_KIND
	.comm	_NVKM_MEM_MAPPABLE,8,3          ; @NVKM_MEM_MAPPABLE
	.comm	_NVKM_MEM_COHERENT,8,3          ; @NVKM_MEM_COHERENT
	.comm	_NVKM_MEM_UNCACHED,8,3          ; @NVKM_MEM_UNCACHED
	.no_dead_strip	_nvkm_ummu_type
.subsections_via_symbols
