	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msm_gpu_cleanup                ## -- Begin function msm_gpu_cleanup
	.p2align	4, 0x90
_msm_gpu_cleanup:                       ## @msm_gpu_cleanup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	28(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	leaq	24(%r14), %rdi
	callq	_list_empty
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	16(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_msm_ringbuffer_destroy
	movq	16(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movq	16(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movl	8(%r14), %edi
	movq	(%r14), %rsi
	xorl	%edx, %edx
	callq	_msm_gem_kernel_put
	movq	(%r14), %rdi
	callq	_IS_ERR_OR_NULL
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	(%r14), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	*(%rax)
	movq	(%r14), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_msm_gem_address_space_put      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msm_gpu_cleanup                ; -- Begin function msm_gpu_cleanup
	.p2align	2
_msm_gpu_cleanup:                       ; @msm_gpu_cleanup
	.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, x0
	ldr	w1, [x0, #28]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	add	x0, x19, #24
	bl	_list_empty
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	x0, [x19, #16]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	lsl	x21, x20, #3
	ldr	x0, [x8, x21]
	bl	_msm_ringbuffer_destroy
	ldr	x8, [x19, #16]
	str	xzr, [x8, x21]
	add	x20, x20, #1
	ldr	x0, [x19, #16]
	bl	_ARRAY_SIZE
	cmp	x20, w0, sxtw
	b.lt	LBB0_2
LBB0_3:
	ldr	w0, [x19, #8]
	ldr	x1, [x19]
	mov	w2, #0
	bl	_msm_gem_kernel_put
	ldr	x0, [x19]
	bl	_IS_ERR_OR_NULL
	cbz	w0, LBB0_5
; %bb.4:
	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
	ret
LBB0_5:
	ldr	x8, [x19]
	ldr	x0, [x8]
	ldr	x8, [x0]
	ldr	x8, [x8]
	mov	x1, #0
	mov	w2, #0
	blr	x8
	ldr	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	_msm_gem_address_space_put
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

.subsections_via_symbols
