	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_bo_destruct
_tegra_bo_destruct:                     ## @tegra_bo_destruct
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 16(%rdi)
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r15
	movl	32(%rdi), %edi
	callq	_round_page
	movq	%rax, %r14
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movl	8(%r15), %esi
	callq	_pmap_qremove
LBB0_3:
	movq	16(%r15), %rdi
	callq	_VM_OBJECT_WLOCK
	cmpl	$0, 8(%r15)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	movq	_PG_FICTITIOUS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rdi
	movq	24(%r15), %rax
	movq	(%rax,%rbx,8), %r12
	movq	%r12, %rsi
	callq	_cdev_pager_free_page
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, (%r12)
	movq	%r12, %rdi
	callq	_vm_page_unwire_noq
	movq	%r12, %rdi
	callq	_vm_page_free
	incq	%rbx
	movslq	8(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	16(%r15), %rdi
	callq	_VM_OBJECT_WUNLOCK
	movq	16(%r15), %rdi
	callq	_vm_object_deallocate
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.8:
	movq	_kmem_arena@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vmem_free                      ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PG_FICTITIOUS,4,2              ## @PG_FICTITIOUS
	.comm	_kmem_arena,4,2                 ## @kmem_arena
	.no_dead_strip	_tegra_bo_destruct
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_bo_destruct
_tegra_bo_destruct:                     ; @tegra_bo_destruct
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	w0, [x0, #32]
	bl	_round_page
	mov	x19, x0
	ldr	x0, [x20]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w1, [x20, #8]
	bl	_pmap_qremove
LBB0_3:
	ldr	x0, [x20, #16]
	bl	_VM_OBJECT_WLOCK
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x22, #0
Lloh0:
	adrp	x23, _PG_FICTITIOUS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PG_FICTITIOUS@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x0, x8, [x20, #16]
	ldr	x21, [x8, x22, lsl #3]
	mov	x1, x21
	bl	_cdev_pager_free_page
	ldr	w8, [x23]
	ldr	w9, [x21]
	bic	w8, w9, w8
	str	w8, [x21]
	mov	x0, x21
	bl	_vm_page_unwire_noq
	mov	x0, x21
	bl	_vm_page_free
	add	x22, x22, #1
	ldrsw	x8, [x20, #8]
	cmp	x22, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	x0, [x20, #16]
	bl	_VM_OBJECT_WUNLOCK
	ldr	x0, [x20, #16]
	bl	_vm_object_deallocate
	ldr	x1, [x20]
	cbz	x1, LBB0_8
; %bb.7:
Lloh2:
	adrp	x8, _kmem_arena@GOTPAGE
Lloh3:
	ldr	x8, [x8, _kmem_arena@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x2, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_vmem_free
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PG_FICTITIOUS,4,2              ; @PG_FICTITIOUS
	.comm	_kmem_arena,4,2                 ; @kmem_arena
	.no_dead_strip	_tegra_bo_destruct
.subsections_via_symbols
