	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_ctx_init
_sdl_ctx_init:                          ## @sdl_ctx_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	$1, %edi
	movl	$1, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	xorl	%edi, %edi
	callq	_SDL_WasInit
	movq	_SDL_INIT_VIDEO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	callq	_SDL_InitSubSystem
	testq	%rax, %rax
	js	LBB0_6
LBB0_5:
	movq	_SDL_MAJOR_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SDL_MINOR_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SDL_PATCHLEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_LOG
	jmp	LBB0_8
LBB0_2:
	callq	_SDL_Init
	testq	%rax, %rax
	jns	LBB0_5
LBB0_6:
	xorl	%eax, %eax
	callq	_SDL_GetError
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_RARCH_WARN
	movq	%rbx, %rdi
	callq	_sdl_ctx_destroy_resources
	movq	%rbx, %rdi
	callq	_free
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDL_INIT_VIDEO,4,2             ## @SDL_INIT_VIDEO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[SDL_GL] SDL %i.%i.%i gfx context driver initialized.\n"

	.comm	_SDL_MAJOR_VERSION,4,2          ## @SDL_MAJOR_VERSION
	.comm	_SDL_MINOR_VERSION,4,2          ## @SDL_MINOR_VERSION
	.comm	_SDL_PATCHLEVEL,4,2             ## @SDL_PATCHLEVEL
L_.str.1:                               ## @.str.1
	.asciz	"[SDL_GL]: Failed to initialize SDL gfx context driver: %s\n"

	.no_dead_strip	_sdl_ctx_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_ctx_init
_sdl_ctx_init:                          ; @sdl_ctx_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	w0, #1
	mov	w1, #1
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	mov	w0, #0
	bl	_SDL_WasInit
	mov	x8, x0
Lloh0:
	adrp	x9, _SDL_INIT_VIDEO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SDL_INIT_VIDEO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x9]
	cbz	x8, LBB0_4
; %bb.2:
	bl	_SDL_InitSubSystem
	tbnz	x0, #63, LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _SDL_MAJOR_VERSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDL_MAJOR_VERSION@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SDL_MINOR_VERSION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDL_MINOR_VERSION@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _SDL_PATCHLEVEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDL_PATCHLEVEL@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_LOG
	b	LBB0_6
LBB0_4:
	bl	_SDL_Init
	tbz	x0, #63, LBB0_3
LBB0_5:
	bl	_SDL_GetError
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_WARN
	mov	x0, x19
	bl	_sdl_ctx_destroy_resources
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SDL_INIT_VIDEO,4,2             ; @SDL_INIT_VIDEO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[SDL_GL] SDL %i.%i.%i gfx context driver initialized.\n"

	.comm	_SDL_MAJOR_VERSION,4,2          ; @SDL_MAJOR_VERSION
	.comm	_SDL_MINOR_VERSION,4,2          ; @SDL_MINOR_VERSION
	.comm	_SDL_PATCHLEVEL,4,2             ; @SDL_PATCHLEVEL
l_.str.1:                               ; @.str.1
	.asciz	"[SDL_GL]: Failed to initialize SDL gfx context driver: %s\n"

	.no_dead_strip	_sdl_ctx_init
.subsections_via_symbols
