	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_vmm_put_locked            ## -- Begin function nvkm_vmm_put_locked
	.p2align	4, 0x90
_nvkm_vmm_put_locked:                   ## @nvkm_vmm_put_locked
	.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, %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	64(%rsi), %rdi
	callq	_BUG_ON
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, 56(%rbx)
	je	LBB0_18
LBB0_1:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	72(%rbx), %r13
	movl	(%rbx), %r14d
	movq	8(%rbx), %r15
	movq	40(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	32(%rbx), %r12
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_node
	movq	%rax, %rbx
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testq	%rbx, %rbx
	je	LBB0_8
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$0, 64(%rbx)
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	cmpl	%r14d, (%rbx)
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	testq	%r13, %r13
	setne	%al
	cmpq	$0, 72(%rbx)
	sete	%cl
	cmpb	%cl, %al
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=2
	cmpq	%r15, 8(%rbx)
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	addq	32(%rbx), %r12
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_node
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_3
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	jne	LBB0_12
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_NVKM_VMA_PAGE_NONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %rcx
	callq	_nvkm_vmm_ptes_put
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	testl	%r14d, %r14d
	je	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r9d, %r9d
	testq	%r13, %r13
	sete	%r9b
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	48(%rax), %r8
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %rcx
	callq	_nvkm_vmm_ptes_unmap_put
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 64(%rbx)
	jne	LBB0_2
	jmp	LBB0_19
LBB0_18:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 48(%rax)
	je	LBB0_1
LBB0_19:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rbx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rbx)
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_nvkm_vmm_unmap_region
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_node
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%rax, %rbx
	cmpq	$0, 64(%rax)
	jne	LBB0_20
LBB0_24:
	cmpq	$0, 48(%r14)
	je	LBB0_28
## %bb.25:
	cmpq	$0, 56(%r14)
	je	LBB0_27
## %bb.26:
	movq	32(%r14), %rdx
	movq	40(%r14), %rsi
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_nvkm_vmm_ptes_sparse
	jmp	LBB0_28
LBB0_27:
	movq	8(%r14), %rax
	movq	32(%r14), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rax,4), %rsi
	movq	40(%r14), %rdx
	movq	%r15, %rdi
	callq	_nvkm_vmm_ptes_sparse_put
LBB0_28:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_nvkm_vmm_node_remove
	movq	_NVKM_VMA_PAGE_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
	movq	%rax, 8(%r14)
	movq	$0, 24(%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_vmm_put_region            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_VMA_PAGE_NONE,8,3         ## @NVKM_VMA_PAGE_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_vmm_put_locked            ; -- Begin function nvkm_vmm_put_locked
	.p2align	2
_nvkm_vmm_put_locked:                   ; @nvkm_vmm_put_locked
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x25, [x8]
	ldr	x0, [x1, #64]
	bl	_BUG_ON
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_16
LBB0_1:
	mov	x21, x19
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	ldr	x27, [x21, #72]
	ldr	w28, [x21]
	ldr	x26, [x21, #8]
	ldp	x22, x23, [x21, #32]
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	mov	x1, x21
	bl	_node
	mov	x21, x0
	cbz	x0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	x8, [x21, #64]
	cbz	x8, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	w8, [x21]
	cmp	w8, w28
	b.ne	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=2
	cmp	x27, #0
	cset	w8, ne
	ldr	x9, [x21, #72]
	cmp	x9, #0
	cset	w9, eq
	cmp	w8, w9
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	x8, [x21, #8]
	cmp	x8, x26
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	x8, [x21, #32]
	add	x22, x8, x22
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w24, #0
	cbz	w28, LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x27, #0
	cset	w5, eq
	add	x1, x25, x26, lsl #2
	ldr	x4, [x19, #48]
	mov	x0, x20
	mov	x2, x23
	mov	x3, x22
	bl	_nvkm_vmm_ptes_unmap_put
	b	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w24, #1
	cbnz	w28, LBB0_10
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh0:
	adrp	x8, _NVKM_VMA_PAGE_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVKM_VMA_PAGE_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x26, x8
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	add	x1, x25, x26, lsl #2
	mov	x0, x20
	mov	x2, x23
	mov	x3, x22
	bl	_nvkm_vmm_ptes_put
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	tbnz	w24, #0, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x21, #64]
	cbnz	x8, LBB0_2
	b	LBB0_17
LBB0_16:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_1
LBB0_17:
	mov	x21, x19
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	cbz	w8, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_nvkm_vmm_unmap_region
LBB0_20:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_node
	cbz	x0, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x21, x0
	ldr	x8, [x0, #64]
	cbnz	x8, LBB0_18
LBB0_22:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_26
; %bb.23:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_25
; %bb.24:
	ldp	x2, x1, [x19, #32]
	mov	x0, x20
	mov	w3, #0
	bl	_nvkm_vmm_ptes_sparse
	b	LBB0_26
LBB0_25:
	ldr	x8, [x19, #8]
	add	x1, x25, x8, lsl #2
	ldp	x3, x2, [x19, #32]
	mov	x0, x20
	bl	_nvkm_vmm_ptes_sparse_put
LBB0_26:
	mov	x0, x20
	mov	x1, x19
	bl	_nvkm_vmm_node_remove
Lloh3:
	adrp	x8, _NVKM_VMA_PAGE_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NVKM_VMA_PAGE_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #8]
	str	xzr, [x19, #24]
	mov	x0, x20
	mov	x1, x19
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_nvkm_vmm_put_region
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_VMA_PAGE_NONE,8,3         ; @NVKM_VMA_PAGE_NONE
.subsections_via_symbols
