	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_cs_parser_fini
_amdgpu_cs_parser_fini:                 ## @amdgpu_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, %r14
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	testl	%edx, %edx
	je	LBB0_3
## %bb.2:
	leaq	68(%r14), %rdi
	leaq	64(%r14), %rsi
	callq	_ttm_eu_backoff_reservation
LBB0_3:
	cmpl	$0, (%r14)
	je	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	56(%r14), %rax
	movl	16(%rax,%rbx), %edi
	callq	_drm_syncobj_put
	movq	56(%r14), %rax
	movq	8(%rax,%rbx), %rdi
	callq	_kfree
	incq	%r15
	movl	(%r14), %eax
	addq	$24, %rbx
	cmpq	%rax, %r15
	jb	LBB0_5
LBB0_6:
	movq	56(%r14), %rdi
	callq	_kfree
	movl	48(%r14), %edi
	callq	_dma_fence_put
	movq	40(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_mutex_unlock
	movq	40(%r14), %rdi
	callq	_amdgpu_ctx_put
LBB0_8:
	movq	32(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_amdgpu_bo_list_put
LBB0_10:
	cmpl	$0, 4(%r14)
	je	LBB0_13
## %bb.11:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rax
	movl	(%rax,%r15), %edi
	callq	_kvfree
	incq	%rbx
	movl	4(%r14), %eax
	addq	$24, %r15
	cmpq	%rax, %rbx
	jb	LBB0_12
LBB0_13:
	movq	24(%r14), %rdi
	callq	_kfree
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_amdgpu_job_free
LBB0_15:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:
	callq	_ttm_to_amdgpu_bo
	movq	%rax, -32(%rbp)
	leaq	-32(%rbp), %rdi
	callq	_amdgpu_bo_unref
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_amdgpu_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 amdgpu_cs_parser_fini
_amdgpu_cs_parser_fini:                 ; @amdgpu_cs_parser_fini
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	cbz	w1, LBB0_3
; %bb.1:
	cbz	w2, LBB0_3
; %bb.2:
	add	x0, x19, #68
	add	x1, x19, #64
	bl	_ttm_eu_backoff_reservation
LBB0_3:
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.4:
	mov	x20, #0
	mov	x21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #56]
	add	x8, x8, x20
	ldr	w0, [x8, #16]
	bl	_drm_syncobj_put
	ldr	x8, [x19, #56]
	add	x8, x8, x20
	ldr	x0, [x8, #8]
	bl	_kfree
	add	x21, x21, #1
	ldr	w8, [x19]
	add	x20, x20, #24
	cmp	x21, x8
	b.lo	LBB0_5
LBB0_6:
	ldr	x0, [x19, #56]
	bl	_kfree
	ldr	w0, [x19, #48]
	bl	_dma_fence_put
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_mutex_unlock
	ldr	x0, [x19, #40]
	bl	_amdgpu_ctx_put
LBB0_8:
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_amdgpu_bo_list_put
LBB0_10:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_13
; %bb.11:
	mov	x20, #0
	mov	x21, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w0, [x8, x20]
	bl	_kvfree
	add	x21, x21, #1
	ldr	w8, [x19, #4]
	add	x20, x20, #24
	cmp	x21, x8
	b.lo	LBB0_12
LBB0_13:
	ldr	x0, [x19, #24]
	bl	_kfree
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_amdgpu_job_free
LBB0_15:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_17
; %bb.16:
	bl	_ttm_to_amdgpu_bo
	str	x0, [sp, #8]
	add	x0, sp, #8
	bl	_amdgpu_bo_unref
LBB0_17:
	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
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_amdgpu_cs_parser_fini
.subsections_via_symbols
