	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sndout_sdl_start               ## -- Begin function sndout_sdl_start
	.p2align	4, 0x90
_sndout_sdl_start:                      ## @sndout_sdl_start
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_started@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_sndout_sdl_stop
LBB0_2:
	movl	%ebx, -56(%rbp)
	movq	_AUDIO_S16LSB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$1, %r14d
	movl	$2, %ecx
	sbbl	$0, %ecx
	movl	%eax, -28(%rbp)
	movl	%ecx, -52(%rbp)
	movq	_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	$0, -40(%rbp)
	sarl	$6, %ebx
	movl	$8, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %eax
	shll	%cl, %eax
	incl	%ecx
	cmpl	%ebx, %eax
	jl	LBB0_3
## %bb.4:
	movl	%eax, -48(%rbp)
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	callq	_SDL_OpenAudio
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_SDL_GetError
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movl	$-1, %ebx
	jmp	LBB0_7
LBB0_6:
	movq	_buf_r@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_buf_w@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	xorl	%edi, %edi
	callq	_SDL_PauseAudio
	movl	$1, (%r15)
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_started,4,2                    ## @started
	.comm	_AUDIO_S16LSB,4,2               ## @AUDIO_S16LSB
	.comm	_callback,4,2                   ## @callback
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDL_OpenAudio: %s\n"

	.comm	_buf_r,8,3                      ## @buf_r
	.comm	_buf_w,8,3                      ## @buf_w
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sndout_sdl_start               ; -- Begin function sndout_sdl_start
	.p2align	2
_sndout_sdl_start:                      ; @sndout_sdl_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _started@GOTPAGE
Lloh1:
	ldr	x21, [x21, _started@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_2
; %bb.1:
	bl	_sndout_sdl_stop
LBB0_2:
Lloh2:
	adrp	x8, _AUDIO_S16LSB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AUDIO_S16LSB@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x8]
	cmp	w20, #0
	mov	w8, #1
	cinc	w10, w8, ne
	stp	w19, w10, [sp]
Lloh5:
	adrp	x10, _callback@GOTPAGE
Lloh6:
	ldr	x10, [x10, _callback@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	stp	w10, w9, [sp, #24]
	str	xzr, [sp, #16]
	asr	w9, w19, #6
	mov	w10, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w11, w8, w10
	add	w10, w10, #1
	cmp	w11, w9
	b.lt	LBB0_3
; %bb.4:
	str	w11, [sp, #8]
	mov	x0, sp
	mov	x1, #0
	bl	_SDL_OpenAudio
	cbz	w0, LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _stderr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh10:
	ldr	w19, [x8]
	bl	_SDL_GetError
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	mov	w0, #-1
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _buf_r@GOTPAGE
Lloh14:
	ldr	x8, [x8, _buf_r@GOTPAGEOFF]
Lloh15:
	str	xzr, [x8]
Lloh16:
	adrp	x8, _buf_w@GOTPAGE
Lloh17:
	ldr	x8, [x8, _buf_w@GOTPAGEOFF]
Lloh18:
	str	xzr, [x8]
	bl	_SDL_PauseAudio
	mov	w0, #0
	mov	w8, #1
	str	w8, [x21]
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_started,4,2                    ; @started
	.comm	_AUDIO_S16LSB,4,2               ; @AUDIO_S16LSB
	.comm	_callback,4,2                   ; @callback
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDL_OpenAudio: %s\n"

	.comm	_buf_r,8,3                      ; @buf_r
	.comm	_buf_w,8,3                      ; @buf_w
.subsections_via_symbols
