	.file	"extr_vcsm_square.c_vcsm_square_redraw.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Failed to lock VCSM buffer for handle %d\n"
	.section	.rodata.str1.1
.LC2:
	.string	"Locked vcsm handle %d at %p\n"
	.text
	.p2align 4
	.type	vcsm_square_redraw, @function
vcsm_square_redraw:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	lea	rdi, .LC0[rip]
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR VCOS_FUNCTION[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	vcos_log_trace@PLT
	xor	edx, edx
	mov	ecx, 255
	xor	esi, esi
	mov	edi, 255
	call	glClearColor@PLT
	mov	esi, DWORD PTR fb_name[rip]
	mov	edi, DWORD PTR GL_FRAMEBUFFER[rip]
	call	glBindFramebuffer@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	ecx, DWORD PTR fb_height[rip]
	xor	esi, esi
	xor	edi, edi
	mov	edx, DWORD PTR fb_width[rip]
	call	glViewport@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	edi, DWORD PTR GL_COLOR_BUFFER_BIT[rip]
	or	edi, DWORD PTR GL_DEPTH_BUFFER_BIT[rip]
	call	glClear@PLT
	mov	edi, DWORD PTR vcsm_square_oes_shader[rip+8]
	call	glUseProgram@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	edi, DWORD PTR GL_TEXTURE0[rip]
	call	glActiveTexture@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	esi, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR GL_TEXTURE_EXTERNAL_OES[rip]
	call	glBindTexture@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	esi, DWORD PTR quad_vbo[rip]
	mov	edi, DWORD PTR GL_ARRAY_BUFFER[rip]
	call	glBindBuffer@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	rax, QWORD PTR vcsm_square_oes_shader[rip]
	mov	edi, DWORD PTR [rax]
	call	glEnableVertexAttribArray@PLT
	mov	edi, eax
	call	GLCHK@PLT
	xor	r9d, r9d
	xor	r8d, r8d
	mov	esi, 2
	mov	rax, QWORD PTR vcsm_square_oes_shader[rip]
	mov	ecx, DWORD PTR GL_FALSE[rip]
	mov	edx, DWORD PTR GL_FLOAT[rip]
	mov	edi, DWORD PTR [rax]
	call	glVertexAttribPointer@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	edi, DWORD PTR GL_TRIANGLES[rip]
	mov	edx, 6
	xor	esi, esi
	call	glDrawArrays@PLT
	mov	edi, eax
	call	GLCHK@PLT
	xor	eax, eax
	call	glFinish@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	esi, DWORD PTR VCSM_CACHE_TYPE_HOST[rip]
	mov	edi, DWORD PTR vcsm_info[rip]
	lea	rdx, 4[rsp]
	call	vcsm_lock_cache@PLT
	test	rax, rax
	je	.L7
	mov	esi, DWORD PTR vcsm_info[rip]
	mov	rdx, rax
	mov	rbp, rax
	xor	eax, eax
	lea	rdi, .LC2[rip]
	call	vcos_log_trace@PLT
	mov	rdi, rbp
	call	vcsm_square_draw_pattern@PLT
	mov	rdi, rbp
	call	vcsm_unlock_ptr@PLT
	mov	edi, DWORD PTR GL_FRAMEBUFFER[rip]
	xor	esi, esi
	call	glBindFramebuffer@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	edx, DWORD PTR 4[rbx]
	mov	ecx, DWORD PTR [rbx]
	mov	esi, DWORD PTR 8[rbx]
	mov	edi, DWORD PTR 12[rbx]
	call	glViewport@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	edi, DWORD PTR vcsm_square_shader[rip+8]
	call	glUseProgram@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	edi, DWORD PTR GL_TEXTURE0[rip]
	call	glActiveTexture@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	esi, DWORD PTR fb_tex_name[rip]
	mov	edi, DWORD PTR GL_TEXTURE_2D[rip]
	call	glBindTexture@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	rax, QWORD PTR vcsm_square_shader[rip]
	mov	edi, DWORD PTR [rax]
	call	glEnableVertexAttribArray@PLT
	mov	edi, eax
	call	GLCHK@PLT
	xor	r9d, r9d
	xor	r8d, r8d
	mov	esi, 2
	mov	rax, QWORD PTR vcsm_square_shader[rip]
	mov	ecx, DWORD PTR GL_FALSE[rip]
	mov	edx, DWORD PTR GL_FLOAT[rip]
	mov	edi, DWORD PTR [rax]
	call	glVertexAttribPointer@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	edi, DWORD PTR GL_TRIANGLES[rip]
	mov	edx, 6
	xor	esi, esi
	call	glDrawArrays@PLT
	mov	edi, eax
	call	GLCHK@PLT
	mov	rax, QWORD PTR vcsm_square_shader[rip]
	mov	edi, DWORD PTR [rax]
	call	glDisableVertexAttribArray@PLT
	mov	edi, eax
	call	GLCHK@PLT
	xor	edi, edi
	call	glUseProgram@PLT
	mov	edi, eax
	call	GLCHK@PLT
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L8
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	esi, DWORD PTR vcsm_info[rip]
	lea	rdi, .LC1[rip]
	call	vcos_log_error@PLT
	mov	eax, -1
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vcsm_square_redraw, .-vcsm_square_redraw
	.comm	vcsm_square_shader,16,16
	.comm	vcsm_square_oes_shader,16,16
	.comm	vcsm_info,4,4
	.comm	quad_vbo,4,4
	.comm	fb_width,4,4
	.comm	fb_tex_name,4,4
	.comm	fb_name,4,4
	.comm	fb_height,4,4
	.comm	VCSM_CACHE_TYPE_HOST,4,4
	.comm	VCOS_FUNCTION,4,4
	.comm	GL_TRIANGLES,4,4
	.comm	GL_TEXTURE_EXTERNAL_OES,4,4
	.comm	GL_TEXTURE_2D,4,4
	.comm	GL_TEXTURE0,4,4
	.comm	GL_FRAMEBUFFER,4,4
	.comm	GL_FLOAT,4,4
	.comm	GL_FALSE,4,4
	.comm	GL_DEPTH_BUFFER_BIT,4,4
	.comm	GL_COLOR_BUFFER_BIT,4,4
	.comm	GL_ARRAY_BUFFER,4,4
	.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_vcsm_square.c_vcsm_square_redraw.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s\000"
	.align	2
.LC1:
	.ascii	"Failed to lock VCSM buffer for handle %d\012\000"
	.align	2
.LC2:
	.ascii	"Locked vcsm handle %d at %p\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vcsm_square_redraw, %function
vcsm_square_redraw:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L9
	sub	sp, sp, #20
	ldr	r1, [r3]
	ldr	r3, .L9+4
	mov	r5, r0
	ldr	r0, .L9+8
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	vcos_log_trace
	mov	r2, #0
	mov	r3, #255
	mov	r1, r2
	mov	r0, r3
	bl	glClearColor
	ldr	fp, .L9+12
	ldr	r3, .L9+16
	ldr	r0, [fp]
	ldr	r1, [r3]
	bl	glBindFramebuffer
	bl	GLCHK
	mov	r1, #0
	mov	r4, r1
	ldr	r3, .L9+20
	ldr	r2, .L9+24
	mov	r0, r1
	ldr	r3, [r3]
	ldr	r2, [r2]
	bl	glViewport
	bl	GLCHK
	ldr	r2, .L9+28
	ldr	r3, .L9+32
	ldr	r0, [r2]
	ldr	r3, [r3]
	ldr	r6, .L9+36
	orr	r0, r0, r3
	bl	glClear
	ldr	r10, .L9+40
	ldr	r0, [r6, #4]
	bl	glUseProgram
	bl	GLCHK
	ldr	r0, [r10]
	bl	glActiveTexture
	bl	GLCHK
	ldr	r3, .L9+44
	ldr	r1, [r5, #16]
	ldr	r0, [r3]
	bl	glBindTexture
	bl	GLCHK
	ldr	r2, .L9+48
	ldr	r3, .L9+52
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	glBindBuffer
	bl	GLCHK
	ldr	r3, [r6]
	ldr	r9, .L9+56
	ldr	r0, [r3]
	bl	glEnableVertexAttribArray
	bl	GLCHK
	ldr	r8, .L9+60
	ldr	r3, [r6]
	mov	r1, #2
	ldr	r0, [r3]
	ldr	r2, [r8]
	ldr	r3, [r9]
	ldr	r7, .L9+64
	str	r4, [sp, #4]
	str	r4, [sp]
	bl	glVertexAttribPointer
	bl	GLCHK
	mov	r1, r4
	mov	r2, #6
	ldr	r0, [r7]
	bl	glDrawArrays
	bl	GLCHK
	bl	glFinish
	bl	GLCHK
	ldr	r3, .L9+68
	ldr	r2, .L9+72
	ldr	r0, [r3]
	ldr	r1, [r2]
	add	r2, sp, #8
	bl	vcsm_lock_cache
	ldr	r3, .L9+68
	subs	r6, r0, #0
	ldr	r1, [r3]
	beq	.L7
	mov	r2, r6
	ldr	r0, .L9+76
	bl	vcos_log_trace
	mov	r0, r6
	bl	vcsm_square_draw_pattern
	mov	r0, r6
	bl	vcsm_unlock_ptr
	mov	r1, r4
	ldr	r0, [fp]
	bl	glBindFramebuffer
	bl	GLCHK
	ldr	r6, .L9+80
	ldr	r3, [r5]
	ldr	r2, [r5, #4]
	ldr	r1, [r5, #8]
	ldr	r0, [r5, #12]
	bl	glViewport
	bl	GLCHK
	ldr	r0, [r6, #4]
	bl	glUseProgram
	bl	GLCHK
	ldr	r0, [r10]
	bl	glActiveTexture
	bl	GLCHK
	ldr	r2, .L9+84
	ldr	r3, .L9+88
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	glBindTexture
	bl	GLCHK
	ldr	r3, [r6]
	ldr	r0, [r3]
	bl	glEnableVertexAttribArray
	bl	GLCHK
	ldr	r2, [r6]
	ldr	r3, [r9]
	ldr	r0, [r2]
	mov	r1, #2
	ldr	r2, [r8]
	str	r4, [sp, #4]
	str	r4, [sp]
	bl	glVertexAttribPointer
	bl	GLCHK
	mov	r2, #6
	mov	r1, r4
	ldr	r0, [r7]
	bl	glDrawArrays
	bl	GLCHK
	ldr	r3, [r6]
	ldr	r0, [r3]
	bl	glDisableVertexAttribArray
	bl	GLCHK
	mov	r0, r4
	bl	glUseProgram
	bl	GLCHK
	mov	r0, r4
.L1:
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r0, .L9+92
	bl	vcos_log_error
	mvn	r0, #0
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	VCOS_FUNCTION
	.word	.LC3
	.word	.LC0
	.word	GL_FRAMEBUFFER
	.word	fb_name
	.word	fb_height
	.word	fb_width
	.word	GL_COLOR_BUFFER_BIT
	.word	GL_DEPTH_BUFFER_BIT
	.word	vcsm_square_oes_shader
	.word	GL_TEXTURE0
	.word	GL_TEXTURE_EXTERNAL_OES
	.word	quad_vbo
	.word	GL_ARRAY_BUFFER
	.word	GL_FALSE
	.word	GL_FLOAT
	.word	GL_TRIANGLES
	.word	vcsm_info
	.word	VCSM_CACHE_TYPE_HOST
	.word	.LC2
	.word	vcsm_square_shader
	.word	fb_tex_name
	.word	GL_TEXTURE_2D
	.word	.LC1
	.size	vcsm_square_redraw, .-vcsm_square_redraw
	.comm	vcsm_square_shader,8,4
	.comm	vcsm_square_oes_shader,8,4
	.comm	vcsm_info,4,4
	.comm	quad_vbo,4,4
	.comm	fb_width,4,4
	.comm	fb_tex_name,4,4
	.comm	fb_name,4,4
	.comm	fb_height,4,4
	.comm	VCSM_CACHE_TYPE_HOST,4,4
	.comm	VCOS_FUNCTION,4,4
	.comm	GL_TRIANGLES,4,4
	.comm	GL_TEXTURE_EXTERNAL_OES,4,4
	.comm	GL_TEXTURE_2D,4,4
	.comm	GL_TEXTURE0,4,4
	.comm	GL_FRAMEBUFFER,4,4
	.comm	GL_FLOAT,4,4
	.comm	GL_FALSE,4,4
	.comm	GL_DEPTH_BUFFER_BIT,4,4
	.comm	GL_COLOR_BUFFER_BIT,4,4
	.comm	GL_ARRAY_BUFFER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
