	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdl_init                       ## -- Begin function sdl_init
	.p2align	4, 0x90
_sdl_init:                              ## @sdl_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movl	%edi, %ebx
	movq	_rect@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	movl	%esi, 4(%rax)
	movq	_SDL_INIT_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SDL_Init
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_fatal_error
LBB0_2:
	movq	_SDL_Quit@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_atexit
	movl	%ebx, %edi
	movl	%r15d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_SDL_SetVideoMode
	movq	_screen@GOTPCREL(%rip), %r12
	movl	%eax, (%r12)
	movq	_SDL_SWSURFACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_SDL_CreateRGBSurface
	addq	$16, %rsp
	movq	_surface@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	cmpl	$0, (%r12)
	je	LBB0_5
## %bb.3:
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fatal_error                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_rect,8,2                       ## @rect
	.comm	_SDL_INIT_VIDEO,4,2             ## @SDL_INIT_VIDEO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDL initialization failed"

	.comm	_SDL_Quit,4,2                   ## @SDL_Quit
	.comm	_screen,4,2                     ## @screen
	.comm	_SDL_SWSURFACE,4,2              ## @SDL_SWSURFACE
	.comm	_surface,4,2                    ## @surface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdl_init                       ; -- Begin function sdl_init
	.p2align	2
_sdl_init:                              ; @sdl_init
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _rect@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rect@GOTPAGEOFF]
	stp	w0, w1, [x8]
Lloh2:
	adrp	x8, _SDL_INIT_VIDEO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SDL_INIT_VIDEO@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_SDL_Init
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal_error
LBB0_2:
Lloh7:
	adrp	x8, _SDL_Quit@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SDL_Quit@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_atexit
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	mov	w3, #0
	bl	_SDL_SetVideoMode
Lloh10:
	adrp	x22, _screen@GOTPAGE
Lloh11:
	ldr	x22, [x22, _screen@GOTPAGEOFF]
	str	w0, [x22]
Lloh12:
	adrp	x8, _SDL_SWSURFACE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SDL_SWSURFACE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_SDL_CreateRGBSurface
Lloh15:
	adrp	x8, _surface@GOTPAGE
Lloh16:
	ldr	x8, [x8, _surface@GOTPAGEOFF]
Lloh17:
	str	w0, [x8]
	ldr	w8, [x22]
	cmp	w8, #0
	ccmp	w0, #0, #4, ne
	b.ne	LBB0_4
; %bb.3:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_fatal_error
LBB0_4:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_rect,8,2                       ; @rect
	.comm	_SDL_INIT_VIDEO,4,2             ; @SDL_INIT_VIDEO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDL initialization failed"

	.comm	_SDL_Quit,4,2                   ; @SDL_Quit
	.comm	_screen,4,2                     ; @screen
	.comm	_SDL_SWSURFACE,4,2              ; @SDL_SWSURFACE
	.comm	_surface,4,2                    ; @surface
.subsections_via_symbols
