	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function gl_flip
LCPI0_0:
	.long	0x3a800000                      ## float 9.765625E-4
LCPI0_1:
	.long	0x3b000000                      ## float 0.001953125
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_gl_flip
	.p2align	4, 0x90
_gl_flip:                               ## @gl_flip
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movl	%edx, %r9d
	movl	%esi, %r8d
	movq	%rdi, %rax
	cmpl	%esi, _gl_flip.old_w(%rip)
	jne	LBB0_3
## %bb.2:
	cmpl	%r9d, _gl_flip.old_h(%rip)
	je	LBB0_4
LBB0_3:
	cvtsi2ss	%r8d, %xmm0
	cvtsi2ss	%r9d, %xmm1
	mulss	LCPI0_0(%rip), %xmm0
	mulss	LCPI0_1(%rip), %xmm1
	movq	_texture@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movss	%xmm0, 8(%rcx)
	movss	%xmm1, 20(%rcx)
	movss	%xmm0, 24(%rcx)
	movss	%xmm1, 28(%rcx)
	movl	%r8d, _gl_flip.old_w(%rip)
	movl	%r9d, _gl_flip.old_h(%rip)
LBB0_4:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_GL_RGB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movq	_GL_UNSIGNED_SHORT_5_6_5@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	subq	$8, %rsp
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	pushq	%rax
	pushq	%rbx
	pushq	%r10
	callq	_glTexSubImage2D
	addq	$32, %rsp
	leaq	L_.str(%rip), %rdi
	callq	_gl_have_error
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_7
LBB0_5:
	movq	_GL_FLOAT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_vertices@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r14d, %r14d
	movl	$3, %edi
	xorl	%edx, %edx
	callq	_glVertexPointer
	movl	(%rbx), %esi
	movq	_texture@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	$2, %edi
	xorl	%edx, %edx
	callq	_glTexCoordPointer
	movq	_GL_TRIANGLE_STRIP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_glDrawArrays
	leaq	L_.str.1(%rip), %rdi
	callq	_gl_have_error
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_7
## %bb.6:
	movq	_edpy@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_esfc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_eglSwapBuffers
	leaq	L_.str.2(%rip), %rdi
	callq	_gles_have_error
	negq	%rax
	sbbl	%r14d, %r14d
	movl	%r14d, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_gl_flip.old_w,4,2 ## @gl_flip.old_w
.zerofill __DATA,__bss,_gl_flip.old_h,4,2 ## @gl_flip.old_h
	.comm	_texture,8,3                    ## @texture
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_GL_RGB,4,2                     ## @GL_RGB
	.comm	_GL_UNSIGNED_SHORT_5_6_5,4,2    ## @GL_UNSIGNED_SHORT_5_6_5
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"glTexSubImage2D"

	.comm	_GL_FLOAT,4,2                   ## @GL_FLOAT
	.comm	_vertices,4,2                   ## @vertices
	.comm	_GL_TRIANGLE_STRIP,4,2          ## @GL_TRIANGLE_STRIP
L_.str.1:                               ## @.str.1
	.asciz	"glDrawArrays"

	.comm	_edpy,4,2                       ## @edpy
	.comm	_esfc,4,2                       ## @esfc
L_.str.2:                               ## @.str.2
	.asciz	"eglSwapBuffers"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gl_flip                        ; -- Begin function gl_flip
	.p2align	2
_gl_flip:                               ; @gl_flip
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_4
; %bb.1:
	mov	x5, x2
	mov	x4, x1
	adrp	x8, _gl_flip.old_w@PAGE
	ldr	w10, [x8, _gl_flip.old_w@PAGEOFF]
	adrp	x9, _gl_flip.old_h@PAGE
	ldr	w11, [x9, _gl_flip.old_h@PAGEOFF]
	cmp	w10, w1
	ccmp	w11, w2, #0, eq
	b.eq	LBB0_3
; %bb.2:
	scvtf	s0, w4
	mov	w10, #981467136
	fmov	s1, w10
	scvtf	s2, w5
	fmul	s0, s0, s1
	movi.2s	v1, #59, lsl #24
Lloh0:
	adrp	x10, _texture@GOTPAGE
Lloh1:
	ldr	x10, [x10, _texture@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	fmul	s1, s2, s1
	str	s0, [x10, #8]
	stp	s1, s0, [x10, #20]
	str	s1, [x10, #28]
	str	w4, [x8, _gl_flip.old_w@PAGEOFF]
	str	w5, [x9, _gl_flip.old_h@PAGEOFF]
LBB0_3:
Lloh3:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _GL_RGB@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GL_RGB@GOTPAGEOFF]
Lloh8:
	ldr	w6, [x9]
Lloh9:
	adrp	x9, _GL_UNSIGNED_SHORT_5_6_5@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GL_UNSIGNED_SHORT_5_6_5@GOTPAGEOFF]
Lloh11:
	ldr	w7, [x9]
	str	x0, [sp]
	mov	x0, x8
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_glTexSubImage2D
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_gl_have_error
	cbnz	x0, LBB0_5
LBB0_4:
Lloh14:
	adrp	x19, _GL_FLOAT@GOTPAGE
Lloh15:
	ldr	x19, [x19, _GL_FLOAT@GOTPAGEOFF]
	ldr	w1, [x19]
Lloh16:
	adrp	x8, _vertices@GOTPAGE
Lloh17:
	ldr	x8, [x8, _vertices@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	w0, #3
	mov	w2, #0
	bl	_glVertexPointer
	ldr	w1, [x19]
Lloh19:
	adrp	x8, _texture@GOTPAGE
Lloh20:
	ldr	x8, [x8, _texture@GOTPAGEOFF]
Lloh21:
	ldr	x3, [x8]
	mov	w0, #2
	mov	w2, #0
	bl	_glTexCoordPointer
Lloh22:
	adrp	x8, _GL_TRIANGLE_STRIP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GL_TRIANGLE_STRIP@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #4
	bl	_glDrawArrays
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_gl_have_error
	cbz	x0, LBB0_6
LBB0_5:
	mov	w0, #-1
	b	LBB0_7
LBB0_6:
Lloh27:
	adrp	x8, _edpy@GOTPAGE
Lloh28:
	ldr	x8, [x8, _edpy@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x8, _esfc@GOTPAGE
Lloh31:
	ldr	x8, [x8, _esfc@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	bl	_eglSwapBuffers
Lloh33:
	adrp	x0, l_.str.2@PAGE
Lloh34:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_gles_have_error
	cmp	x0, #0
	csetm	w0, ne
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_gl_flip.old_w,4,2 ; @gl_flip.old_w
.zerofill __DATA,__bss,_gl_flip.old_h,4,2 ; @gl_flip.old_h
	.comm	_texture,8,3                    ; @texture
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_GL_RGB,4,2                     ; @GL_RGB
	.comm	_GL_UNSIGNED_SHORT_5_6_5,4,2    ; @GL_UNSIGNED_SHORT_5_6_5
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"glTexSubImage2D"

	.comm	_GL_FLOAT,4,2                   ; @GL_FLOAT
	.comm	_vertices,4,2                   ; @vertices
	.comm	_GL_TRIANGLE_STRIP,4,2          ; @GL_TRIANGLE_STRIP
l_.str.1:                               ; @.str.1
	.asciz	"glDrawArrays"

	.comm	_edpy,4,2                       ; @edpy
	.comm	_esfc,4,2                       ; @esfc
l_.str.2:                               ; @.str.2
	.asciz	"eglSwapBuffers"

.subsections_via_symbols
