	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl2_get_context
_gl2_get_context:                       ## @gl2_get_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	$0, -56(%rbp)
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_video_driver_get_hw_context
	movq	%rax, %rbx
	movq	_GFX_CTX_OPENGL_API@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%r15)
	je	LBB0_2
## %bb.1:
	movq	8(%rbx), %rcx
	movq	_RETRO_HW_CONTEXT_NONE@GOTPCREL(%rip), %rdx
	xorl	%r12d, %r12d
	cmpq	(%rdx), %rcx
	setne	%r12b
LBB0_2:
	movl	(%rbx), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rax), %r14d
	movq	_gl_shared_context_use@GOTPCREL(%rip), %r13
	movl	%r12d, (%r13)
	xorl	%eax, %eax
	callq	_libretro_get_shared_context
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	8(%rbx), %rax
	movq	_RETRO_HW_CONTEXT_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movl	$1, (%r13)
LBB0_5:
	movl	(%r15), %esi
	movl	(%r13), %r9d
	leaq	-56(%rbp), %rax
	movq	%rax, (%rsp)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_video_context_driver_init_first
	movq	-56(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.6:
	movq	%rcx, (%rbx)
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFX_CTX_OPENGL_API,4,2         ## @GFX_CTX_OPENGL_API
	.comm	_RETRO_HW_CONTEXT_NONE,8,3      ## @RETRO_HW_CONTEXT_NONE
	.comm	_gl_shared_context_use,4,2      ## @gl_shared_context_use
	.comm	_GFX_CTX_OPENGL_ES_API,4,2      ## @GFX_CTX_OPENGL_ES_API
	.comm	_RETRO_HW_CONTEXT_OPENGLES3,8,3 ## @RETRO_HW_CONTEXT_OPENGLES3
	.comm	_RETRO_HW_CONTEXT_OPENGLES_VERSION,8,3 ## @RETRO_HW_CONTEXT_OPENGLES_VERSION
	.no_dead_strip	_gl2_get_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl2_get_context
_gl2_get_context:                       ; @gl2_get_context
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	str	xzr, [sp, #8]
	bl	_config_get_ptr
	mov	x23, x0
	bl	_video_driver_get_hw_context
	mov	x24, x0
	ldp	w20, w21, [x0]
Lloh0:
	adrp	x8, _GFX_CTX_OPENGL_API@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFX_CTX_OPENGL_API@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	x8, [x23, #8]
Lloh3:
	adrp	x25, _RETRO_HW_CONTEXT_NONE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _RETRO_HW_CONTEXT_NONE@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x24, #8]
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w8, ne
LBB0_2:
Lloh5:
	adrp	x26, _gl_shared_context_use@GOTPAGE
Lloh6:
	ldr	x26, [x26, _gl_shared_context_use@GOTPAGEOFF]
	str	w8, [x26]
	bl	_libretro_get_shared_context
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x24, #8]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [x26]
LBB0_5:
	ldr	w1, [x23]
	ldr	w5, [x26]
	add	x6, sp, #8
	mov	x0, x19
	mov	x2, x22
	mov	x3, x20
	mov	x4, x21
	bl	_video_context_driver_init_first
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_7
; %bb.6:
	str	x8, [x19]
LBB0_7:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GFX_CTX_OPENGL_API,4,2         ; @GFX_CTX_OPENGL_API
	.comm	_RETRO_HW_CONTEXT_NONE,8,3      ; @RETRO_HW_CONTEXT_NONE
	.comm	_gl_shared_context_use,4,2      ; @gl_shared_context_use
	.comm	_GFX_CTX_OPENGL_ES_API,4,2      ; @GFX_CTX_OPENGL_ES_API
	.comm	_RETRO_HW_CONTEXT_OPENGLES3,8,3 ; @RETRO_HW_CONTEXT_OPENGLES3
	.comm	_RETRO_HW_CONTEXT_OPENGLES_VERSION,8,3 ; @RETRO_HW_CONTEXT_OPENGLES_VERSION
	.no_dead_strip	_gl2_get_context
.subsections_via_symbols
