	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gl_destroy_context             ## -- Begin function gl_destroy_context
	.p2align	4, 0x90
_gl_destroy_context:                    ## @gl_destroy_context
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_free
	movq	8(%rbx), %rdi
	callq	_free
	movq	24(%rbx), %rax
	movq	(%rax), %rcx
	leaq	-1(%rcx), %rdx
	movq	%rdx, (%rax)
	xorl	%edi, %edi
	testq	%rcx, %rcx
	setg	%dil
	callq	_assert
	movq	24(%rbx), %rsi
	cmpq	$0, (%rsi)
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_free_shared_state
LBB0_3:
	movl	20(%rbx), %esi
	xorl	%edi, %edi
	callq	_gl_free_texture_object
	movl	16(%rbx), %esi
	xorl	%edi, %edi
	callq	_gl_free_texture_object
	movq	%rbx, %rdi
	callq	_free
	movq	_CC@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	$0, (%rax)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CC,8,3                         ## @CC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gl_destroy_context             ; -- Begin function gl_destroy_context
	.p2align	2
_gl_destroy_context:                    ; @gl_destroy_context
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0]
	bl	_free
	ldr	x0, [x19, #8]
	bl	_free
	ldr	x8, [x19, #24]
	ldr	x9, [x8]
	sub	x10, x9, #1
	str	x10, [x8]
	cmp	x9, #0
	cset	w0, gt
	bl	_assert
	ldr	x1, [x19, #24]
	ldr	x8, [x1]
	cbnz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_free_shared_state
LBB0_3:
	ldr	w1, [x19, #20]
	mov	x0, #0
	bl	_gl_free_texture_object
	ldr	w1, [x19, #16]
	mov	x0, #0
	bl	_gl_free_texture_object
	mov	x0, x19
	bl	_free
Lloh0:
	adrp	x8, _CC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CC@GOTPAGEOFF]
	ldr	x9, [x8]
	cmp	x9, x19
	b.ne	LBB0_5
; %bb.4:
	str	xzr, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CC,8,3                         ; @CC
.subsections_via_symbols
