	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis_update_voice
_sis_update_voice:                      ## @sis_update_voice
	.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
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	_VOICE_SSO_TIMING@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_sis_update_sso
LBB0_14:
	movl	28(%rbx), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_snd_pcm_period_elapsed         ## TAILCALL
LBB0_2:
	movq	_VOICE_SYNC_TIMING@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.3:
	movl	4(%rbx), %esi
	movl	8(%rbx), %eax
	subl	%esi, %eax
	jle	LBB0_8
## %bb.4:
	movl	%eax, 8(%rbx)
	cmpl	%esi, %eax
	jge	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movl	%eax, %esi
	jmp	LBB0_7
LBB0_8:
	movl	12(%rbx), %r14d
	movq	_SIS_CAPTURE_DMA_FORMAT_CSO@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%rbx), %rdi
	callq	_readw
	subl	%eax, %r14d
	movl	16(%rbx), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	xorl	%edx, %edx
	cmpl	%ecx, %r14d
	cmovgl	%eax, %edx
	subl	%edx, %r14d
	jle	LBB0_10
## %bb.9:
	cmpl	$17, %r14d
	movl	$16, %esi
	cmovgel	%r14d, %esi
LBB0_6:
	movq	%rbx, %rdi
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sis_update_sso                 ## TAILCALL
LBB0_10:
	xorl	%eax, %eax
	cmpl	$-8, %r14d
	setge	%al
	movl	20(%rbx), %ecx
	leal	(%rax,%rax,4), %eax
	leal	(%rcx,%rax), %esi
	addl	$-4, %esi
	movl	%esi, 8(%rbx)
	cmpl	24(%rbx), %esi
	jge	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	_sis_update_sso
	movl	$0, 8(%rbx)
	jmp	LBB0_13
LBB0_12:
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_sis_update_sso
LBB0_13:
	movl	16(%rbx), %eax
	movl	20(%rbx), %ecx
	addl	12(%rbx), %ecx
	xorl	%edx, %edx
	cmpl	%eax, %ecx
	cmovgel	%eax, %edx
	subl	%edx, %ecx
	movl	%ecx, 12(%rbx)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_VOICE_SSO_TIMING,4,2           ## @VOICE_SSO_TIMING
	.comm	_VOICE_SYNC_TIMING,4,2          ## @VOICE_SYNC_TIMING
	.comm	_SIS_CAPTURE_DMA_FORMAT_CSO,8,3 ## @SIS_CAPTURE_DMA_FORMAT_CSO
	.no_dead_strip	_sis_update_voice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sis_update_voice
_sis_update_voice:                      ; @sis_update_voice
	.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
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _VOICE_SSO_TIMING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VOICE_SSO_TIMING@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_sis_update_sso
LBB0_2:
	ldr	w0, [x19, #28]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_snd_pcm_period_elapsed
LBB0_3:
Lloh3:
	adrp	x9, _VOICE_SYNC_TIMING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VOICE_SYNC_TIMING@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.4:
	ldp	w1, w8, [x19, #4]
	subs	w8, w8, w1
	b.le	LBB0_7
; %bb.5:
	str	w8, [x19, #8]
	cmp	w8, w1
	b.ge	LBB0_9
; %bb.6:
	mov	x0, x19
	mov	x1, x8
	b	LBB0_10
LBB0_7:
	ldr	w20, [x19, #12]
	ldr	x8, [x19, #32]
Lloh6:
	adrp	x9, _SIS_CAPTURE_DMA_FORMAT_CSO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SIS_CAPTURE_DMA_FORMAT_CSO@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readw
	ldr	w8, [x19, #16]
	cmp	w8, #0
	cinc	w9, w8, lt
	sub	w10, w20, w0
	cmp	w10, w9, asr #1
	csel	w8, w8, wzr, gt
	sub	w8, w10, w8
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.8:
	mov	w9, #16
	cmp	w8, #16
	csel	w1, w8, w9, gt
LBB0_9:
	mov	x0, x19
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sis_update_sso
LBB0_11:
	ldp	w9, w10, [x19, #20]
	sub	w11, w9, #4
	cmn	w8, #9
	csinc	w1, w11, w9, le
	str	w1, [x19, #8]
	cmp	w1, w10
	b.ge	LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_sis_update_sso
	str	wzr, [x19, #8]
	b	LBB0_14
LBB0_13:
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_sis_update_sso
LBB0_14:
	ldp	w10, w8, [x19, #16]
	ldr	w9, [x19, #12]
	add	w8, w8, w9
	cmp	w8, w10
	csel	w9, wzr, w10, lt
	sub	w8, w8, w9
	str	w8, [x19, #12]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VOICE_SSO_TIMING,4,2           ; @VOICE_SSO_TIMING
	.comm	_VOICE_SYNC_TIMING,4,2          ; @VOICE_SYNC_TIMING
	.comm	_SIS_CAPTURE_DMA_FORMAT_CSO,8,3 ; @SIS_CAPTURE_DMA_FORMAT_CSO
	.no_dead_strip	_sis_update_voice
.subsections_via_symbols
