	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Sound_SetLatency               ## -- Begin function Sound_SetLatency
	.p2align	4, 0x90
_Sound_SetLatency:                      ## @Sound_SetLatency
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_Sound_latency@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	movq	_Sound_enabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_Sound_out@GOTPCREL(%rip), %r15
	movl	4(%r15), %r14d
	imull	(%r15), %r14d
	imull	8(%r15), %edi
	movslq	%edi, %rax
	imulq	$274877907, %rax, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$38, %rbx
	addl	%eax, %ebx
	xorl	%eax, %eax
	callq	_PLATFORM_SoundLock
	movl	12(%r15), %eax
	leal	(%rax,%rax,4), %ecx
	addl	%ebx, %ecx
	imull	%r14d, %ecx
	movq	_sync_buffer_size@GOTPCREL(%rip), %r15
	movl	%ecx, (%r15)
	imull	%r14d, %ebx
	movq	_sync_min_fill@GOTPCREL(%rip), %rcx
	movl	%ebx, (%rcx)
	imull	%eax, %r14d
	addl	%ebx, %r14d
	movq	_sync_max_fill@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	movq	_avg_fill@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	_sync_read_pos@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_sync_write_pos@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	_sync_buffer@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_free
	movl	(%r15), %edi
	callq	_Util_malloc
	movl	%eax, (%rbx)
	movl	(%r15), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_memset
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PLATFORM_SoundUnlock           ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Sound_latency,4,2              ## @Sound_latency
	.comm	_Sound_enabled,8,3              ## @Sound_enabled
	.comm	_Sound_out,16,2                 ## @Sound_out
	.comm	_sync_buffer_size,4,2           ## @sync_buffer_size
	.comm	_sync_min_fill,4,2              ## @sync_min_fill
	.comm	_sync_max_fill,4,2              ## @sync_max_fill
	.comm	_avg_fill,4,2                   ## @avg_fill
	.comm	_sync_read_pos,8,3              ## @sync_read_pos
	.comm	_sync_write_pos,4,2             ## @sync_write_pos
	.comm	_sync_buffer,4,2                ## @sync_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Sound_SetLatency               ; -- Begin function Sound_SetLatency
	.p2align	2
_Sound_SetLatency:                      ; @Sound_SetLatency
	.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
Lloh0:
	adrp	x8, _Sound_latency@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Sound_latency@GOTPAGEOFF]
Lloh2:
	str	w0, [x8]
Lloh3:
	adrp	x8, _Sound_enabled@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Sound_enabled@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh6:
	adrp	x19, _Sound_out@GOTPAGE
Lloh7:
	ldr	x19, [x19, _Sound_out@GOTPAGEOFF]
	ldp	w8, w9, [x19]
	mul	w20, w9, w8
	ldr	w8, [x19, #8]
	mul	w8, w8, w0
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w21, w8, w9
	bl	_PLATFORM_SoundLock
	ldr	w8, [x19, #12]
	add	w9, w8, w8, lsl #2
	add	w9, w9, w21
	mul	w9, w9, w20
Lloh8:
	adrp	x19, _sync_buffer_size@GOTPAGE
Lloh9:
	ldr	x19, [x19, _sync_buffer_size@GOTPAGEOFF]
	str	w9, [x19]
Lloh10:
	adrp	x9, _sync_min_fill@GOTPAGE
Lloh11:
	ldr	x9, [x9, _sync_min_fill@GOTPAGEOFF]
	mul	w10, w21, w20
Lloh12:
	str	w10, [x9]
	madd	w8, w8, w20, w10
Lloh13:
	adrp	x9, _sync_max_fill@GOTPAGE
Lloh14:
	ldr	x9, [x9, _sync_max_fill@GOTPAGEOFF]
Lloh15:
	str	w8, [x9]
Lloh16:
	adrp	x8, _avg_fill@GOTPAGE
Lloh17:
	ldr	x8, [x8, _avg_fill@GOTPAGEOFF]
Lloh18:
	str	w10, [x8]
Lloh19:
	adrp	x8, _sync_read_pos@GOTPAGE
Lloh20:
	ldr	x8, [x8, _sync_read_pos@GOTPAGEOFF]
Lloh21:
	str	xzr, [x8]
Lloh22:
	adrp	x8, _sync_write_pos@GOTPAGE
Lloh23:
	ldr	x8, [x8, _sync_write_pos@GOTPAGEOFF]
Lloh24:
	str	w10, [x8]
Lloh25:
	adrp	x20, _sync_buffer@GOTPAGE
Lloh26:
	ldr	x20, [x20, _sync_buffer@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_free
	ldr	w0, [x19]
	bl	_Util_malloc
	str	w0, [x20]
	ldr	w2, [x19]
	mov	w1, #0
	bl	_memset
	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	_PLATFORM_SoundUnlock
LBB0_2:
	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 AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_Sound_latency,4,2              ; @Sound_latency
	.comm	_Sound_enabled,8,3              ; @Sound_enabled
	.comm	_Sound_out,16,2                 ; @Sound_out
	.comm	_sync_buffer_size,4,2           ; @sync_buffer_size
	.comm	_sync_min_fill,4,2              ; @sync_min_fill
	.comm	_sync_max_fill,4,2              ; @sync_max_fill
	.comm	_avg_fill,4,2                   ; @avg_fill
	.comm	_sync_read_pos,8,3              ; @sync_read_pos
	.comm	_sync_write_pos,4,2             ; @sync_write_pos
	.comm	_sync_buffer,4,2                ; @sync_buffer
.subsections_via_symbols
