	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lima_vm_bo_del                 ## -- Begin function lima_vm_bo_del
	.p2align	4, 0x90
_lima_vm_bo_del:                        ## @lima_vm_bo_del
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_lima_vm_bo_find
	movq	%rax, %rbx
	movq	(%rax), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, (%rbx)
	cmpq	$2, %rax
	jl	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_2:
	movq	%r15, %rdi
	callq	_mutex_lock
	leaq	16(%rbx), %r12
	movq	16(%rbx), %rax
	movq	24(%rbx), %rsi
	leaq	(%rsi,%rax), %rdx
	decq	%rdx
	movq	%r15, %rdi
	callq	_lima_vm_unmap_page_table
	movq	%r12, %rdi
	callq	_drm_mm_remove_node
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_list_del
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lima_vm_bo_del                 ; -- Begin function lima_vm_bo_del
	.p2align	2
_lima_vm_bo_del:                        ; @lima_vm_bo_del
	.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
	mov	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_mutex_lock
	mov	x0, x21
	mov	x1, x19
	bl	_lima_vm_bo_find
	ldr	x8, [x0]
	sub	x9, x8, #1
	str	x9, [x0]
	cmp	x8, #2
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x19
	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
LBB0_2:
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_lock
	ldr	x1, [x20, #24]
	mov	x22, x20
	ldr	x8, [x22, #16]!
	add	x8, x1, x8
	sub	x2, x8, #1
	mov	x0, x21
	bl	_lima_vm_unmap_page_table
	mov	x0, x22
	bl	_drm_mm_remove_node
	mov	x0, x21
	bl	_mutex_unlock
	add	x0, x20, #8
	bl	_list_del
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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	_kfree
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
