	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_m3_update_ptr
_snd_m3_update_ptr:                     ## @snd_m3_update_ptr
	.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
	cmpl	$0, 16(%rsi)
	je	LBB0_9
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	24(%rsi), %r14
	movq	%r14, %rdx
	callq	_snd_m3_get_pointer
	movl	%eax, %ecx
	movl	(%rbx), %esi
	cmpl	%esi, %eax
	jb	LBB0_3
## %bb.2:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%edx, %ecx
LBB0_3:
	leal	(%rcx,%rsi), %eax
	subl	4(%rbx), %eax
	cmpl	%esi, %eax
	jb	LBB0_5
## %bb.4:
	xorl	%edx, %edx
	divl	%esi
	movl	%edx, %eax
LBB0_5:
	movl	%ecx, 4(%rbx)
	addl	8(%rbx), %eax
	movl	%eax, 8(%rbx)
	movl	12(%rbx), %ecx
	movl	%eax, %edx
	subl	%ecx, %edx
	jge	LBB0_6
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leal	(%rcx,%rcx), %esi
	cmpl	%esi, %eax
	jl	LBB0_8
## %bb.7:
	cltd
	idivl	%ecx
LBB0_8:
	movl	%edx, 8(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	%r14, %rdi
	callq	_snd_pcm_period_elapsed
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_lock                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_snd_m3_update_ptr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_m3_update_ptr
_snd_m3_update_ptr:                     ; @snd_m3_update_ptr
	.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
	ldr	w8, [x1, #16]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x1, #24]
	mov	x2, x20
	bl	_snd_m3_get_pointer
	ldr	w8, [x21]
	cmp	w0, w8
	b.lo	LBB0_3
; %bb.2:
	udiv	w9, w0, w8
	msub	w0, w9, w8, w0
LBB0_3:
	ldr	w9, [x21, #4]
	add	w10, w0, w8
	sub	w9, w10, w9
	cmp	w9, w8
	b.lo	LBB0_5
; %bb.4:
	udiv	w10, w9, w8
	msub	w9, w10, w8, w9
LBB0_5:
	ldp	w10, w8, [x21, #8]
	add	w10, w10, w9
	subs	w9, w10, w8
	stp	w0, w10, [x21, #4]
	b.ge	LBB0_7
LBB0_6:
	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
LBB0_7:
	sdiv	w11, w10, w8
	msub	w11, w11, w8, w10
	cmp	w10, w8, lsl #1
	csel	w8, w11, w9, ge
	str	w8, [x21, #8]
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x20
	bl	_snd_pcm_period_elapsed
	mov	x0, x19
	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	_spin_lock
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_snd_m3_update_ptr
.subsections_via_symbols
