	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_free_object                ## -- Begin function vc4_free_object
	.p2align	4, 0x90
_vc4_free_object:                       ## @vc4_free_object
	.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
	movq	%rdi, %r13
	movq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_to_vc4_dev
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_to_vc4_bo
	movq	%rax, %r12
	leaq	48(%rax), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	movq	_VC4_MADV_DONTNEED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	leaq	32(%r12), %rdi
	callq	_refcount_read
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	callq	_vc4_bo_remove_from_purgeable_pool
LBB0_3:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpq	$0, 16(%r13)
	jne	LBB0_4
## %bb.5:
	cmpq	$0, 8(%r13)
	je	LBB0_6
LBB0_4:
	movq	%r12, %rdi
	callq	_vc4_bo_destroy
LBB0_11:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_6:
	cmpl	$0, 16(%r12)
	je	LBB0_4
## %bb.7:
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_vc4_get_cache_list_for_size
	testq	%rax, %rax
	je	LBB0_4
## %bb.8:
	movq	%rax, %rbx
	movq	40(%r12), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	8(%rax), %rdi
	callq	_kfree
	movq	40(%r12), %rax
	movq	(%rax), %rdi
	callq	_kfree
	movq	40(%r12), %rdi
	callq	_kfree
	movq	$0, 40(%r12)
LBB0_10:
	movq	___VC4_MADV_NOTSUPP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	leaq	32(%r12), %rdi
	xorl	%esi, %esi
	callq	_refcount_set
	movl	$0, 8(%r12)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r12)
	leaq	24(%r12), %rdi
	movq	%rbx, %rsi
	callq	_list_add
	leaq	20(%r12), %rdi
	movq	%r15, %rsi
	addq	$4, %rsi
	callq	_list_add
	addq	$12, %r12
	movq	_VC4_BO_TYPE_KERNEL_CACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_vc4_bo_set_label
	movq	%r14, %rdi
	callq	_vc4_bo_cache_free_old
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_VC4_MADV_DONTNEED,8,3          ## @VC4_MADV_DONTNEED
	.comm	___VC4_MADV_NOTSUPP,8,3         ## @__VC4_MADV_NOTSUPP
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_VC4_BO_TYPE_KERNEL_CACHE,4,2   ## @VC4_BO_TYPE_KERNEL_CACHE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_free_object                ; -- Begin function vc4_free_object
	.p2align	2
_vc4_free_object:                       ; @vc4_free_object
	.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
	mov	x22, x0
	ldr	x20, [x0, #24]
	mov	x0, x20
	bl	_to_vc4_dev
	mov	x19, x0
	mov	x0, x22
	bl	_to_vc4_bo
	mov	x21, x0
	add	x23, x0, #48
	mov	x0, x23
	bl	_mutex_lock
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _VC4_MADV_DONTNEED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VC4_MADV_DONTNEED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	add	x0, x21, #32
	bl	_refcount_read
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_vc4_bo_remove_from_purgeable_pool
LBB0_3:
	mov	x0, x23
	bl	_mutex_unlock
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_7
LBB0_5:
	mov	x0, x21
	bl	_vc4_bo_destroy
LBB0_6:
	mov	x0, 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	_mutex_unlock
LBB0_7:
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_5
; %bb.8:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_vc4_get_cache_list_for_size
	cbz	x0, LBB0_5
; %bb.9:
	mov	x22, x0
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	x0, [x8, #8]
	bl	_kfree
	ldr	x8, [x21, #40]
	ldr	x0, [x8]
	bl	_kfree
	ldr	x0, [x21, #40]
	bl	_kfree
	str	xzr, [x21, #40]
LBB0_11:
Lloh3:
	adrp	x8, ___VC4_MADV_NOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, ___VC4_MADV_NOTSUPP@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x21]
	add	x0, x21, #32
	mov	w1, #0
	bl	_refcount_set
	str	wzr, [x21, #8]
Lloh6:
	adrp	x8, _jiffies@GOTPAGE
Lloh7:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x21, #28]
	add	x0, x21, #24
	mov	x1, x22
	bl	_list_add
	add	x0, x21, #20
	add	x1, x19, #4
	bl	_list_add
	add	x0, x21, #12
Lloh9:
	adrp	x8, _VC4_BO_TYPE_KERNEL_CACHE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VC4_BO_TYPE_KERNEL_CACHE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_vc4_bo_set_label
	mov	x0, x20
	bl	_vc4_bo_cache_free_old
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_VC4_MADV_DONTNEED,8,3          ; @VC4_MADV_DONTNEED
	.comm	___VC4_MADV_NOTSUPP,8,3         ; @__VC4_MADV_NOTSUPP
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_VC4_BO_TYPE_KERNEL_CACHE,4,2   ; @VC4_BO_TYPE_KERNEL_CACHE
.subsections_via_symbols
