	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_ctx_vc_destroy
_gfx_ctx_vc_destroy:                    ## @gfx_ctx_vc_destroy
	.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
	testq	%rdi, %rdi
	je	LBB0_30
## %bb.1:
	movq	%rdi, %r12
	leaq	40(%rdi), %r14
	cmpq	$0, 48(%rdi)
	je	LBB0_20
## %bb.2:
	movq	_MAX_EGLIMAGE_TEXTURES@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_9
## %bb.3:
	xorl	%ebx, %ebx
	movq	_EGL_OPENVG_API@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movl	(%r15), %eax
	cmpq	%rax, %rbx
	jae	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r13), %edi
	callq	_eglBindAPI
	movq	48(%r12), %rdi
	movq	80(%r12), %rdx
	movq	88(%r12), %rcx
	movq	%rdx, %rsi
	callq	_eglMakeCurrent
	movq	32(%r12), %rax
	movq	48(%r12), %rdi
	movq	(%rax,%rbx,8), %rsi
	callq	_peglDestroyImageKHR
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%r12), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r13), %edi
	callq	_eglBindAPI
	movq	48(%r12), %rdi
	movq	80(%r12), %rdx
	movq	88(%r12), %rcx
	movq	%rdx, %rsi
	callq	_eglMakeCurrent
	movq	24(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_vgDestroyImage
	jmp	LBB0_8
LBB0_9:
	cmpq	$0, 72(%r12)
	je	LBB0_11
## %bb.10:
	movq	_vc_api@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gfx_ctx_vc_bind_api
	movq	48(%r12), %rdi
	movq	_EGL_NO_SURFACE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_EGL_NO_CONTEXT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rdx, %rsi
	callq	_eglMakeCurrent
	movq	48(%r12), %rdi
	movq	72(%r12), %rsi
	callq	_eglDestroyContext
LBB0_11:
	movq	64(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:
	movq	48(%r12), %rdi
	callq	_eglDestroyContext
LBB0_13:
	cmpq	$0, 88(%r12)
	je	LBB0_15
## %bb.14:
	movq	_EGL_OPENVG_API@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_eglBindAPI
	movq	48(%r12), %rdi
	movq	_EGL_NO_SURFACE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_EGL_NO_CONTEXT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rdx, %rsi
	callq	_eglMakeCurrent
	movq	48(%r12), %rdi
	movq	88(%r12), %rsi
	callq	_eglDestroyContext
LBB0_15:
	cmpq	$0, 56(%r12)
	je	LBB0_17
## %bb.16:
	movq	_vc_api@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gfx_ctx_vc_bind_api
	movq	48(%r12), %rdi
	movq	56(%r12), %rsi
	callq	_eglDestroySurface
LBB0_17:
	cmpq	$0, 80(%r12)
	je	LBB0_19
## %bb.18:
	movq	_EGL_OPENVG_API@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_eglBindAPI
	movq	48(%r12), %rdi
	movq	80(%r12), %rsi
	callq	_eglDestroySurface
LBB0_19:
	movq	_EGL_OPENVG_API@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_eglBindAPI
	movq	48(%r12), %rdi
	movq	_EGL_NO_SURFACE@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movq	_EGL_NO_CONTEXT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	%rdx, %rsi
	callq	_eglMakeCurrent
	movq	_vc_api@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gfx_ctx_vc_bind_api
	movq	48(%r12), %rdi
	movq	(%r15), %rdx
	movq	(%rbx), %rcx
	movq	%rdx, %rsi
	callq	_eglMakeCurrent
	movq	48(%r12), %rdi
	callq	_eglTerminate
LBB0_20:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%r14)
	movups	%xmm0, 16(%r14)
	movups	%xmm0, (%r14)
	movq	$0, 48(%r14)
	movq	_g_egl_inited@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_MAX_EGLIMAGE_TEXTURES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_27
## %bb.21:
	cmpl	$1, %eax
	jne	LBB0_23
## %bb.22:
	xorl	%ecx, %ecx
	jmp	LBB0_25
LBB0_30:
	movq	_g_egl_inited@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movl	%eax, %edx
	andl	$-2, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rsi
	movq	$0, (%rsi,%rcx,8)
	movq	24(%r12), %rsi
	movq	$0, (%rsi,%rcx,8)
	movq	32(%r12), %rsi
	movq	$0, 8(%rsi,%rcx,8)
	movq	24(%r12), %rsi
	movq	$0, 8(%rsi,%rcx,8)
	addq	$2, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_24
LBB0_25:
	testb	$1, %al
	je	LBB0_27
## %bb.26:
	movq	32(%r12), %rax
	movq	$0, (%rax,%rcx,8)
	movq	24(%r12), %rax
	movq	$0, (%rax,%rcx,8)
LBB0_27:
	cmpq	$0, 16(%r12)
	je	LBB0_29
## %bb.28:
	movl	8(%r12), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_vc_dispmanx_vsync_callback
LBB0_29:
	movl	4(%r12), %edi
	callq	_slock_free
	movl	(%r12), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_scond_free                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_g_egl_inited,4,2               ## @g_egl_inited
	.comm	_MAX_EGLIMAGE_TEXTURES,4,2      ## @MAX_EGLIMAGE_TEXTURES
	.comm	_EGL_OPENVG_API,4,2             ## @EGL_OPENVG_API
	.comm	_vc_api,4,2                     ## @vc_api
	.comm	_EGL_NO_SURFACE,8,3             ## @EGL_NO_SURFACE
	.comm	_EGL_NO_CONTEXT,8,3             ## @EGL_NO_CONTEXT
	.no_dead_strip	_gfx_ctx_vc_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_ctx_vc_destroy
_gfx_ctx_vc_destroy:                    ; @gfx_ctx_vc_destroy
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	add	x21, x0, #40
	ldr	x8, [x0, #48]
Lloh0:
	adrp	x20, _MAX_EGLIMAGE_TEXTURES@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MAX_EGLIMAGE_TEXTURES@GOTPAGEOFF]
	cbz	x8, LBB0_21
; %bb.2:
	ldr	w8, [x20]
Lloh2:
	adrp	x22, _EGL_OPENVG_API@GOTPAGE
Lloh3:
	ldr	x22, [x22, _EGL_OPENVG_API@GOTPAGEOFF]
	cbz	w8, LBB0_10
; %bb.3:
	mov	x23, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	ldr	w8, [x20]
	cmp	x23, x8
	b.hs	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x23, lsl #3]
	cbz	x8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x22]
	bl	_eglBindAPI
	ldr	x0, [x19, #48]
	ldp	x1, x3, [x19, #80]
	mov	x2, x1
	bl	_eglMakeCurrent
	ldr	x0, [x19, #48]
	ldr	x8, [x19, #32]
	ldr	x1, [x8, x23, lsl #3]
	bl	_peglDestroyImageKHR
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x23, lsl #3]
	cbz	x8, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x22]
	bl	_eglBindAPI
	ldr	x0, [x19, #48]
	ldp	x1, x3, [x19, #80]
	mov	x2, x1
	bl	_eglMakeCurrent
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x23, lsl #3]
	bl	_vgDestroyImage
	b	LBB0_4
LBB0_9:
Lloh4:
	adrp	x8, _g_egl_inited@GOTPAGE
Lloh5:
	ldr	x8, [x8, _g_egl_inited@GOTPAGEOFF]
Lloh6:
	str	wzr, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	x8, [x19, #72]
Lloh7:
	adrp	x23, _EGL_NO_SURFACE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _EGL_NO_SURFACE@GOTPAGEOFF]
Lloh9:
	adrp	x24, _EGL_NO_CONTEXT@GOTPAGE
Lloh10:
	ldr	x24, [x24, _EGL_NO_CONTEXT@GOTPAGEOFF]
Lloh11:
	adrp	x25, _vc_api@GOTPAGE
Lloh12:
	ldr	x25, [x25, _vc_api@GOTPAGEOFF]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_gfx_ctx_vc_bind_api
	ldr	x0, [x19, #48]
	ldr	x1, [x23]
	ldr	x3, [x24]
	mov	x2, x1
	bl	_eglMakeCurrent
	ldr	x0, [x19, #48]
	ldr	x1, [x19, #72]
	bl	_eglDestroyContext
LBB0_12:
	ldr	x1, [x19, #64]
	cbz	x1, LBB0_14
; %bb.13:
	ldr	x0, [x19, #48]
	bl	_eglDestroyContext
LBB0_14:
	ldr	x8, [x19, #88]
	cbz	x8, LBB0_16
; %bb.15:
	ldr	w0, [x22]
	bl	_eglBindAPI
	ldr	x0, [x19, #48]
	ldr	x1, [x23]
	ldr	x3, [x24]
	mov	x2, x1
	bl	_eglMakeCurrent
	ldr	x0, [x19, #48]
	ldr	x1, [x19, #88]
	bl	_eglDestroyContext
LBB0_16:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_18
; %bb.17:
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_gfx_ctx_vc_bind_api
	ldp	x0, x1, [x19, #48]
	bl	_eglDestroySurface
LBB0_18:
	ldr	x8, [x19, #80]
	cbz	x8, LBB0_20
; %bb.19:
	ldr	w0, [x22]
	bl	_eglBindAPI
	ldr	x0, [x19, #48]
	ldr	x1, [x19, #80]
	bl	_eglDestroySurface
LBB0_20:
	ldr	w0, [x22]
	bl	_eglBindAPI
	ldr	x0, [x19, #48]
	ldr	x1, [x23]
	ldr	x3, [x24]
	mov	x2, x1
	bl	_eglMakeCurrent
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_gfx_ctx_vc_bind_api
	ldr	x0, [x19, #48]
	ldr	x1, [x23]
	ldr	x3, [x24]
	mov	x2, x1
	bl	_eglMakeCurrent
	ldr	x0, [x19, #48]
	bl	_eglTerminate
LBB0_21:
	str	xzr, [x21, #48]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x21, #16]
	str	q0, [x21]
Lloh13:
	adrp	x8, _g_egl_inited@GOTPAGE
Lloh14:
	ldr	x8, [x8, _g_egl_inited@GOTPAGEOFF]
Lloh15:
	str	wzr, [x8]
	ldr	w9, [x20]
	cbz	w9, LBB0_24
; %bb.22:
	mov	x8, #0
	lsl	x9, x9, #3
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #32]
	str	xzr, [x10, x8]
	ldr	x10, [x19, #24]
	str	xzr, [x10, x8]
	add	x8, x8, #8
	cmp	x9, x8
	b.ne	LBB0_23
LBB0_24:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_26
; %bb.25:
	ldr	w0, [x19, #8]
	mov	x1, #0
	mov	x2, #0
	bl	_vc_dispmanx_vsync_callback
LBB0_26:
	ldr	w0, [x19, #4]
	bl	_slock_free
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_scond_free
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_g_egl_inited,4,2               ; @g_egl_inited
	.comm	_MAX_EGLIMAGE_TEXTURES,4,2      ; @MAX_EGLIMAGE_TEXTURES
	.comm	_EGL_OPENVG_API,4,2             ; @EGL_OPENVG_API
	.comm	_vc_api,4,2                     ; @vc_api
	.comm	_EGL_NO_SURFACE,8,3             ; @EGL_NO_SURFACE
	.comm	_EGL_NO_CONTEXT,8,3             ; @EGL_NO_CONTEXT
	.no_dead_strip	_gfx_ctx_vc_destroy
.subsections_via_symbols
