	.file	"extr_sfxge_mcdi.c_sfxge_mcdi_fini.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"MCDI not initialized"
	.text
	.p2align 4
	.globl	sfxge_mcdi_fini
	.type	sfxge_mcdi_fini, @function
sfxge_mcdi_fini:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	r12, QWORD PTR 16[rdi]
	call	SFXGE_MCDI_LOCK@PLT
	mov	rax, QWORD PTR SFXGE_MCDI_INITIALIZED[rip]
	xor	edi, edi
	cmp	QWORD PTR 0[rbp], rax
	sete	dil
	lea	rsi, .LC0[rip]
	call	KASSERT@PLT
	mov	rdi, r12
	call	efx_mcdi_fini@PLT
	lea	rdi, 12[rbp]
	mov	esi, 4
	call	bzero@PLT
	mov	rdi, rbp
	call	SFXGE_MCDI_UNLOCK@PLT
	lea	rdi, 8[rbp]
	call	sfxge_dma_free@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	SFXGE_MCDI_LOCK_DESTROY@PLT
	.cfi_endproc
.LFE0:
	.size	sfxge_mcdi_fini, .-sfxge_mcdi_fini
	.comm	SFXGE_MCDI_INITIALIZED,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sfxge_mcdi.c_sfxge_mcdi_fini.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"MCDI not initialized\000"
	.text
	.align	2
	.global	sfxge_mcdi_fini
	.syntax unified
	.arm
	.fpu softvfp
	.type	sfxge_mcdi_fini, %function
sfxge_mcdi_fini:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	mov	r4, r0
	ldr	r6, [r0, #12]
	bl	SFXGE_MCDI_LOCK
	ldr	r3, .L4
	ldr	r0, [r5], #8
	ldr	r3, [r3]
	ldr	r1, .L4+4
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	KASSERT
	mov	r0, r6
	bl	efx_mcdi_fini
	mov	r1, #4
	mov	r0, r5
	bl	bzero
	mov	r0, r4
	bl	SFXGE_MCDI_UNLOCK
	add	r0, r4, #4
	bl	sfxge_dma_free
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	SFXGE_MCDI_LOCK_DESTROY
.L5:
	.align	2
.L4:
	.word	SFXGE_MCDI_INITIALIZED
	.word	.LC0
	.size	sfxge_mcdi_fini, .-sfxge_mcdi_fini
	.comm	SFXGE_MCDI_INITIALIZED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
