	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_ctx_set_video_mode
_sdl_ctx_set_video_mode:                ## @sdl_ctx_set_video_mode
	.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, %r15d
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movq	%rdi, %rbx
	movl	%edx, (%rdi)
	movl	%ecx, 4(%rdi)
	movl	%r8d, %ecx
	testl	%r8d, %r8d
	je	LBB0_2
## %bb.1:
	movq	_SDL_FULLSCREEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_2:
	movq	_SDL_OPENGL@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	xorl	%r13d, %r13d
	movl	%r12d, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_SDL_SetVideoMode
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	%r15d, 8(%rbx)
	movl	%r12d, 12(%rbx)
	movl	%r14d, 16(%rbx)
	movl	$1, %r13d
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	callq	_SDL_GetError
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_RARCH_WARN
LBB0_5:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDL_FULLSCREEN,4,2             ## @SDL_FULLSCREEN
	.comm	_SDL_OPENGL,4,2                 ## @SDL_OPENGL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[SDL_GL]: Failed to set video mode: %s\n"

	.comm	_RARCH_DISPLAY_OSX,4,2          ## @RARCH_DISPLAY_OSX
	.comm	_RARCH_DISPLAY_WIN32,4,2        ## @RARCH_DISPLAY_WIN32
	.comm	_RARCH_DISPLAY_X11,4,2          ## @RARCH_DISPLAY_X11
	.comm	_SDL_WINDOW_FULLSCREEN,4,2      ## @SDL_WINDOW_FULLSCREEN
	.comm	_SDL_WINDOW_FULLSCREEN_DESKTOP,4,2 ## @SDL_WINDOW_FULLSCREEN_DESKTOP
	.comm	_SDL_WINDOW_OPENGL,4,2          ## @SDL_WINDOW_OPENGL
	.no_dead_strip	_sdl_ctx_set_video_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_ctx_set_video_mode
_sdl_ctx_set_video_mode:                ; @sdl_ctx_set_video_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x4
	mov	x19, x3
	mov	x22, x2
	mov	x20, x0
	stp	w2, w3, [x0]
Lloh0:
	adrp	x8, _SDL_FULLSCREEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDL_FULLSCREEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w4, #0
	csel	w8, wzr, w8, eq
Lloh3:
	adrp	x9, _SDL_OPENGL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SDL_OPENGL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x2
	mov	x1, x19
	mov	w2, #0
	bl	_SDL_SetVideoMode
	str	x0, [x20, #32]
	cbz	x0, LBB0_2
; %bb.1:
	stp	w21, w22, [x20, #8]
	mov	w0, #1
	str	w19, [x20, #16]
	b	LBB0_3
LBB0_2:
	bl	_SDL_GetError
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_WARN
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SDL_FULLSCREEN,4,2             ; @SDL_FULLSCREEN
	.comm	_SDL_OPENGL,4,2                 ; @SDL_OPENGL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[SDL_GL]: Failed to set video mode: %s\n"

	.comm	_RARCH_DISPLAY_OSX,4,2          ; @RARCH_DISPLAY_OSX
	.comm	_RARCH_DISPLAY_WIN32,4,2        ; @RARCH_DISPLAY_WIN32
	.comm	_RARCH_DISPLAY_X11,4,2          ; @RARCH_DISPLAY_X11
	.comm	_SDL_WINDOW_FULLSCREEN,4,2      ; @SDL_WINDOW_FULLSCREEN
	.comm	_SDL_WINDOW_FULLSCREEN_DESKTOP,4,2 ; @SDL_WINDOW_FULLSCREEN_DESKTOP
	.comm	_SDL_WINDOW_OPENGL,4,2          ; @SDL_WINDOW_OPENGL
	.no_dead_strip	_sdl_ctx_set_video_mode
.subsections_via_symbols
