	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_mmu_ptc_put               ## -- Begin function nvkm_mmu_ptc_put
	.p2align	4, 0x90
_nvkm_mmu_ptc_put:                      ## @nvkm_mmu_ptc_put
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdx), %rbx
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r14
	cmpq	$0, 24(%rbx)
	je	LBB0_3
## %bb.2:
	leaq	4(%r14), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_nvkm_mmu_ptp_put
	movq	%r12, %rdi
	jmp	LBB0_8
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_lock
	testl	%r15d, %r15d
	jne	LBB0_6
## %bb.4:
	movq	8(%rbx), %rsi
	cmpl	$7, (%rsi)
	jg	LBB0_6
## %bb.5:
	leaq	16(%rbx), %rdi
	addq	$4, %rsi
	callq	_list_add_tail
	movq	8(%rbx), %rax
	incl	(%rax)
	jmp	LBB0_7
LBB0_6:
	movq	%rbx, %rdi
	callq	_nvkm_memory_unref
	movq	%rbx, %rdi
	callq	_kfree
LBB0_7:
	movq	%r14, %rdi
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_mmu_ptc_put               ; -- Begin function nvkm_mmu_ptc_put
	.p2align	2
_nvkm_mmu_ptc_put:                      ; @nvkm_mmu_ptc_put
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x20, [x2]
	cbz	x20, LBB0_3
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_4
; %bb.2:
	add	x22, x19, #4
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_nvkm_mmu_ptp_put
	mov	x0, x22
	b	LBB0_9
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	bl	_mutex_lock
	cbnz	w21, LBB0_7
; %bb.5:
	ldr	x8, [x20, #8]
	ldr	w9, [x8]
	cmp	w9, #7
	b.gt	LBB0_7
; %bb.6:
	add	x0, x20, #16
	add	x1, x8, #4
	bl	_list_add_tail
	ldr	x8, [x20, #8]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	bl	_nvkm_memory_unref
	mov	x0, x20
	bl	_kfree
LBB0_8:
	mov	x0, x19
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mutex_unlock
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
