	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_egl_context_create             ## -- Begin function egl_context_create
	.p2align	4, 0x90
_egl_context_create:                    ## @egl_context_create
	.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
	movl	%r8d, %ebx
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	movl	$48, %edi
	callq	_khrn_platform_malloc
	testq	%rax, %rax
	je	LBB0_27
## %bb.1:
	movq	%rax, %r12
	movl	%r14d, 44(%rax)
	movl	%r13d, 40(%rax)
	movl	%r15d, 36(%rax)
	movl	%ebx, (%rax)
	movq	_EGL_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	$0, 4(%r12)
	cmpl	$130, %ebx
	je	LBB0_7
## %bb.2:
	cmpl	$129, %ebx
	je	LBB0_11
## %bb.3:
	cmpl	$128, %ebx
	jne	LBB0_15
## %bb.4:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_16
## %bb.5:
	movq	24(%r14), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_vg_client_shared_state_acquire
	jmp	LBB0_17
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edi
	callq	_khrn_platform_malloc
	testq	%rax, %rax
	je	LBB0_26
## %bb.8:
	movq	%rax, %r15
	movq	%rax, 24(%r12)
	movq	%rax, %rdi
	callq	_gl11_client_state_init
	testl	%eax, %eax
	je	LBB0_28
## %bb.9:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_CLIENT_GET_THREAD_STATE
	movq	_eglIntCreateGLES11_impl@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_EGLINTCREATEGLES11_ID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	jne	LBB0_14
## %bb.10:
	movl	$130, %r8d
	jmp	LBB0_24
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edi
	callq	_khrn_platform_malloc
	testq	%rax, %rax
	je	LBB0_26
## %bb.12:
	movq	%rax, %r15
	movq	%rax, 24(%r12)
	movq	%rax, %rdi
	callq	_gl20_client_state_init
	testl	%eax, %eax
	je	LBB0_28
## %bb.13:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_CLIENT_GET_THREAD_STATE
	movq	_eglIntCreateGLES20_impl@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_EGLINTCREATEGLES20_ID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_23
LBB0_14:
	movq	16(%rcx), %rbx
	movl	(%rcx), %r8d
	jmp	LBB0_24
LBB0_15:
	xorl	%eax, %eax
	callq	_UNREACHABLE
	jmp	LBB0_28
LBB0_16:
	xorl	%eax, %eax
	callq	_vg_client_shared_state_alloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_26
LBB0_17:
	movq	%rbx, %rdi
	callq	_vg_client_state_alloc
	movq	%rax, 24(%r12)
	movq	%rbx, %rdi
	callq	_vg_client_shared_state_release
	cmpq	$0, 24(%r12)
	je	LBB0_26
## %bb.18:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_CLIENT_GET_THREAD_STATE
	movq	_eglIntCreateVG_impl@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_EGLINTCREATEVG_ID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testq	%r14, %r14
	je	LBB0_20
## %bb.19:
	movq	16(%r14), %rbx
	movl	(%r14), %r8d
	jmp	LBB0_21
LBB0_20:
	movl	$128, %r8d
LBB0_21:
	movq	%rax, %rsi
	movq	%rbx, %rcx
	callq	_RPC_CALL2_RES
	movl	%eax, %edi
	callq	_RPC_UINT_RES
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	jne	LBB0_28
## %bb.22:
	movq	24(%r12), %rdi
	callq	_vg_client_state_free
	jmp	LBB0_26
LBB0_23:
	movl	$129, %r8d
LBB0_24:
	movq	%rax, %rsi
	movq	%rbx, %rcx
	callq	_RPC_CALL2_RES
	movl	%eax, %edi
	callq	_RPC_UINT_RES
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	jne	LBB0_28
## %bb.25:
	movq	%r15, %rdi
	callq	_glxx_client_state_free
LBB0_26:
	movq	%r12, %rdi
	callq	_khrn_platform_free
LBB0_27:
	xorl	%r12d, %r12d
LBB0_28:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EGL_CONTEXT_T"

	.comm	_EGL_NONE,4,2                   ## @EGL_NONE
	.comm	_eglIntCreateVG_impl,4,2        ## @eglIntCreateVG_impl
	.comm	_EGLINTCREATEVG_ID,4,2          ## @EGLINTCREATEVG_ID
L_.str.1:                               ## @.str.1
	.asciz	"GLXX_CLIENT_STATE_T"

	.comm	_eglIntCreateGLES11_impl,4,2    ## @eglIntCreateGLES11_impl
	.comm	_EGLINTCREATEGLES11_ID,4,2      ## @EGLINTCREATEGLES11_ID
	.comm	_eglIntCreateGLES20_impl,4,2    ## @eglIntCreateGLES20_impl
	.comm	_EGLINTCREATEGLES20_ID,4,2      ## @EGLINTCREATEGLES20_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_egl_context_create             ; -- Begin function egl_context_create
	.p2align	2
_egl_context_create:                    ; @egl_context_create
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #48
	bl	_khrn_platform_malloc
	mov	x19, x0
	cbz	x0, LBB0_26
; %bb.1:
	stp	w23, w24, [x19, #40]
	str	w21, [x19]
Lloh2:
	adrp	x8, _EGL_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EGL_NONE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	stp	w8, w22, [x19, #32]
	stp	wzr, wzr, [x19, #4]
	cmp	w21, #130
	b.eq	LBB0_6
; %bb.2:
	cmp	w21, #129
	b.eq	LBB0_10
; %bb.3:
	cmp	w21, #128
	b.ne	LBB0_14
; %bb.4:
	cbz	x20, LBB0_15
; %bb.5:
	ldr	x8, [x20, #24]
	ldr	x21, [x8]
	mov	x0, x21
	bl	_vg_client_shared_state_acquire
	b	LBB0_16
LBB0_6:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #4
	bl	_khrn_platform_malloc
	cbz	x0, LBB0_25
; %bb.7:
	mov	x21, x0
	str	x0, [x19, #24]
	bl	_gl11_client_state_init
	cbz	w0, LBB0_26
; %bb.8:
	bl	_CLIENT_GET_THREAD_STATE
	mov	x1, x0
Lloh7:
	adrp	x8, _eglIntCreateGLES11_impl@GOTPAGE
Lloh8:
	ldr	x8, [x8, _eglIntCreateGLES11_impl@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _EGLINTCREATEGLES11_ID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EGLINTCREATEGLES11_ID@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	cbnz	x20, LBB0_13
; %bb.9:
	mov	x3, #0
	mov	w4, #130
	b	LBB0_23
LBB0_10:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #4
	bl	_khrn_platform_malloc
	cbz	x0, LBB0_25
; %bb.11:
	mov	x21, x0
	str	x0, [x19, #24]
	bl	_gl20_client_state_init
	cbz	w0, LBB0_26
; %bb.12:
	bl	_CLIENT_GET_THREAD_STATE
	mov	x1, x0
Lloh15:
	adrp	x8, _eglIntCreateGLES20_impl@GOTPAGE
Lloh16:
	ldr	x8, [x8, _eglIntCreateGLES20_impl@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _EGLINTCREATEGLES20_ID@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EGLINTCREATEGLES20_ID@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	cbz	x20, LBB0_22
LBB0_13:
	ldr	x3, [x20, #16]
	ldr	w4, [x20]
	b	LBB0_23
LBB0_14:
	bl	_UNREACHABLE
	b	LBB0_26
LBB0_15:
	bl	_vg_client_shared_state_alloc
	mov	x21, x0
	cbz	x0, LBB0_25
LBB0_16:
	mov	x0, x21
	bl	_vg_client_state_alloc
	str	x0, [x19, #24]
	mov	x0, x21
	bl	_vg_client_shared_state_release
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_25
; %bb.17:
	bl	_CLIENT_GET_THREAD_STATE
	mov	x1, x0
Lloh21:
	adrp	x8, _eglIntCreateVG_impl@GOTPAGE
Lloh22:
	ldr	x8, [x8, _eglIntCreateVG_impl@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x8, _EGLINTCREATEVG_ID@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EGLINTCREATEVG_ID@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	cbz	x20, LBB0_19
; %bb.18:
	ldr	x3, [x20, #16]
	ldr	w4, [x20]
	b	LBB0_20
LBB0_19:
	mov	x3, #0
	mov	w4, #128
LBB0_20:
	bl	_RPC_CALL2_RES
	bl	_RPC_UINT_RES
	str	x0, [x19, #16]
	cbnz	x0, LBB0_26
; %bb.21:
	ldr	x0, [x19, #24]
	bl	_vg_client_state_free
	b	LBB0_25
LBB0_22:
	mov	x3, #0
	mov	w4, #129
LBB0_23:
	bl	_RPC_CALL2_RES
	bl	_RPC_UINT_RES
	str	x0, [x19, #16]
	cbnz	x0, LBB0_26
; %bb.24:
	mov	x0, x21
	bl	_glxx_client_state_free
LBB0_25:
	mov	x0, x19
	bl	_khrn_platform_free
	mov	x19, #0
LBB0_26:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EGL_CONTEXT_T"

	.comm	_EGL_NONE,4,2                   ; @EGL_NONE
	.comm	_eglIntCreateVG_impl,4,2        ; @eglIntCreateVG_impl
	.comm	_EGLINTCREATEVG_ID,4,2          ; @EGLINTCREATEVG_ID
l_.str.1:                               ; @.str.1
	.asciz	"GLXX_CLIENT_STATE_T"

	.comm	_eglIntCreateGLES11_impl,4,2    ; @eglIntCreateGLES11_impl
	.comm	_EGLINTCREATEGLES11_ID,4,2      ; @EGLINTCREATEGLES11_ID
	.comm	_eglIntCreateGLES20_impl,4,2    ; @eglIntCreateGLES20_impl
	.comm	_EGLINTCREATEGLES20_ID,4,2      ; @EGLINTCREATEGLES20_ID
.subsections_via_symbols
