	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_cs_parser_fini
_radeon_cs_parser_fini:                 ## @radeon_cs_parser_fini
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	testl	%edx, %edx
	je	LBB0_4
## %bb.3:
	leaq	76(%r15), %rdi
	leaq	72(%r15), %rsi
	callq	_ttm_eu_backoff_reservation
	jmp	LBB0_4
LBB0_1:
	leaq	72(%r15), %r14
	movq	_cmp_size_smaller_first@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movq	%r14, %rsi
	callq	_list_sort
	leaq	76(%r15), %rdi
	movq	24(%r15), %rdx
	movq	%r14, %rsi
	callq	_ttm_eu_fence_buffer_objects
LBB0_4:
	movq	56(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.5:
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.6:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	callq	_drm_gem_object_put_unlocked
	movl	(%r15), %eax
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	56(%r15), %rcx
	incq	%rbx
	jmp	LBB0_7
LBB0_11:
	movq	64(%r15), %rdi
	callq	_kfree
	movq	56(%r15), %rdi
	callq	_kvfree
	movq	48(%r15), %rdi
	callq	_kvfree
	cmpl	$0, 4(%r15)
	je	LBB0_14
## %bb.12:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_kvfree
	incq	%rbx
	movl	4(%r15), %eax
	cmpq	%rax, %rbx
	jb	LBB0_13
LBB0_14:
	movq	40(%r15), %rdi
	callq	_kfree
	movq	32(%r15), %rdi
	callq	_kfree
	movl	16(%r15), %edi
	leaq	24(%r15), %rsi
	callq	_radeon_ib_free
	movl	16(%r15), %edi
	addq	$8, %r15
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_ib_free                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cmp_size_smaller_first,4,2     ## @cmp_size_smaller_first
	.no_dead_strip	_radeon_cs_parser_fini
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_cs_parser_fini
_radeon_cs_parser_fini:                 ; @radeon_cs_parser_fini
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	cbz	w1, LBB0_4
; %bb.1:
	cbz	w2, LBB0_3
; %bb.2:
	add	x0, x19, #76
	add	x1, x19, #72
	bl	_ttm_eu_backoff_reservation
LBB0_3:
	ldr	x9, [x19, #56]
	cbnz	x9, LBB0_5
	b	LBB0_10
LBB0_4:
	add	x20, x19, #72
Lloh0:
	adrp	x8, _cmp_size_smaller_first@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cmp_size_smaller_first@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, #0
	mov	x1, x20
	bl	_list_sort
	add	x0, x19, #76
	ldr	x2, [x19, #24]
	mov	x1, x20
	bl	_ttm_eu_fence_buffer_objects
	ldr	x9, [x19, #56]
	cbz	x9, LBB0_10
LBB0_5:
	ldr	w8, [x19]
	cbz	w8, LBB0_10
; %bb.6:
	mov	x20, #0
	ldr	x0, [x9, x20, lsl #3]
	cbz	x0, LBB0_8
LBB0_7:
	bl	_drm_gem_object_put_unlocked
	ldr	w8, [x19]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x20, x20, #1
	cmp	x20, w8, uxtw
	b.hs	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x19, #56]
	ldr	x0, [x9, x20, lsl #3]
	cbnz	x0, LBB0_7
	b	LBB0_8
LBB0_10:
	ldr	x0, [x19, #64]
	bl	_kfree
	ldr	x0, [x19, #56]
	bl	_kvfree
	ldr	x0, [x19, #48]
	bl	_kvfree
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_13
; %bb.11:
	mov	x20, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	x0, [x8, x20, lsl #3]
	bl	_kvfree
	add	x20, x20, #1
	ldr	w8, [x19, #4]
	cmp	x20, x8
	b.lo	LBB0_12
LBB0_13:
	ldr	x0, [x19, #40]
	bl	_kfree
	ldr	x0, [x19, #32]
	bl	_kfree
	ldr	w0, [x19, #16]
	add	x1, x19, #24
	bl	_radeon_ib_free
	ldr	w0, [x19, #16]
	add	x1, x19, #8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_radeon_ib_free
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_cmp_size_smaller_first,4,2     ; @cmp_size_smaller_first
	.no_dead_strip	_radeon_cs_parser_fini
.subsections_via_symbols
