	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gp100_vmm_pgt_pfn
_gp100_vmm_pgt_pfn:                     ## @gp100_vmm_pgt_pfn
	.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	%r8, %r14
	movl	%ecx, %r12d
	movl	%edx, %ebx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %edi
	callq	_nvkm_kmap
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.1:
	movq	(%r14), %rax
	shll	$3, %ebx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_NVKM_VMM_PFN_ADDR@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	sarl	$4, %r15d
	xorl	%edi, %edi
	callq	_BIT_ULL
	orl	%r13d, %eax
	orl	%r15d, %eax
	movl	%eax, %r13d
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	%r13d, %ecx
	callq	_VMM_WO064
	movq	(%r14), %rax
	addq	$4, %rax
	movq	%rax, (%r14)
	addl	$8, %ebx
	testl	%r12d, %r12d
	je	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax), %r15d
	movl	$0, %r13d
	movq	_NVKM_VMM_PFN_W@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$6, %edi
	callq	_BIT_ULL
	movl	%eax, %r13d
	movq	(%r14), %rax
	movl	(%rax), %r15d
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	decl	%r12d
	movq	_NVKM_VMM_PFN_VRAM@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_NVKM_VMM_PFN_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	sarl	%cl, %r15d
	movl	%r15d, %edi
	callq	_pfn_to_page
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_dma_map_page
	movl	%eax, %r15d
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_WARN_ON
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	sarl	$4, %r15d
	movl	$3, %edi
	callq	_BIT_ULL
	movl	%eax, %r14d
	xorl	%edi, %edi
	callq	_BIT_ULL
	orl	%r15d, %r13d
	orl	%r14d, %eax
	orl	%r13d, %eax
	orl	$4, %eax
	movl	%eax, %r13d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_done                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_VMM_PFN_W,4,2             ## @NVKM_VMM_PFN_W
	.comm	_NVKM_VMM_PFN_VRAM,4,2          ## @NVKM_VMM_PFN_VRAM
	.comm	_NVKM_VMM_PFN_ADDR_SHIFT,4,2    ## @NVKM_VMM_PFN_ADDR_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_NVKM_VMM_PFN_ADDR,4,2          ## @NVKM_VMM_PFN_ADDR
	.no_dead_strip	_gp100_vmm_pgt_pfn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gp100_vmm_pgt_pfn
_gp100_vmm_pgt_pfn:                     ; @gp100_vmm_pgt_pfn
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x20, x3
	mov	x24, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x23, [x8]
	ldr	w0, [x1]
	bl	_nvkm_kmap
	cbz	w20, LBB0_10
; %bb.1:
	ldr	x8, [x19]
	lsl	w24, w24, #3
Lloh0:
	adrp	x27, _NVKM_VMM_PFN_W@GOTPAGE
Lloh1:
	ldr	x27, [x27, _NVKM_VMM_PFN_W@GOTPAGEOFF]
Lloh2:
	adrp	x28, _NVKM_VMM_PFN_VRAM@GOTPAGE
Lloh3:
	ldr	x28, [x28, _NVKM_VMM_PFN_VRAM@GOTPAGEOFF]
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh4:
	adrp	x9, _NVKM_VMM_PFN_ADDR@GOTPAGE
Lloh5:
	ldr	x9, [x9, _NVKM_VMM_PFN_ADDR@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	and	w26, w9, w8
	mov	w0, #0
	bl	_BIT_ULL
	orr	w8, w0, w25
	orr	w25, w8, w26, asr #4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	mov	x3, x25
	bl	_VMM_WO064
	ldr	x8, [x19]
	add	x8, x8, #4
	str	x8, [x19]
	add	w24, w24, #8
	cbz	w20, LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x8]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w25, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #6
	bl	_BIT_ULL
	mov	x25, x0
	ldr	x8, [x19]
	ldr	w8, [x8]
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	w20, w20, #1
	ldr	w9, [x28]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh7:
	adrp	x9, _NVKM_VMM_PFN_ADDR_SHIFT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _NVKM_VMM_PFN_ADDR_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	asr	w0, w8, w9
	bl	_pfn_to_page
	mov	x1, x0
Lloh10:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
Lloh13:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
	mov	x0, x23
	mov	w2, #0
	bl	_dma_map_page
	mov	x26, x0
	mov	x0, x23
	mov	x1, x26
	bl	_dma_mapping_error
	bl	_WARN_ON
	cbnz	w0, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #3
	bl	_BIT_ULL
	mov	x21, x22
	mov	x22, x23
	mov	x23, x28
	mov	x28, x27
	mov	x27, x0
	mov	w0, #0
	bl	_BIT_ULL
	orr	w8, w25, w26, asr #4
	orr	w8, w8, w27
	mov	x27, x28
	mov	x28, x23
	mov	x23, x22
	mov	x22, x21
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	orr	w8, w8, w0
	orr	w25, w8, #0x4
	b	LBB0_3
LBB0_10:
	ldr	w0, [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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_nvkm_done
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_VMM_PFN_W,4,2             ; @NVKM_VMM_PFN_W
	.comm	_NVKM_VMM_PFN_VRAM,4,2          ; @NVKM_VMM_PFN_VRAM
	.comm	_NVKM_VMM_PFN_ADDR_SHIFT,4,2    ; @NVKM_VMM_PFN_ADDR_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_NVKM_VMM_PFN_ADDR,4,2          ; @NVKM_VMM_PFN_ADDR
	.no_dead_strip	_gp100_vmm_pgt_pfn
.subsections_via_symbols
