	.file	"extr_graphics.c_gx_priv_restore.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"gx_priv_restore: eglMakeCurrent: %s, res %x draw_surface %x, surface %x, cxt %x"
	.text
	.p2align 4
	.globl	gx_priv_restore
	.type	gx_priv_restore, @function
gx_priv_restore:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xor	eax, eax
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	mov	r14, QWORD PTR 8[rdi]
	mov	r13, QWORD PTR 16[rdi]
	mov	r12, QWORD PTR 24[rdi]
	mov	rbp, QWORD PTR [rdi]
	call	vcos_thread_current@PLT
	mov	edi, eax
	call	vcos_thread_get_name@PLT
	mov	r9d, r14d
	mov	r8d, r13d
	mov	ecx, r12d
	mov	esi, eax
	mov	edx, ebp
	lea	rdi, .LC0[rip]
	call	GX_TRACE@PLT
	mov	rsi, QWORD PTR EGL_NO_SURFACE[rip]
	mov	rcx, QWORD PTR EGL_NO_CONTEXT[rip]
	mov	edi, DWORD PTR display[rip]
	mov	rdx, rsi
	call	eglMakeCurrent@PLT
	mov	edi, eax
	call	vcos_assert@PLT
	mov	edi, DWORD PTR 32[rbx]
	call	eglBindAPI@PLT
	mov	edi, eax
	call	vcos_assert@PLT
	mov	rcx, QWORD PTR 8[rbx]
	mov	rdx, QWORD PTR 16[rbx]
	mov	rsi, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR display[rip]
	call	eglMakeCurrent@PLT
	mov	edi, eax
	call	vcos_assert@PLT
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	je	.L2
	mov	QWORD PTR [rax], 0
.L2:
	pop	rbx
	.cfi_def_cfa_offset 40
	lea	rdi, lock[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	vcos_mutex_unlock@PLT
	.cfi_endproc
.LFE0:
	.size	gx_priv_restore, .-gx_priv_restore
	.comm	lock,4,4
	.comm	display,4,4
	.comm	EGL_NO_SURFACE,8,8
	.comm	EGL_NO_CONTEXT,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_graphics.c_gx_priv_restore.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"gx_priv_restore: eglMakeCurrent: %s, res %x draw_su"
	.ascii	"rface %x, surface %x, cxt %x\000"
	.text
	.align	2
	.global	gx_priv_restore
	.syntax unified
	.arm
	.fpu softvfp
	.type	gx_priv_restore, %function
gx_priv_restore:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	sub	sp, sp, #12
	mov	r4, r0
	bl	vcos_thread_current
	bl	vcos_thread_get_name
	ldmib	r4, {r2, r3}
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r1, r0
	ldr	r3, [r4, #12]
	ldr	r2, [r4]
	ldr	r0, .L8
	bl	GX_TRACE
	ldr	r2, .L8+4
	ldr	r5, .L8+8
	ldr	r2, [r2]
	ldr	r3, .L8+12
	mov	r1, r2
	ldr	r3, [r3]
	ldr	r0, [r5]
	bl	eglMakeCurrent
	bl	vcos_assert
	ldr	r0, [r4, #16]
	bl	eglBindAPI
	bl	vcos_assert
	ldr	r2, [r4, #8]
	ldr	r3, [r4, #4]
	ldr	r1, [r4, #12]
	ldr	r0, [r5]
	bl	eglMakeCurrent
	bl	vcos_assert
	ldr	r3, [r4]
	ldr	r0, .L8+16
	cmp	r3, #0
	movne	r2, #0
	strne	r2, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	vcos_mutex_unlock
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	EGL_NO_SURFACE
	.word	display
	.word	EGL_NO_CONTEXT
	.word	lock
	.size	gx_priv_restore, .-gx_priv_restore
	.comm	lock,4,4
	.comm	display,4,4
	.comm	EGL_NO_SURFACE,4,4
	.comm	EGL_NO_CONTEXT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
