	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_fence_driver_fini       ## -- Begin function amdgpu_fence_driver_fini
	.p2align	4, 0x90
_amdgpu_fence_driver_fini:              ## @amdgpu_fence_driver_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	%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	_AMDGPU_MAX_RINGS@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	%rdi, %r14
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movl	%eax, %ecx
	cmpq	%rcx, %r12
	jae	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	(%r14), %rcx
	movq	(%rcx,%r12,8), %r13
	testq	%r13, %r13
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, (%r13)
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_amdgpu_fence_wait_empty
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_amdgpu_fence_driver_force_completion
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	20(%r13), %edx
	movl	24(%r13), %esi
	movq	%r14, %rdi
	callq	_amdgpu_irq_put
	leaq	32(%r13), %rdi
	callq	_drm_sched_fini
	leaq	16(%r13), %rdi
	callq	_del_timer_sync
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r13), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %edi
	callq	_dma_fence_put
	incl	%ebx
	cmpl	4(%r13), %ebx
	jbe	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rdi
	callq	_kfree
	movq	$0, 8(%r13)
	movl	$0, (%r13)
	movl	(%r15), %eax
	jmp	LBB0_9
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_MAX_RINGS,4,2           ## @AMDGPU_MAX_RINGS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_fence_driver_fini       ; -- Begin function amdgpu_fence_driver_fini
	.p2align	2
_amdgpu_fence_driver_fini:              ; @amdgpu_fence_driver_fini
	.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
Lloh0:
	adrp	x21, _AMDGPU_MAX_RINGS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AMDGPU_MAX_RINGS@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x19, x0
	mov	x22, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, uxtw
	b.hs	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x9, [x19]
	ldr	x20, [x9, x22, lsl #3]
	cbz	x20, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x20]
	cbz	w9, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_amdgpu_fence_wait_empty
	cbz	w0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_amdgpu_fence_driver_force_completion
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	w2, w1, [x20, #20]
	mov	x0, x19
	bl	_amdgpu_irq_put
	add	x0, x20, #32
	bl	_drm_sched_fini
	add	x0, x20, #16
	bl	_del_timer_sync
	mov	w23, #0
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20, #8]
	ldr	w0, [x8, w23, uxtw #2]
	bl	_dma_fence_put
	add	w23, w23, #1
	ldr	w8, [x20, #4]
	cmp	w23, w8
	b.ls	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x20, #8]
	bl	_kfree
	str	xzr, [x20, #8]
	str	wzr, [x20]
	ldr	w8, [x21]
	b	LBB0_2
LBB0_10:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_MAX_RINGS,4,2           ; @AMDGPU_MAX_RINGS
.subsections_via_symbols
