	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_via686_pcm_pointer
_snd_via686_pcm_pointer:                ## @snd_via686_pcm_pointer
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_snd_pcm_substream_chip
	movq	%rax, %r14
	movq	(%r15), %rax
	movq	(%rax), %rbx
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_1
LBB0_5:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_OFFSET_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_VIADEV_REG
	movl	%eax, %edi
	callq	_inb
	movq	_VIA_REG_STAT_ACTIVE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.2:
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_OFFSET_CURR_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_VIADEV_REG
	movl	%eax, %edi
	callq	_inl
	movl	%eax, %r12d
	andl	$16777215, %r12d                ## imm = 0xFFFFFF
	movq	_OFFSET_CURR_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_VIADEV_REG
	movl	%eax, %edi
	callq	_inl
	xorl	%esi, %esi
	subl	8(%rbx), %eax
	jbe	LBB0_4
## %bb.3:
	shrl	$3, %eax
	decl	%eax
	xorl	%edx, %edx
	divl	(%rbx)
	movl	%edx, %esi
LBB0_4:
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_calc_linear_pos
	movl	%eax, %r12d
	movl	%eax, 4(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	(%r15), %rdi
	movl	%r12d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bytes_to_frames                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OFFSET_STATUS,4,2              ## @OFFSET_STATUS
	.comm	_VIA_REG_STAT_ACTIVE,4,2        ## @VIA_REG_STAT_ACTIVE
	.comm	_OFFSET_CURR_COUNT,4,2          ## @OFFSET_CURR_COUNT
	.comm	_OFFSET_CURR_PTR,4,2            ## @OFFSET_CURR_PTR
	.no_dead_strip	_snd_via686_pcm_pointer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_via686_pcm_pointer
_snd_via686_pcm_pointer:                ; @snd_via686_pcm_pointer
	.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
	mov	x19, x0
	bl	_snd_pcm_substream_chip
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x21, [x8]
	ldr	w8, [x21]
	cmp	w8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #0
	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_2:
Lloh0:
	adrp	x8, _OFFSET_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OFFSET_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_VIADEV_REG
	bl	_inb
Lloh3:
	adrp	x8, _VIA_REG_STAT_ACTIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIA_REG_STAT_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_1
; %bb.3:
	mov	x0, x20
	bl	_spin_lock
Lloh6:
	adrp	x8, _OFFSET_CURR_COUNT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OFFSET_CURR_COUNT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_VIADEV_REG
	bl	_inl
	and	w22, w0, #0xffffff
Lloh9:
	adrp	x8, _OFFSET_CURR_PTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OFFSET_CURR_PTR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_VIADEV_REG
	bl	_inl
	ldr	w8, [x21, #8]
	subs	w8, w0, w8
	b.ls	LBB0_5
; %bb.4:
	lsr	w8, w8, #3
	sub	w8, w8, #1
	ldr	w9, [x21]
	udiv	w10, w8, w9
	msub	w1, w10, w9, w8
	b	LBB0_6
LBB0_5:
	mov	w1, #0
LBB0_6:
	mov	x0, x21
	mov	x2, x22
	bl	_calc_linear_pos
	mov	x22, x0
	str	w0, [x21, #4]
	mov	x0, x20
	bl	_spin_unlock
	ldr	x0, [x19]
	mov	x1, x22
	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	_bytes_to_frames
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OFFSET_STATUS,4,2              ; @OFFSET_STATUS
	.comm	_VIA_REG_STAT_ACTIVE,4,2        ; @VIA_REG_STAT_ACTIVE
	.comm	_OFFSET_CURR_COUNT,4,2          ; @OFFSET_CURR_COUNT
	.comm	_OFFSET_CURR_PTR,4,2            ; @OFFSET_CURR_PTR
	.no_dead_strip	_snd_via686_pcm_pointer
.subsections_via_symbols
