	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GLimp_Init                     ## -- Begin function GLimp_Init
	.p2align	4, 0x90
_GLimp_Init:                            ## @GLimp_Init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	callq	_GLimp_CommonPreInit
	movq	_ri@GOTPCREL(%rip), %rax
	movq	_CVAR_ARCHIVE@GOTPCREL(%rip), %rcx
	movq	_CVAR_LATCH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	*(%rax)
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_CreateInitializedEGLDisplayAtIndex
	movq	_egl_display@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	movq	_EGL_NO_DISPLAY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movl	(%rbx), %esi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_5
## %bb.2:
	leaq	L_.str.2(%rip), %rdi
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_Sys_Error                      ## TAILCALL
LBB0_3:
	movq	_kConfigAttribs@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %r8
	movq	%rax, %rdi
	movl	$1, %ecx
	callq	_eglChooseConfig
	movl	%eax, %edi
	callq	_CHECK_EGL_SUCCESS
	movq	_EGL_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_glConfig@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_EGL_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	%ecx, -36(%rbp)
	movq	_EGL_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	(%r14), %rdi
	movl	-52(%rbp), %esi
	leaq	-48(%rbp), %rdx
	callq	_eglCreatePbufferSurface
	movq	_egl_surface@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	%eax, %edi
	callq	_CHECK_EGL_SUCCESS
	movq	_EGL_OPENGL_API@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_eglBindAPI
	movl	%eax, %edi
	callq	_CHECK_EGL_SUCCESS
	movq	(%r14), %rdi
	movl	-52(%rbp), %esi
	movq	_EGL_NO_CONTEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_eglCreateContext
	movq	_egl_context@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	%eax, %edi
	callq	_CHECK_EGL_SUCCESS
	xorl	%eax, %eax
	callq	_GLimp_CommonPostInit
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ri,8,3                         ## @ri
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r_gpuDeviceIndex"

L_.str.1:                               ## @.str.1
	.asciz	"0"

	.comm	_CVAR_ARCHIVE,4,2               ## @CVAR_ARCHIVE
	.comm	_CVAR_LATCH,4,2                 ## @CVAR_LATCH
	.comm	_egl_display,8,3                ## @egl_display
	.comm	_EGL_NO_DISPLAY,8,3             ## @EGL_NO_DISPLAY
L_.str.2:                               ## @.str.2
	.asciz	"Failed to create EGL display for device index %d!\n"

	.comm	_kConfigAttribs,4,2             ## @kConfigAttribs
	.comm	_EGL_WIDTH,4,2                  ## @EGL_WIDTH
	.comm	_glConfig,8,2                   ## @glConfig
	.comm	_EGL_HEIGHT,4,2                 ## @EGL_HEIGHT
	.comm	_EGL_NONE,4,2                   ## @EGL_NONE
	.comm	_egl_surface,4,2                ## @egl_surface
	.comm	_EGL_OPENGL_API,4,2             ## @EGL_OPENGL_API
	.comm	_EGL_NO_CONTEXT,4,2             ## @EGL_NO_CONTEXT
	.comm	_egl_context,4,2                ## @egl_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GLimp_Init                     ; -- Begin function GLimp_Init
	.p2align	2
_GLimp_Init:                            ; @GLimp_Init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	bl	_GLimp_CommonPreInit
Lloh3:
	adrp	x8, _ri@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh5:
	adrp	x9, _CVAR_ARCHIVE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CVAR_ARCHIVE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _CVAR_LATCH@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CVAR_LATCH@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w2, w10, w9
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	blr	x8
	mov	x19, x0
	ldr	w0, [x0]
	bl	_CreateInitializedEGLDisplayAtIndex
Lloh16:
	adrp	x20, _egl_display@GOTPAGE
Lloh17:
	ldr	x20, [x20, _egl_display@GOTPAGEOFF]
	str	x0, [x20]
Lloh18:
	adrp	x8, _EGL_NO_DISPLAY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EGL_NO_DISPLAY@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
	ldr	w1, [x19]
	ldur	x8, [x29, #-24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.2:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_Sys_Error
LBB0_3:
Lloh26:
	adrp	x8, _kConfigAttribs@GOTPAGE
Lloh27:
	ldr	x8, [x8, _kConfigAttribs@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	add	x2, sp, #12
	add	x4, sp, #16
	mov	w3, #1
	bl	_eglChooseConfig
	bl	_CHECK_EGL_SUCCESS
Lloh29:
	adrp	x8, _EGL_WIDTH@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EGL_WIDTH@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _glConfig@GOTPAGE
Lloh33:
	ldr	x9, [x9, _glConfig@GOTPAGEOFF]
	ldp	w9, w10, [x9]
	stp	w8, w10, [sp, #20]
Lloh34:
	adrp	x8, _EGL_HEIGHT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EGL_HEIGHT@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	stp	w8, w9, [sp, #28]
Lloh37:
	adrp	x8, _EGL_NONE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EGL_NONE@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	str	w8, [sp, #36]
	ldr	x0, [x20]
	ldr	w1, [sp, #12]
	add	x2, sp, #20
	bl	_eglCreatePbufferSurface
Lloh40:
	adrp	x8, _egl_surface@GOTPAGE
Lloh41:
	ldr	x8, [x8, _egl_surface@GOTPAGEOFF]
Lloh42:
	str	w0, [x8]
	bl	_CHECK_EGL_SUCCESS
Lloh43:
	adrp	x8, _EGL_OPENGL_API@GOTPAGE
Lloh44:
	ldr	x8, [x8, _EGL_OPENGL_API@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	bl	_eglBindAPI
	bl	_CHECK_EGL_SUCCESS
	ldr	x0, [x20]
	ldr	w1, [sp, #12]
Lloh46:
	adrp	x8, _EGL_NO_CONTEXT@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EGL_NO_CONTEXT@GOTPAGEOFF]
Lloh48:
	ldr	w2, [x8]
	mov	x3, #0
	bl	_eglCreateContext
Lloh49:
	adrp	x8, _egl_context@GOTPAGE
Lloh50:
	ldr	x8, [x8, _egl_context@GOTPAGEOFF]
Lloh51:
	str	w0, [x8]
	bl	_CHECK_EGL_SUCCESS
	bl	_GLimp_CommonPostInit
	ldur	x8, [x29, #-24]
Lloh52:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh53:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh54:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotStr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotStr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ri,8,3                         ; @ri
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r_gpuDeviceIndex"

l_.str.1:                               ; @.str.1
	.asciz	"0"

	.comm	_CVAR_ARCHIVE,4,2               ; @CVAR_ARCHIVE
	.comm	_CVAR_LATCH,4,2                 ; @CVAR_LATCH
	.comm	_egl_display,8,3                ; @egl_display
	.comm	_EGL_NO_DISPLAY,8,3             ; @EGL_NO_DISPLAY
l_.str.2:                               ; @.str.2
	.asciz	"Failed to create EGL display for device index %d!\n"

	.comm	_kConfigAttribs,4,2             ; @kConfigAttribs
	.comm	_EGL_WIDTH,4,2                  ; @EGL_WIDTH
	.comm	_glConfig,8,2                   ; @glConfig
	.comm	_EGL_HEIGHT,4,2                 ; @EGL_HEIGHT
	.comm	_EGL_NONE,4,2                   ; @EGL_NONE
	.comm	_egl_surface,4,2                ; @egl_surface
	.comm	_EGL_OPENGL_API,4,2             ; @EGL_OPENGL_API
	.comm	_EGL_NO_CONTEXT,4,2             ; @EGL_NO_CONTEXT
	.comm	_egl_context,4,2                ; @egl_context
.subsections_via_symbols
