	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidtex_gl_init
_vidtex_gl_init:                        ## @vidtex_gl_init
	.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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_EGL_RED_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movl	$8, -76(%rbp)
	movq	_EGL_GREEN_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movl	$8, -68(%rbp)
	movq	_EGL_BLUE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movl	$8, -60(%rbp)
	movq	_EGL_DEPTH_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	$0, -52(%rbp)
	movq	_EGL_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_EGL_DEFAULT_DISPLAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_eglGetDisplay
	movl	%eax, 12(%rbx)
	xorl	%r14d, %r14d
	movl	%eax, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_eglInitialize
	movl	12(%rbx), %edi
	leaq	-80(%rbp), %rsi
	leaq	-84(%rbp), %rdx
	leaq	-88(%rbp), %r8
	movl	$1, %ecx
	callq	_eglChooseConfig
	movl	12(%rbx), %edi
	movl	-84(%rbp), %esi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_eglCreateWindowSurface
	movl	%eax, 8(%rbx)
	movl	12(%rbx), %edi
	movl	-84(%rbp), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_eglCreateContext
	movl	%eax, 4(%rbx)
	movl	8(%rbx), %edx
	movl	12(%rbx), %edi
	movl	%edx, %esi
	movl	%eax, %ecx
	callq	_eglMakeCurrent
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	$1, %edi
	movq	%rbx, %rsi
	callq	_glGenTextures
	movq	_GL_FLAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glShadeModel
	movq	_GL_DITHER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glDisable
	movq	_GL_SCISSOR_TEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glDisable
	movq	_GL_TEXTURE_EXTERNAL_OES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glEnable
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glDisable
	jmp	LBB0_3
LBB0_1:
	movq	%rbx, %rdi
	callq	_vidtex_gl_term
	movl	$-1, %r14d
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EGL_RED_SIZE,4,2               ## @EGL_RED_SIZE
	.comm	_EGL_GREEN_SIZE,4,2             ## @EGL_GREEN_SIZE
	.comm	_EGL_BLUE_SIZE,4,2              ## @EGL_BLUE_SIZE
	.comm	_EGL_DEPTH_SIZE,4,2             ## @EGL_DEPTH_SIZE
	.comm	_EGL_NONE,4,2                   ## @EGL_NONE
	.comm	_EGL_DEFAULT_DISPLAY,4,2        ## @EGL_DEFAULT_DISPLAY
	.comm	_GL_FLAT,4,2                    ## @GL_FLAT
	.comm	_GL_DITHER,4,2                  ## @GL_DITHER
	.comm	_GL_SCISSOR_TEST,4,2            ## @GL_SCISSOR_TEST
	.comm	_GL_TEXTURE_EXTERNAL_OES,4,2    ## @GL_TEXTURE_EXTERNAL_OES
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.no_dead_strip	_vidtex_gl_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidtex_gl_init
_vidtex_gl_init:                        ; @vidtex_gl_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _EGL_RED_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EGL_RED_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #8
	stp	w8, w9, [sp, #20]
Lloh6:
	adrp	x8, _EGL_GREEN_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EGL_GREEN_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	w8, w9, [sp, #28]
Lloh9:
	adrp	x8, _EGL_BLUE_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EGL_BLUE_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	stp	w8, w9, [sp, #36]
Lloh12:
	adrp	x8, _EGL_DEPTH_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EGL_DEPTH_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _EGL_NONE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EGL_NONE@GOTPAGEOFF]
	stp	w8, wzr, [sp, #44]
Lloh17:
	ldr	w8, [x9]
	str	w8, [sp, #52]
Lloh18:
	adrp	x8, _EGL_DEFAULT_DISPLAY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EGL_DEFAULT_DISPLAY@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_eglGetDisplay
	str	w0, [x19, #12]
	mov	w1, #0
	mov	w2, #0
	bl	_eglInitialize
	ldr	w0, [x19, #12]
	add	x1, sp, #20
	add	x2, sp, #16
	add	x4, sp, #12
	mov	w3, #1
	bl	_eglChooseConfig
	ldr	w0, [x19, #12]
	ldr	w1, [sp, #16]
	mov	x2, x20
	mov	x3, #0
	bl	_eglCreateWindowSurface
	str	w0, [x19, #8]
	ldr	w0, [x19, #12]
	ldr	w1, [sp, #16]
	mov	x2, #0
	mov	x3, #0
	bl	_eglCreateContext
	mov	x3, x0
	str	w0, [x19, #4]
	ldp	w1, w0, [x19, #8]
	mov	x2, x1
	bl	_eglMakeCurrent
	cbz	w0, LBB0_2
; %bb.1:
	mov	w0, #1
	mov	x1, x19
	bl	_glGenTextures
Lloh21:
	adrp	x8, _GL_FLAT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GL_FLAT@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_glShadeModel
Lloh24:
	adrp	x8, _GL_DITHER@GOTPAGE
Lloh25:
	ldr	x8, [x8, _GL_DITHER@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_glDisable
Lloh27:
	adrp	x8, _GL_SCISSOR_TEST@GOTPAGE
Lloh28:
	ldr	x8, [x8, _GL_SCISSOR_TEST@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_glDisable
Lloh30:
	adrp	x8, _GL_TEXTURE_EXTERNAL_OES@GOTPAGE
Lloh31:
	ldr	x8, [x8, _GL_TEXTURE_EXTERNAL_OES@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_glEnable
Lloh33:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh34:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_glDisable
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_vidtex_gl_term
	mov	w0, #-1
LBB0_3:
	ldur	x8, [x29, #-24]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_EGL_RED_SIZE,4,2               ; @EGL_RED_SIZE
	.comm	_EGL_GREEN_SIZE,4,2             ; @EGL_GREEN_SIZE
	.comm	_EGL_BLUE_SIZE,4,2              ; @EGL_BLUE_SIZE
	.comm	_EGL_DEPTH_SIZE,4,2             ; @EGL_DEPTH_SIZE
	.comm	_EGL_NONE,4,2                   ; @EGL_NONE
	.comm	_EGL_DEFAULT_DISPLAY,4,2        ; @EGL_DEFAULT_DISPLAY
	.comm	_GL_FLAT,4,2                    ; @GL_FLAT
	.comm	_GL_DITHER,4,2                  ; @GL_DITHER
	.comm	_GL_SCISSOR_TEST,4,2            ; @GL_SCISSOR_TEST
	.comm	_GL_TEXTURE_EXTERNAL_OES,4,2    ; @GL_TEXTURE_EXTERNAL_OES
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.no_dead_strip	_vidtex_gl_init
.subsections_via_symbols
