	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl_core_destroy_resources
_gl_core_destroy_resources:             ## @gl_core_destroy_resources
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_27
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	xorl	%esi, %esi
	callq	_gl_core_context_bind_hw_render
	movq	80(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_gl_core_filter_chain_free
LBB0_3:
	movq	$0, 80(%r15)
	xorl	%edi, %edi
	callq	_glBindVertexArray
	cmpq	$0, (%r15)
	je	LBB0_5
## %bb.4:
	movl	$1, %edi
	movq	%r15, %rsi
	callq	_glDeleteVertexArrays
LBB0_5:
	movq	_GL_CORE_NUM_TEXTURES@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	movl	%eax, %ecx
	addq	$8, %rbx
	cmpq	%rcx, %r12
	jae	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	72(%r15), %rsi
	cmpq	$0, (%rsi,%rbx)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	addq	%rbx, %rsi
	movl	$1, %edi
	callq	_glDeleteTextures
	movl	(%r14), %eax
	jmp	LBB0_9
LBB0_10:
	movq	72(%r15), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	cmpq	$0, 8(%r15)
	je	LBB0_12
## %bb.11:
	leaq	8(%r15), %rsi
	movl	$1, %edi
	callq	_glDeleteTextures
LBB0_12:
	movq	64(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_glDeleteProgram
LBB0_14:
	movq	56(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_glDeleteProgram
LBB0_16:
	movq	48(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:
	callq	_glDeleteProgram
LBB0_18:
	movq	40(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.19:
	callq	_glDeleteProgram
LBB0_20:
	movq	32(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.21:
	callq	_glDeleteProgram
LBB0_22:
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.23:
	callq	_glDeleteProgram
LBB0_24:
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.25:
	callq	_glDeleteProgram
LBB0_26:
	movq	%r15, %rdi
	callq	_gl_core_deinit_fences
	movq	%r15, %rdi
	callq	_gl_core_deinit_pbo_readback
	movq	%r15, %rdi
	callq	_gl_core_deinit_hw_render
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_27:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_CORE_NUM_TEXTURES,4,2       ## @GL_CORE_NUM_TEXTURES
	.no_dead_strip	_gl_core_destroy_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl_core_destroy_resources
_gl_core_destroy_resources:             ; @gl_core_destroy_resources
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_27
; %bb.1:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	mov	w1, #0
	bl	_gl_core_context_bind_hw_render
	ldr	x0, [x19, #80]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_gl_core_filter_chain_free
LBB0_3:
	str	xzr, [x19, #80]
	mov	w0, #0
	bl	_glBindVertexArray
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.4:
	mov	w0, #1
	mov	x1, x19
	bl	_glDeleteVertexArrays
LBB0_5:
Lloh0:
	adrp	x20, _GL_CORE_NUM_TEXTURES@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GL_CORE_NUM_TEXTURES@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_10
; %bb.6:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x22, x22, #1
	add	x21, x21, #8
	cmp	x22, w8, uxtw
	b.hs	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #72]
	add	x1, x9, x21
	ldr	x9, [x1]
	cbz	x9, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w0, #1
	bl	_glDeleteTextures
	ldr	w8, [x20]
	b	LBB0_7
LBB0_10:
	ldr	x0, [x19, #72]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	x1, x19
	ldr	x8, [x1, #8]!
	cbz	x8, LBB0_12
; %bb.11:
	mov	w0, #1
	bl	_glDeleteTextures
LBB0_12:
	ldr	x0, [x19, #64]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_glDeleteProgram
LBB0_14:
	ldr	x0, [x19, #56]
	cbz	x0, LBB0_16
; %bb.15:
	bl	_glDeleteProgram
LBB0_16:
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_18
; %bb.17:
	bl	_glDeleteProgram
LBB0_18:
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_20
; %bb.19:
	bl	_glDeleteProgram
LBB0_20:
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_22
; %bb.21:
	bl	_glDeleteProgram
LBB0_22:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_24
; %bb.23:
	bl	_glDeleteProgram
LBB0_24:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_26
; %bb.25:
	bl	_glDeleteProgram
LBB0_26:
	mov	x0, x19
	bl	_gl_core_deinit_fences
	mov	x0, x19
	bl	_gl_core_deinit_pbo_readback
	mov	x0, x19
	bl	_gl_core_deinit_hw_render
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_free
LBB0_27:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_CORE_NUM_TEXTURES,4,2       ; @GL_CORE_NUM_TEXTURES
	.no_dead_strip	_gl_core_destroy_resources
.subsections_via_symbols
