	.file	"extr_hwdec_dxva2gldx.c_mapper_uninit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed unlocking texture for access by OpenGL: %s\n"
	.align 8
.LC1:
	.string	"Failed to unregister Direct3D surface with OpenGL: %s\n"
	.text
	.p2align 4
	.type	mapper_uninit, @function
mapper_uninit:
.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
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rbp, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR 8[rdi]
	call	ra_gl_get@PLT
	mov	rsi, QWORD PTR 16[rbp]
	mov	r12, rax
	test	rsi, rsi
	je	.L3
	mov	rdi, QWORD PTR 24[rbp]
	test	rdi, rdi
	je	.L4
	lea	rdx, 16[rbp]
	mov	esi, 1
	call	[QWORD PTR 16[rax]]
	test	eax, eax
	je	.L20
.L5:
	mov	rsi, QWORD PTR 16[rbp]
	test	rsi, rsi
	je	.L3
	mov	rdi, QWORD PTR 24[rbp]
.L4:
	call	[QWORD PTR 8[r12]]
	test	eax, eax
	je	.L21
	mov	QWORD PTR 16[rbp], 0
.L3:
	mov	edi, 1
	lea	rsi, 8[rbp]
	call	[QWORD PTR [r12]]
	mov	rdi, QWORD PTR 0[rbp]
	mov	QWORD PTR 8[rbp], 0
	test	rdi, rdi
	je	.L8
	call	IDirect3DSurface9_Release@PLT
	mov	QWORD PTR 0[rbp], 0
.L8:
	mov	edi, DWORD PTR 8[rbx]
	mov	rsi, QWORD PTR [rbx]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ra_tex_free@PLT
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	call	mp_LastError_to_str@PLT
	lea	rsi, .LC1[rip]
	mov	rdi, rbx
	mov	edx, eax
	call	MP_ERR@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L20:
	call	mp_LastError_to_str@PLT
	lea	rsi, .LC0[rip]
	mov	rdi, rbx
	mov	edx, eax
	call	MP_ERR@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	mapper_uninit, .-mapper_uninit
	.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_hwdec_dxva2gldx.c_mapper_uninit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed unlocking texture for access by OpenGL: %s\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"Failed to unregister Direct3D surface with OpenGL: "
	.ascii	"%s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mapper_uninit, %function
mapper_uninit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r0, [r0, #4]
	ldr	r5, [r4, #8]
	bl	ra_gl_get
	ldr	r1, [r5, #8]
	mov	r6, r0
	cmp	r1, #0
	beq	.L3
	ldr	r0, [r5, #12]
	cmp	r0, #0
	beq	.L4
	mov	r1, #1
	ldr	r3, [r6, #8]
	add	r2, r5, #8
	blx	r3
	cmp	r0, #0
	beq	.L20
.L5:
	ldr	r1, [r5, #8]
	cmp	r1, #0
	beq	.L3
	ldr	r0, [r5, #12]
.L4:
	ldr	r3, [r6, #4]
	blx	r3
	cmp	r0, #0
	movne	r3, #0
	strne	r3, [r5, #8]
	beq	.L21
.L3:
	mov	r7, #0
	mov	r0, #1
	ldr	r3, [r6]
	add	r1, r5, #4
	blx	r3
	ldr	r0, [r5]
	str	r7, [r5, #4]
	cmp	r0, r7
	beq	.L8
	bl	IDirect3DSurface9_Release
	str	r7, [r5]
.L8:
	ldr	r1, [r4]
	ldr	r0, [r4, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	ra_tex_free
.L21:
	bl	mp_LastError_to_str
	ldr	r1, .L22
	mov	r2, r0
	mov	r0, r4
	bl	MP_ERR
	b	.L3
.L20:
	bl	mp_LastError_to_str
	ldr	r1, .L22+4
	mov	r2, r0
	mov	r0, r4
	bl	MP_ERR
	b	.L5
.L23:
	.align	2
.L22:
	.word	.LC1
	.word	.LC0
	.size	mapper_uninit, .-mapper_uninit
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
