	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_sound_update
_sdl_sound_update:                      ## @sdl_sound_update
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%eax, %eax
	callq	_audio_update
	movl	%eax, %r14d
	movq	_use_sound@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.1:
	xorl	%eax, %eax
	callq	_SDL_LockAudio
	movq	_sdl_sound@GOTPCREL(%rip), %r8
	movq	(%r8), %rcx
	testl	%r14d, %r14d
	jle	LBB0_17
## %bb.2:
	movq	_snd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdx
	movq	8(%rax), %rsi
	movl	%r14d, %r10d
	cmpl	$8, %r14d
	jae	LBB0_4
## %bb.3:
	xorl	%edi, %edi
LBB0_13:
	movq	%rdi, %r9
	notq	%r9
	addq	%r10, %r9
	movq	%r10, %rax
	andq	$3, %rax
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movzwl	(%rdx,%rdi,2), %ebx
	movw	%bx, (%rcx)
	movzwl	(%rsi,%rdi,2), %ebx
	movw	%bx, 2(%rcx)
	addq	$4, %rcx
	incq	%rdi
	decq	%rax
	jne	LBB0_14
LBB0_15:
	cmpq	$3, %r9
	jb	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movzwl	(%rdx,%rdi,2), %eax
	movw	%ax, (%rcx)
	movzwl	(%rsi,%rdi,2), %eax
	movw	%ax, 2(%rcx)
	movzwl	2(%rdx,%rdi,2), %eax
	movw	%ax, 4(%rcx)
	movzwl	2(%rsi,%rdi,2), %eax
	movw	%ax, 6(%rcx)
	movzwl	4(%rdx,%rdi,2), %eax
	movw	%ax, 8(%rcx)
	movzwl	4(%rsi,%rdi,2), %eax
	movw	%ax, 10(%rcx)
	movzwl	6(%rdx,%rdi,2), %eax
	movw	%ax, 12(%rcx)
	movzwl	6(%rsi,%rdi,2), %eax
	movw	%ax, 14(%rcx)
	addq	$16, %rcx
	addq	$4, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_16
	jmp	LBB0_17
LBB0_18:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	leaq	(%rcx,%r10,4), %rdi
	leaq	(%rdx,%r10,2), %rax
	leaq	(%rsi,%r10,2), %rbx
	cmpq	%rax, %rcx
	setb	%r9b
	cmpq	%rdi, %rdx
	setb	%r11b
	cmpq	%rbx, %rcx
	setb	%al
	cmpq	%rdi, %rsi
	setb	%bl
	xorl	%edi, %edi
	testb	%r11b, %r9b
	jne	LBB0_13
## %bb.5:
	andb	%bl, %al
	jne	LBB0_13
## %bb.6:
	movl	%r10d, %edi
	andl	$-8, %edi
	leaq	-8(%rdi), %rax
	movq	%rax, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%r9, %rax
	andq	$-2, %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rbx,2), %xmm0            ## xmm0 = mem[0],zero
	movq	8(%rdx,%rbx,2), %xmm1           ## xmm1 = mem[0],zero
	movq	(%rsi,%rbx,2), %xmm2            ## xmm2 = mem[0],zero
	punpcklwd	%xmm2, %xmm0            ## xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
	movq	8(%rsi,%rbx,2), %xmm2           ## xmm2 = mem[0],zero
	punpcklwd	%xmm2, %xmm1            ## xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
	movdqu	%xmm0, (%rcx,%rbx,4)
	movdqu	%xmm1, 16(%rcx,%rbx,4)
	movq	16(%rdx,%rbx,2), %xmm0          ## xmm0 = mem[0],zero
	movq	24(%rdx,%rbx,2), %xmm1          ## xmm1 = mem[0],zero
	movq	16(%rsi,%rbx,2), %xmm2          ## xmm2 = mem[0],zero
	punpcklwd	%xmm2, %xmm0            ## xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
	movq	24(%rsi,%rbx,2), %xmm2          ## xmm2 = mem[0],zero
	punpcklwd	%xmm2, %xmm1            ## xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
	movdqu	%xmm0, 32(%rcx,%rbx,4)
	movdqu	%xmm1, 48(%rcx,%rbx,4)
	addq	$16, %rbx
	addq	$-2, %rax
	jne	LBB0_9
## %bb.10:
	testb	$1, %r9b
	je	LBB0_12
LBB0_11:
	movq	(%rdx,%rbx,2), %xmm0            ## xmm0 = mem[0],zero
	movq	8(%rdx,%rbx,2), %xmm1           ## xmm1 = mem[0],zero
	movq	(%rsi,%rbx,2), %xmm2            ## xmm2 = mem[0],zero
	punpcklwd	%xmm2, %xmm0            ## xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
	movq	8(%rsi,%rbx,2), %xmm2           ## xmm2 = mem[0],zero
	punpcklwd	%xmm2, %xmm1            ## xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
	leaq	(,%rbx,4), %rax
	orq	$16, %rax
	movdqu	%xmm0, (%rcx,%rbx,4)
	movdqu	%xmm1, (%rcx,%rax)
LBB0_12:
	leaq	(%rcx,%rdi,4), %rcx
	cmpq	%r10, %rdi
	jne	LBB0_13
LBB0_17:
	movq	%rcx, (%r8)
	shll	$2, %r14d
	addl	%r14d, 8(%r8)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_SDL_UnlockAudio                ## TAILCALL
LBB0_7:
	xorl	%ebx, %ebx
	testb	$1, %r9b
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_use_sound,8,3                  ## @use_sound
	.comm	_sdl_sound,16,3                 ## @sdl_sound
	.comm	_snd,8,3                        ## @snd
	.no_dead_strip	_sdl_sound_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_sound_update
_sdl_sound_update:                      ; @sdl_sound_update
	.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
	bl	_audio_update
Lloh0:
	adrp	x8, _use_sound@GOTPAGE
Lloh1:
	ldr	x8, [x8, _use_sound@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_SDL_LockAudio
Lloh3:
	adrp	x8, _sdl_sound@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sdl_sound@GOTPAGEOFF]
	ldr	x9, [x8]
	cmp	w19, #1
	b.lt	LBB0_12
; %bb.2:
Lloh5:
	adrp	x10, _snd@GOTPAGE
Lloh6:
	ldr	x10, [x10, _snd@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	ldp	x11, x12, [x10]
	mov	w10, w19
	cmp	w19, #16
	b.hs	LBB0_5
; %bb.3:
	mov	x13, #0
	b	LBB0_10
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x13, #0
	lsl	x14, x10, #1
	add	x15, x9, x10, lsl #2
	add	x16, x11, x14
	add	x14, x12, x14
	cmp	x9, x14
	ccmp	x12, x15, #2, lo
	cset	w14, lo
	cmp	x11, x15
	ccmp	x9, x16, #2, lo
	b.lo	LBB0_10
; %bb.6:
	tbnz	w14, #0, LBB0_10
; %bb.7:
	and	x13, x10, #0xfffffff0
	add	x14, x9, x13, lsl #2
	add	x15, x11, #16
	add	x16, x12, #16
	add	x9, x9, #32
	mov	x17, x13
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q2, [x15, #-16]
	ldp	q1, q3, [x16, #-16]
	sub	x0, x9, #32
	st2.8h	{ v0, v1 }, [x0]
	st2.8h	{ v2, v3 }, [x9]
	add	x15, x15, #32
	add	x16, x16, #32
	add	x9, x9, #64
	subs	x17, x17, #16
	b.ne	LBB0_8
; %bb.9:
	mov	x9, x14
	cmp	x13, x10
	b.eq	LBB0_13
LBB0_10:
	lsl	x14, x13, #1
	add	x12, x12, x14
	add	x11, x11, x14
	sub	x10, x10, x13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldrh	w13, [x11], #2
	strh	w13, [x9]
	ldrh	w13, [x12], #2
	strh	w13, [x9, #2]
	add	x9, x9, #4
	subs	x10, x10, #1
	b.ne	LBB0_11
LBB0_12:
	mov	x14, x9
LBB0_13:
	str	x14, [x8]
	ldr	w9, [x8, #8]
	add	w9, w9, w19, lsl #2
	str	w9, [x8, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_SDL_UnlockAudio
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_use_sound,8,3                  ; @use_sound
	.comm	_sdl_sound,16,3                 ; @sdl_sound
	.comm	_snd,8,3                        ; @snd
	.no_dead_strip	_sdl_sound_update
.subsections_via_symbols
