	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_egl_context_term               ## -- Begin function egl_context_term
	.p2align	4, 0x90
_egl_context_term:                      ## @egl_context_term
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_CLIENT_GET_THREAD_STATE
	movq	%rax, %r14
	xorl	%edi, %edi
	cmpl	$0, 20(%rbx)
	sete	%dil
	callq	_vcos_assert
	movl	(%rbx), %edi
	callq	_vcos_assert
	movl	4(%rbx), %eax
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_1
## %bb.3:
	movq	_eglIntDestroyGL_impl@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_EGLINTDESTROYGL_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	16(%rbx), %edi
	callq	_RPC_UINT
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_RPC_CALL1
	movq	%r14, %rdi
	callq	_RPC_FLUSH
	movq	8(%rbx), %rdi
	callq	_glxx_client_state_free
	jmp	LBB0_5
LBB0_1:
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.2:
	movq	_eglIntDestroyVG_impl@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_EGLINTDESTROYVG_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	16(%rbx), %edi
	callq	_RPC_UINT
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_RPC_CALL1
	movq	%r14, %rdi
	callq	_RPC_FLUSH
	movq	8(%rbx), %rdi
	callq	_vg_client_state_free
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	callq	_UNREACHABLE
LBB0_5:
	movq	$0, 8(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_eglIntDestroyVG_impl,4,2       ## @eglIntDestroyVG_impl
	.comm	_EGLINTDESTROYVG_ID,4,2         ## @EGLINTDESTROYVG_ID
	.comm	_eglIntDestroyGL_impl,4,2       ## @eglIntDestroyGL_impl
	.comm	_EGLINTDESTROYGL_ID,4,2         ## @EGLINTDESTROYGL_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_egl_context_term               ; -- Begin function egl_context_term
	.p2align	2
_egl_context_term:                      ; @egl_context_term
	.cfi_startproc
; %bb.0:
	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
	bl	_CLIENT_GET_THREAD_STATE
	mov	x20, x0
	ldr	w8, [x19, #20]
	cmp	w8, #0
	cset	w0, eq
	bl	_vcos_assert
	ldr	w0, [x19]
	bl	_vcos_assert
	ldr	w8, [x19, #4]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _eglIntDestroyGL_impl@GOTPAGE
Lloh1:
	ldr	x8, [x8, _eglIntDestroyGL_impl@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _EGLINTDESTROYGL_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EGLINTDESTROYGL_ID@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	ldr	w0, [x19, #16]
	bl	_RPC_UINT
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_RPC_CALL1
	mov	x0, x20
	bl	_RPC_FLUSH
	ldr	x0, [x19, #8]
	bl	_glxx_client_state_free
	b	LBB0_5
LBB0_2:
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _eglIntDestroyVG_impl@GOTPAGE
Lloh7:
	ldr	x8, [x8, _eglIntDestroyVG_impl@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
Lloh9:
	adrp	x8, _EGLINTDESTROYVG_ID@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EGLINTDESTROYVG_ID@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
	ldr	w0, [x19, #16]
	bl	_RPC_UINT
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_RPC_CALL1
	mov	x0, x20
	bl	_RPC_FLUSH
	ldr	x0, [x19, #8]
	bl	_vg_client_state_free
	b	LBB0_5
LBB0_4:
	bl	_UNREACHABLE
LBB0_5:
	str	xzr, [x19, #8]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_eglIntDestroyVG_impl,4,2       ; @eglIntDestroyVG_impl
	.comm	_EGLINTDESTROYVG_ID,4,2         ; @EGLINTDESTROYVG_ID
	.comm	_eglIntDestroyGL_impl,4,2       ; @eglIntDestroyGL_impl
	.comm	_EGLINTDESTROYGL_ID,4,2         ; @EGLINTDESTROYGL_ID
.subsections_via_symbols
