	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exit_func
_exit_func:                             ## @exit_func
	.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
	movq	_GL_COLOR_BUFFER_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_glClear
	movq	_state@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	12(%rax), %edi
	movl	28(%rax), %esi
	callq	_eglSwapBuffers
	movq	(%r14), %rax
	movl	32(%rax), %esi
	movl	$6, %edi
	callq	_glDeleteTextures
	movq	(%r14), %rax
	movl	12(%rax), %edi
	movl	28(%rax), %esi
	callq	_eglDestroySurface
	xorl	%edi, %edi
	callq	_vc_dispmanx_update_start
	movl	%eax, %ebx
	movq	(%r14), %rax
	movl	24(%rax), %esi
	movl	%ebx, %edi
	callq	_vc_dispmanx_element_remove
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movl	%ebx, %edi
	callq	_vc_dispmanx_update_submit_sync
	movq	(%r14), %rax
	movl	20(%rax), %edi
	callq	_vc_dispmanx_display_close
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	(%r14), %rax
	movl	12(%rax), %edi
	movq	_EGL_NO_SURFACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_EGL_NO_CONTEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edx, %esi
	callq	_eglMakeCurrent
	movq	(%r14), %rax
	movl	12(%rax), %edi
	movl	16(%rax), %esi
	callq	_eglDestroyContext
	movq	(%r14), %rax
	movl	12(%rax), %edi
	callq	_eglTerminate
	movq	(%r14), %rax
	movl	8(%rax), %edi
	callq	_free
	movq	(%r14), %rax
	movl	4(%rax), %edi
	callq	_free
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_free
	leaq	L_str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_puts                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ## @GL_COLOR_BUFFER_BIT
	.comm	_state,8,3                      ## @state
	.comm	_EGL_NO_SURFACE,4,2             ## @EGL_NO_SURFACE
	.comm	_EGL_NO_CONTEXT,4,2             ## @EGL_NO_CONTEXT
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"\ncube closed"

	.no_dead_strip	_exit_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exit_func
_exit_func:                             ; @exit_func
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _GL_COLOR_BUFFER_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL_COLOR_BUFFER_BIT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_glClear
Lloh3:
	adrp	x20, _state@GOTPAGE
Lloh4:
	ldr	x20, [x20, _state@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w0, [x8, #12]
	ldr	w1, [x8, #28]
	bl	_eglSwapBuffers
	ldr	x8, [x20]
	ldr	w1, [x8, #32]
	mov	w0, #6
	bl	_glDeleteTextures
	ldr	x8, [x20]
	ldr	w0, [x8, #12]
	ldr	w1, [x8, #28]
	bl	_eglDestroySurface
	mov	w0, #0
	bl	_vc_dispmanx_update_start
	mov	x19, x0
	ldr	x8, [x20]
	ldr	w1, [x8, #24]
	bl	_vc_dispmanx_element_remove
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	bl	_vc_dispmanx_update_submit_sync
	ldr	x8, [x20]
	ldr	w0, [x8, #20]
	bl	_vc_dispmanx_display_close
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x20]
	ldr	w0, [x8, #12]
Lloh5:
	adrp	x8, _EGL_NO_SURFACE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EGL_NO_SURFACE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _EGL_NO_CONTEXT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EGL_NO_CONTEXT@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x2, x1
	bl	_eglMakeCurrent
	ldr	x8, [x20]
	ldp	w0, w1, [x8, #12]
	bl	_eglDestroyContext
	ldr	x8, [x20]
	ldr	w0, [x8, #12]
	bl	_eglTerminate
	ldr	x8, [x20]
	ldr	w0, [x8, #8]
	bl	_free
	ldr	x8, [x20]
	ldr	w0, [x8, #4]
	bl	_free
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_free
Lloh11:
	adrp	x0, l_str@PAGE
Lloh12:
	add	x0, x0, l_str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_puts
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_COLOR_BUFFER_BIT,4,2        ; @GL_COLOR_BUFFER_BIT
	.comm	_state,8,3                      ; @state
	.comm	_EGL_NO_SURFACE,4,2             ; @EGL_NO_SURFACE
	.comm	_EGL_NO_CONTEXT,4,2             ; @EGL_NO_CONTEXT
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"\ncube closed"

	.no_dead_strip	_exit_func
.subsections_via_symbols
