	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_sound_init
_sdl_sound_init:                        ## @sdl_sound_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	_SDL_INIT_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SDL_Init
	testq	%rax, %rax
	js	LBB0_1
## %bb.3:
	movq	_SOUND_FREQUENCY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	_AUDIO_S16LSB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movl	$2, -40(%rbp)
	movq	_SOUND_SAMPLES_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	%eax, -36(%rbp)
	movq	_sdl_sound_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	leaq	-40(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_SDL_OpenAudio
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movl	-36(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jne	LBB0_6
## %bb.7:
	movq	_sdl_sound@GOTPCREL(%rip), %r14
	movq	$0, 16(%r14)
	imull	$44, (%rbx), %ebx
	movl	%ebx, %edi
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	(%r14), %rax
	movq	%rax, 8(%r14)
	movl	$1, %ebx
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_2
LBB0_8:
	leaq	L_.str.4(%rip), %rsi
LBB0_2:
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	callq	_MessageBox
LBB0_10:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDL_INIT_AUDIO,4,2             ## @SDL_INIT_AUDIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDL Audio initialization failed"

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

	.comm	_SOUND_FREQUENCY,4,2            ## @SOUND_FREQUENCY
	.comm	_AUDIO_S16LSB,4,2               ## @AUDIO_S16LSB
	.comm	_SOUND_SAMPLES_SIZE,4,2         ## @SOUND_SAMPLES_SIZE
	.comm	_sdl_sound_callback,4,2         ## @sdl_sound_callback
L_.str.2:                               ## @.str.2
	.asciz	"SDL Audio open failed"

L_.str.3:                               ## @.str.3
	.asciz	"SDL Audio wrong setup"

	.comm	_sdl_sound,24,3                 ## @sdl_sound
L_.str.4:                               ## @.str.4
	.asciz	"Can't allocate audio buffer"

	.no_dead_strip	_sdl_sound_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_sound_init
_sdl_sound_init:                        ; @sdl_sound_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, _SDL_INIT_AUDIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDL_INIT_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_SDL_Init
	tbnz	x0, #63, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _SOUND_FREQUENCY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOUND_FREQUENCY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #40]
Lloh6:
	adrp	x8, _AUDIO_S16LSB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AUDIO_S16LSB@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	w9, #2
Lloh9:
	adrp	x19, _SOUND_SAMPLES_SIZE@GOTPAGE
Lloh10:
	ldr	x19, [x19, _SOUND_SAMPLES_SIZE@GOTPAGEOFF]
	ldr	w10, [x19]
	stp	w9, w10, [sp, #24]
Lloh11:
	adrp	x9, _sdl_sound_callback@GOTPAGE
Lloh12:
	ldr	x9, [x9, _sdl_sound_callback@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #32]
	add	x0, sp, #24
	mov	x1, sp
	bl	_SDL_OpenAudio
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.2:
	ldr	w8, [sp, #28]
	ldr	w9, [sp, #4]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.3:
Lloh14:
	adrp	x20, _sdl_sound@GOTPAGE
Lloh15:
	ldr	x20, [x20, _sdl_sound@GOTPAGEOFF]
	str	xzr, [x20, #16]
	ldr	w8, [x19]
	mov	w9, #44
	mul	w19, w8, w9
	mov	x0, x19
	bl	_malloc
	str	x0, [x20]
	cbz	x0, LBB0_11
; %bb.4:
	mov	w1, #0
	mov	x2, x19
	bl	_memset
	ldr	x8, [x20]
	str	x8, [x20, #8]
	mov	w0, #1
	b	LBB0_10
LBB0_5:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_8:
Lloh22:
	adrp	x2, l_.str.1@PAGE
Lloh23:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, #0
LBB0_9:
	mov	w3, #0
	bl	_MessageBox
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_SDL_INIT_AUDIO,4,2             ; @SDL_INIT_AUDIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDL Audio initialization failed"

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

	.comm	_SOUND_FREQUENCY,4,2            ; @SOUND_FREQUENCY
	.comm	_AUDIO_S16LSB,4,2               ; @AUDIO_S16LSB
	.comm	_SOUND_SAMPLES_SIZE,4,2         ; @SOUND_SAMPLES_SIZE
	.comm	_sdl_sound_callback,4,2         ; @sdl_sound_callback
l_.str.2:                               ; @.str.2
	.asciz	"SDL Audio open failed"

l_.str.3:                               ; @.str.3
	.asciz	"SDL Audio wrong setup"

	.comm	_sdl_sound,24,3                 ; @sdl_sound
l_.str.4:                               ; @.str.4
	.asciz	"Can't allocate audio buffer"

	.no_dead_strip	_sdl_sound_init
.subsections_via_symbols
