	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vcsm_square_redraw
_vcsm_square_redraw:                    ## @vcsm_square_redraw
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_vcos_log_trace
	movl	$255, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$255, %ecx
	callq	_glClearColor
	movq	_GL_FRAMEBUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_fb_name@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_glBindFramebuffer
	movl	%eax, %edi
	callq	_GLCHK
	movq	_fb_width@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_fb_height@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_glViewport
	movl	%eax, %edi
	callq	_GLCHK
	movq	_GL_COLOR_BUFFER_BIT@GOTPCREL(%rip), %rax
	movq	_GL_DEPTH_BUFFER_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_glClear
	movq	_vcsm_square_oes_shader@GOTPCREL(%rip), %rbx
	movl	8(%rbx), %edi
	callq	_glUseProgram
	movl	%eax, %edi
	callq	_GLCHK
	movq	_GL_TEXTURE0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glActiveTexture
	movl	%eax, %edi
	callq	_GLCHK
	movq	_GL_TEXTURE_EXTERNAL_OES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r15), %esi
	callq	_glBindTexture
	movl	%eax, %edi
	callq	_GLCHK
	movq	_GL_ARRAY_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_quad_vbo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_glBindBuffer
	movl	%eax, %edi
	callq	_GLCHK
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_glEnableVertexAttribArray
	movl	%eax, %edi
	callq	_GLCHK
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_GL_FLOAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_GL_FALSE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	$2, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_glVertexAttribPointer
	movl	%eax, %edi
	callq	_GLCHK
	movq	_GL_TRIANGLES@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	xorl	%esi, %esi
	movl	$6, %edx
	callq	_glDrawArrays
	movl	%eax, %edi
	callq	_GLCHK
	xorl	%eax, %eax
	callq	_glFinish
	movl	%eax, %edi
	callq	_GLCHK
	movq	_vcsm_info@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_VCSM_CACHE_TYPE_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_vcsm_lock_cache
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	(%r12), %esi
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_vcos_log_trace
	movq	%rbx, %rdi
	callq	_vcsm_square_draw_pattern
	movq	%rbx, %rdi
	callq	_vcsm_unlock_ptr
	movq	_GL_FRAMEBUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_glBindFramebuffer
	movl	%eax, %edi
	callq	_GLCHK
	movl	12(%r15), %edi
	movl	8(%r15), %esi
	movl	(%r15), %ecx
	movl	4(%r15), %edx
	callq	_glViewport
	movl	%eax, %edi
	callq	_GLCHK
	movq	_vcsm_square_shader@GOTPCREL(%rip), %rbx
	movl	8(%rbx), %edi
	callq	_glUseProgram
	movl	%eax, %edi
	callq	_GLCHK
	movq	_GL_TEXTURE0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glActiveTexture
	movl	%eax, %edi
	callq	_GLCHK
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_fb_tex_name@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_glBindTexture
	movl	%eax, %edi
	callq	_GLCHK
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_glEnableVertexAttribArray
	movl	%eax, %edi
	callq	_GLCHK
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_GL_FLOAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movl	$2, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_glVertexAttribPointer
	movl	%eax, %edi
	callq	_GLCHK
	movl	(%r14), %edi
	xorl	%esi, %esi
	movl	$6, %edx
	callq	_glDrawArrays
	movl	%eax, %edi
	callq	_GLCHK
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_glDisableVertexAttribArray
	movl	%eax, %edi
	callq	_GLCHK
	xorl	%edi, %edi
	callq	_glUseProgram
	movl	%eax, %edi
	callq	_GLCHK
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movl	(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_vcos_log_error
	movl	$-1, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_VCOS_FUNCTION,4,2              ## @VCOS_FUNCTION
	.comm	_GL_FRAMEBUFFER,4,2             ## @GL_FRAMEBUFFER
	.comm	_fb_name,4,2                    ## @fb_name
	.comm	_fb_width,4,2                   ## @fb_width
	.comm	_fb_height,4,2                  ## @fb_height
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ## @GL_COLOR_BUFFER_BIT
	.comm	_GL_DEPTH_BUFFER_BIT,4,2        ## @GL_DEPTH_BUFFER_BIT
	.comm	_vcsm_square_oes_shader,16,3    ## @vcsm_square_oes_shader
	.comm	_GL_TEXTURE0,4,2                ## @GL_TEXTURE0
	.comm	_GL_TEXTURE_EXTERNAL_OES,4,2    ## @GL_TEXTURE_EXTERNAL_OES
	.comm	_GL_ARRAY_BUFFER,4,2            ## @GL_ARRAY_BUFFER
	.comm	_quad_vbo,4,2                   ## @quad_vbo
	.comm	_GL_FLOAT,4,2                   ## @GL_FLOAT
	.comm	_GL_FALSE,4,2                   ## @GL_FALSE
	.comm	_GL_TRIANGLES,4,2               ## @GL_TRIANGLES
	.comm	_vcsm_info,4,2                  ## @vcsm_info
	.comm	_VCSM_CACHE_TYPE_HOST,4,2       ## @VCSM_CACHE_TYPE_HOST
L_.str.1:                               ## @.str.1
	.asciz	"Failed to lock VCSM buffer for handle %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Locked vcsm handle %d at %p\n"

	.comm	_vcsm_square_shader,16,3        ## @vcsm_square_shader
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_fb_tex_name,4,2                ## @fb_tex_name
	.no_dead_strip	_vcsm_square_redraw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vcsm_square_redraw
_vcsm_square_redraw:                    ; @vcsm_square_redraw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vcos_log_trace
	mov	w0, #255
	mov	w1, #0
	mov	w2, #0
	mov	w3, #255
	bl	_glClearColor
Lloh5:
	adrp	x21, _GL_FRAMEBUFFER@GOTPAGE
Lloh6:
	ldr	x21, [x21, _GL_FRAMEBUFFER@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh7:
	adrp	x8, _fb_name@GOTPAGE
Lloh8:
	ldr	x8, [x8, _fb_name@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_glBindFramebuffer
	bl	_GLCHK
Lloh10:
	adrp	x8, _fb_width@GOTPAGE
Lloh11:
	ldr	x8, [x8, _fb_width@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x8, _fb_height@GOTPAGE
Lloh14:
	ldr	x8, [x8, _fb_height@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	w0, #0
	mov	w1, #0
	bl	_glViewport
	bl	_GLCHK
Lloh16:
	adrp	x8, _GL_COLOR_BUFFER_BIT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GL_COLOR_BUFFER_BIT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _GL_DEPTH_BUFFER_BIT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _GL_DEPTH_BUFFER_BIT@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_glClear
Lloh22:
	adrp	x20, _vcsm_square_oes_shader@GOTPAGE
Lloh23:
	ldr	x20, [x20, _vcsm_square_oes_shader@GOTPAGEOFF]
	ldr	w0, [x20, #8]
	bl	_glUseProgram
	bl	_GLCHK
Lloh24:
	adrp	x22, _GL_TEXTURE0@GOTPAGE
Lloh25:
	ldr	x22, [x22, _GL_TEXTURE0@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_glActiveTexture
	bl	_GLCHK
Lloh26:
	adrp	x8, _GL_TEXTURE_EXTERNAL_OES@GOTPAGE
Lloh27:
	ldr	x8, [x8, _GL_TEXTURE_EXTERNAL_OES@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	w1, [x19, #16]
	bl	_glBindTexture
	bl	_GLCHK
Lloh29:
	adrp	x8, _GL_ARRAY_BUFFER@GOTPAGE
Lloh30:
	ldr	x8, [x8, _GL_ARRAY_BUFFER@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x8, _quad_vbo@GOTPAGE
Lloh33:
	ldr	x8, [x8, _quad_vbo@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	bl	_glBindBuffer
	bl	_GLCHK
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_glEnableVertexAttribArray
	bl	_GLCHK
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh35:
	adrp	x23, _GL_FLOAT@GOTPAGE
Lloh36:
	ldr	x23, [x23, _GL_FLOAT@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh37:
	adrp	x24, _GL_FALSE@GOTPAGE
Lloh38:
	ldr	x24, [x24, _GL_FALSE@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	w1, #2
	mov	w4, #0
	mov	w5, #0
	bl	_glVertexAttribPointer
	bl	_GLCHK
Lloh39:
	adrp	x25, _GL_TRIANGLES@GOTPAGE
Lloh40:
	ldr	x25, [x25, _GL_TRIANGLES@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	w1, #0
	mov	w2, #6
	bl	_glDrawArrays
	bl	_GLCHK
	bl	_glFinish
	bl	_GLCHK
Lloh41:
	adrp	x26, _vcsm_info@GOTPAGE
Lloh42:
	ldr	x26, [x26, _vcsm_info@GOTPAGEOFF]
	ldr	w0, [x26]
Lloh43:
	adrp	x8, _VCSM_CACHE_TYPE_HOST@GOTPAGE
Lloh44:
	ldr	x8, [x8, _VCSM_CACHE_TYPE_HOST@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_vcsm_lock_cache
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w1, [x26]
	str	x0, [sp]
Lloh46:
	adrp	x0, l_.str.2@PAGE
Lloh47:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_vcos_log_trace
	mov	x0, x20
	bl	_vcsm_square_draw_pattern
	mov	x0, x20
	bl	_vcsm_unlock_ptr
	ldr	w0, [x21]
	mov	w1, #0
	bl	_glBindFramebuffer
	bl	_GLCHK
	ldp	w1, w0, [x19, #8]
	ldp	w3, w2, [x19]
	bl	_glViewport
	bl	_GLCHK
Lloh48:
	adrp	x19, _vcsm_square_shader@GOTPAGE
Lloh49:
	ldr	x19, [x19, _vcsm_square_shader@GOTPAGEOFF]
	ldr	w0, [x19, #8]
	bl	_glUseProgram
	bl	_GLCHK
	ldr	w0, [x22]
	bl	_glActiveTexture
	bl	_GLCHK
Lloh50:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh51:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh52:
	ldr	w0, [x8]
Lloh53:
	adrp	x8, _fb_tex_name@GOTPAGE
Lloh54:
	ldr	x8, [x8, _fb_tex_name@GOTPAGEOFF]
Lloh55:
	ldr	w1, [x8]
	bl	_glBindTexture
	bl	_GLCHK
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_glEnableVertexAttribArray
	bl	_GLCHK
	ldr	x8, [x19]
	ldr	w0, [x8]
	ldr	w2, [x23]
	ldr	w3, [x24]
	mov	w1, #2
	mov	w4, #0
	mov	w5, #0
	bl	_glVertexAttribPointer
	bl	_GLCHK
	ldr	w0, [x25]
	mov	w1, #0
	mov	w2, #6
	bl	_glDrawArrays
	bl	_GLCHK
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_glDisableVertexAttribArray
	bl	_GLCHK
	mov	w0, #0
	bl	_glUseProgram
	bl	_GLCHK
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	w1, [x26]
Lloh56:
	adrp	x0, l_.str.1@PAGE
Lloh57:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vcos_log_error
	mov	w0, #-1
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_VCOS_FUNCTION,4,2              ; @VCOS_FUNCTION
	.comm	_GL_FRAMEBUFFER,4,2             ; @GL_FRAMEBUFFER
	.comm	_fb_name,4,2                    ; @fb_name
	.comm	_fb_width,4,2                   ; @fb_width
	.comm	_fb_height,4,2                  ; @fb_height
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ; @GL_COLOR_BUFFER_BIT
	.comm	_GL_DEPTH_BUFFER_BIT,4,2        ; @GL_DEPTH_BUFFER_BIT
	.comm	_vcsm_square_oes_shader,16,3    ; @vcsm_square_oes_shader
	.comm	_GL_TEXTURE0,4,2                ; @GL_TEXTURE0
	.comm	_GL_TEXTURE_EXTERNAL_OES,4,2    ; @GL_TEXTURE_EXTERNAL_OES
	.comm	_GL_ARRAY_BUFFER,4,2            ; @GL_ARRAY_BUFFER
	.comm	_quad_vbo,4,2                   ; @quad_vbo
	.comm	_GL_FLOAT,4,2                   ; @GL_FLOAT
	.comm	_GL_FALSE,4,2                   ; @GL_FALSE
	.comm	_GL_TRIANGLES,4,2               ; @GL_TRIANGLES
	.comm	_vcsm_info,4,2                  ; @vcsm_info
	.comm	_VCSM_CACHE_TYPE_HOST,4,2       ; @VCSM_CACHE_TYPE_HOST
l_.str.1:                               ; @.str.1
	.asciz	"Failed to lock VCSM buffer for handle %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Locked vcsm handle %d at %p\n"

	.comm	_vcsm_square_shader,16,3        ; @vcsm_square_shader
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_fb_tex_name,4,2                ; @fb_tex_name
	.no_dead_strip	_vcsm_square_redraw
.subsections_via_symbols
