	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function IJK_EGL_makeCurrent
_IJK_EGL_makeCurrent:                   ## @IJK_EGL_makeCurrent
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.1:
	movq	%rsi, %rbx
	cmpq	%rsi, (%r15)
	jne	LBB0_7
## %bb.2:
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.3:
	movq	16(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.4:
	movq	24(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.5:
	movq	%rdx, %rsi
	callq	_eglMakeCurrent
	testl	%eax, %eax
	jne	LBB0_22
## %bb.6:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_9
LBB0_7:
	movq	%r15, %rdi
	callq	_IJK_EGL_terminate
	movq	%rbx, (%r15)
	movq	_EGL_DEFAULT_DISPLAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_eglGetDisplay
	movq	%rax, %r14
	movq	_EGL_NO_DISPLAY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_11
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_9
LBB0_10:
	movq	%r15, %rdi
	callq	_IJK_EGL_terminate
	movq	$0, (%r15)
	jmp	LBB0_26
LBB0_11:
	leaq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_eglInitialize
	testl	%eax, %eax
	je	LBB0_15
## %bb.12:
	movl	-52(%rbp), %esi
	movl	-48(%rbp), %edx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_ALOGI
	leaq	_IJK_EGL_makeCurrent.configAttribs(%rip), %rsi
	leaq	-44(%rbp), %rdx
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_eglChooseConfig
	testl	%eax, %eax
	je	LBB0_16
## %bb.13:
	movl	-44(%rbp), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_eglCreateWindowSurface
	movq	%rax, %rbx
	movq	_EGL_NO_SURFACE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_18
## %bb.14:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_17
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
LBB0_9:
	xorl	%eax, %eax
	callq	_ALOGE
	jmp	LBB0_26
LBB0_16:
	leaq	L_.str.4(%rip), %rdi
LBB0_17:
	xorl	%eax, %eax
	callq	_ALOGE
	jmp	LBB0_25
LBB0_18:
	movl	-44(%rbp), %esi
	movq	_EGL_NO_CONTEXT@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	leaq	_IJK_EGL_makeCurrent.contextAttribs(%rip), %rcx
	movq	%r14, %rdi
	callq	_eglCreateContext
	cmpq	(%r13), %rax
	jne	LBB0_20
## %bb.19:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_ALOGE
	jmp	LBB0_24
LBB0_20:
	movq	%rax, %r12
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rbx, %rdx
	movq	%rax, %rcx
	callq	_eglMakeCurrent
	testl	%eax, %eax
	je	LBB0_23
## %bb.21:
	xorl	%eax, %eax
	callq	_IJK_GLES2_Renderer_setupGLES
	movq	%r12, 24(%r15)
	movq	%rbx, 16(%r15)
	movq	%r14, 8(%r15)
LBB0_22:
	movq	_EGL_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_23:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_ALOGE
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_eglDestroyContext
LBB0_24:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_eglDestroySurface
LBB0_25:
	movq	%r14, %rdi
	callq	_eglTerminate
LBB0_26:
	movq	_EGL_FALSE@GOTPCREL(%rip), %rax
LBB0_27:
	movl	(%rax), %eax
	addq	$24, %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] elgMakeCurrent() failed (cached)\n"

	.comm	_EGL_FALSE,4,2                  ## @EGL_FALSE
	.comm	_EGL_TRUE,4,2                   ## @EGL_TRUE
	.comm	_EGL_DEFAULT_DISPLAY,4,2        ## @EGL_DEFAULT_DISPLAY
	.comm	_EGL_NO_DISPLAY,8,3             ## @EGL_NO_DISPLAY
L_.str.1:                               ## @.str.1
	.asciz	"[EGL] eglGetDisplay failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"[EGL] eglInitialize failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"[EGL] eglInitialize %d.%d\n"

	.section	__TEXT,__const
	.p2align	4                               ## @IJK_EGL_makeCurrent.configAttribs
_IJK_EGL_makeCurrent.configAttribs:
	.long	130                             ## 0x82
	.long	132                             ## 0x84
	.long	129                             ## 0x81
	.long	128                             ## 0x80
	.long	136                             ## 0x88
	.long	8                               ## 0x8
	.long	134                             ## 0x86
	.long	8                               ## 0x8
	.long	131                             ## 0x83
	.long	8                               ## 0x8
	.long	133                             ## 0x85

	.p2align	2                               ## @IJK_EGL_makeCurrent.contextAttribs
_IJK_EGL_makeCurrent.contextAttribs:
	.long	135                             ## 0x87
	.long	2                               ## 0x2
	.long	133                             ## 0x85

	.section	__TEXT,__cstring,cstring_literals
L_.str.4:                               ## @.str.4
	.asciz	"[EGL] eglChooseConfig failed\n"

	.comm	_EGL_NO_SURFACE,8,3             ## @EGL_NO_SURFACE
L_.str.5:                               ## @.str.5
	.asciz	"[EGL] eglCreateWindowSurface failed\n"

	.comm	_EGL_NO_CONTEXT,8,3             ## @EGL_NO_CONTEXT
L_.str.6:                               ## @.str.6
	.asciz	"[EGL] eglCreateContext failed\n"

L_.str.7:                               ## @.str.7
	.asciz	"[EGL] elgMakeCurrent() failed (new)\n"

	.comm	_EGL_NATIVE_VISUAL_ID,4,2       ## @EGL_NATIVE_VISUAL_ID
	.comm	_GL_EXTENSIONS,4,2              ## @GL_EXTENSIONS
	.comm	_IJK_GLES2__GL_EXT_texture_rg,8,3 ## @IJK_GLES2__GL_EXT_texture_rg
	.no_dead_strip	_IJK_EGL_makeCurrent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function IJK_EGL_makeCurrent
_IJK_EGL_makeCurrent:                   ; @IJK_EGL_makeCurrent
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
	cbz	x1, LBB0_9
; %bb.1:
	mov	x21, x1
	ldr	x8, [x20]
	cmp	x8, x1
	b.ne	LBB0_7
; %bb.2:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x1, [x20, #16]
	cbz	x1, LBB0_7
; %bb.4:
	ldr	x3, [x20, #24]
	cbz	x3, LBB0_7
; %bb.5:
	mov	x2, x1
	bl	_eglMakeCurrent
	cbnz	w0, LBB0_22
; %bb.6:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_15
LBB0_7:
	mov	x0, x20
	bl	_IJK_EGL_terminate
	str	x21, [x20]
Lloh2:
	adrp	x8, _EGL_DEFAULT_DISPLAY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EGL_DEFAULT_DISPLAY@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_eglGetDisplay
Lloh5:
	adrp	x8, _EGL_NO_DISPLAY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EGL_NO_DISPLAY@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.8:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_9:
	mov	x0, x20
	bl	_IJK_EGL_terminate
	str	xzr, [x20]
	b	LBB0_26
LBB0_10:
	mov	x19, x0
	add	x1, sp, #28
	add	x2, sp, #24
	bl	_eglInitialize
	cbz	w0, LBB0_14
; %bb.11:
	ldp	w9, w8, [sp, #24]
	stp	x8, x9, [sp]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ALOGI
Lloh12:
	adrp	x1, _IJK_EGL_makeCurrent.configAttribs@PAGE
Lloh13:
	add	x1, x1, _IJK_EGL_makeCurrent.configAttribs@PAGEOFF
	add	x2, sp, #20
	add	x4, sp, #16
	mov	x0, x19
	mov	w3, #1
	bl	_eglChooseConfig
	cbz	w0, LBB0_16
; %bb.12:
	ldr	w1, [sp, #20]
	mov	x0, x19
	mov	x2, x21
	mov	x3, #0
	bl	_eglCreateWindowSurface
Lloh14:
	adrp	x8, _EGL_NO_SURFACE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EGL_NO_SURFACE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_18
; %bb.13:
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_17
LBB0_14:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_15:
	bl	_ALOGE
	b	LBB0_26
LBB0_16:
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_17:
	bl	_ALOGE
	b	LBB0_25
LBB0_18:
	mov	x21, x0
	ldr	w1, [sp, #20]
Lloh23:
	adrp	x23, _EGL_NO_CONTEXT@GOTPAGE
Lloh24:
	ldr	x23, [x23, _EGL_NO_CONTEXT@GOTPAGEOFF]
	ldr	x2, [x23]
Lloh25:
	adrp	x3, _IJK_EGL_makeCurrent.contextAttribs@PAGE
Lloh26:
	add	x3, x3, _IJK_EGL_makeCurrent.contextAttribs@PAGEOFF
	mov	x0, x19
	bl	_eglCreateContext
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_20
; %bb.19:
Lloh27:
	adrp	x0, l_.str.6@PAGE
Lloh28:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_ALOGE
	b	LBB0_24
LBB0_20:
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x21
	mov	x3, x22
	bl	_eglMakeCurrent
	cbz	w0, LBB0_23
; %bb.21:
	bl	_IJK_GLES2_Renderer_setupGLES
	stp	x21, x22, [x20, #16]
	str	x19, [x20, #8]
LBB0_22:
Lloh29:
	adrp	x8, _EGL_TRUE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EGL_TRUE@GOTPAGEOFF]
	b	LBB0_27
LBB0_23:
Lloh31:
	adrp	x0, l_.str.7@PAGE
Lloh32:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_ALOGE
	mov	x0, x19
	mov	x1, x22
	bl	_eglDestroyContext
LBB0_24:
	mov	x0, x19
	mov	x1, x21
	bl	_eglDestroySurface
LBB0_25:
	mov	x0, x19
	bl	_eglTerminate
LBB0_26:
Lloh33:
	adrp	x8, _EGL_FALSE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EGL_FALSE@GOTPAGEOFF]
LBB0_27:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[EGL] elgMakeCurrent() failed (cached)\n"

	.comm	_EGL_FALSE,4,2                  ; @EGL_FALSE
	.comm	_EGL_TRUE,4,2                   ; @EGL_TRUE
	.comm	_EGL_DEFAULT_DISPLAY,4,2        ; @EGL_DEFAULT_DISPLAY
	.comm	_EGL_NO_DISPLAY,8,3             ; @EGL_NO_DISPLAY
l_.str.1:                               ; @.str.1
	.asciz	"[EGL] eglGetDisplay failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"[EGL] eglInitialize failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"[EGL] eglInitialize %d.%d\n"

	.section	__TEXT,__const
	.p2align	2                               ; @IJK_EGL_makeCurrent.configAttribs
_IJK_EGL_makeCurrent.configAttribs:
	.long	130                             ; 0x82
	.long	132                             ; 0x84
	.long	129                             ; 0x81
	.long	128                             ; 0x80
	.long	136                             ; 0x88
	.long	8                               ; 0x8
	.long	134                             ; 0x86
	.long	8                               ; 0x8
	.long	131                             ; 0x83
	.long	8                               ; 0x8
	.long	133                             ; 0x85

	.p2align	2                               ; @IJK_EGL_makeCurrent.contextAttribs
_IJK_EGL_makeCurrent.contextAttribs:
	.long	135                             ; 0x87
	.long	2                               ; 0x2
	.long	133                             ; 0x85

	.section	__TEXT,__cstring,cstring_literals
l_.str.4:                               ; @.str.4
	.asciz	"[EGL] eglChooseConfig failed\n"

	.comm	_EGL_NO_SURFACE,8,3             ; @EGL_NO_SURFACE
l_.str.5:                               ; @.str.5
	.asciz	"[EGL] eglCreateWindowSurface failed\n"

	.comm	_EGL_NO_CONTEXT,8,3             ; @EGL_NO_CONTEXT
l_.str.6:                               ; @.str.6
	.asciz	"[EGL] eglCreateContext failed\n"

l_.str.7:                               ; @.str.7
	.asciz	"[EGL] elgMakeCurrent() failed (new)\n"

	.comm	_EGL_NATIVE_VISUAL_ID,4,2       ; @EGL_NATIVE_VISUAL_ID
	.comm	_GL_EXTENSIONS,4,2              ; @GL_EXTENSIONS
	.comm	_IJK_GLES2__GL_EXT_texture_rg,8,3 ; @IJK_GLES2__GL_EXT_texture_rg
	.no_dead_strip	_IJK_EGL_makeCurrent
.subsections_via_symbols
