	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1x_pcm_pointer
_snd_emu10k1x_pcm_pointer:              ## @snd_emu10k1x_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r15
	movq	(%rbx), %r14
	movq	16(%r14), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.1:
	movq	8(%rax), %rax
	movl	(%rax), %r12d
	movq	_PLAYBACK_LIST_PTR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_snd_emu10k1x_ptr_read
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_PLAYBACK_POINTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_snd_emu10k1x_ptr_read
	movq	%rax, %r13
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_snd_emu10k1x_ptr_read
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movq	(%r14), %rsi
	movq	%r14, %rdi
	callq	_frames_to_bytes
	cmpq	%rax, %r13
	jne	LBB0_4
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_4:
	cmpq	%rbx, -48(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_6
## %bb.5:
	movq	_PLAYBACK_POINTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_snd_emu10k1x_ptr_read
	movq	%rax, %r13
LBB0_6:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_bytes_to_frames
	sarq	$3, %rbx
	imulq	8(%r14), %rbx
	addq	%rax, %rbx
	movq	(%r14), %rax
	xorl	%ecx, %ecx
	cmpq	%rax, %rbx
	cmovgeq	%rax, %rcx
	subq	%rcx, %rbx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PLAYBACK_LIST_PTR,4,2          ## @PLAYBACK_LIST_PTR
	.comm	_PLAYBACK_POINTER,4,2           ## @PLAYBACK_POINTER
	.no_dead_strip	_snd_emu10k1x_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_emu10k1x_pcm_pointer
_snd_emu10k1x_pcm_pointer:              ; @snd_emu10k1x_pcm_pointer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_snd_pcm_substream_chip
	ldr	x19, [x19]
	ldr	x8, [x19, #16]
	ldr	w9, [x8]
	cbz	w9, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x8, [x8, #8]
	ldr	w21, [x8]
Lloh0:
	adrp	x22, _PLAYBACK_LIST_PTR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PLAYBACK_LIST_PTR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x2, x21
	bl	_snd_emu10k1x_ptr_read
	mov	x24, x0
Lloh2:
	adrp	x25, _PLAYBACK_POINTER@GOTPAGE
Lloh3:
	ldr	x25, [x25, _PLAYBACK_POINTER@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x20
	mov	x2, x21
	bl	_snd_emu10k1x_ptr_read
	mov	x23, x0
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x21
	bl	_snd_emu10k1x_ptr_read
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.2:
	ldr	x1, [x19]
	mov	x0, x19
	bl	_frames_to_bytes
	cmp	x23, x0
	b.ne	LBB0_4
LBB0_3:
	mov	x0, #0
	b	LBB0_7
LBB0_4:
	cmp	x24, x22
	b.eq	LBB0_6
; %bb.5:
	ldr	w1, [x25]
	mov	x0, x20
	mov	x2, x21
	bl	_snd_emu10k1x_ptr_read
	mov	x23, x0
LBB0_6:
	mov	x0, x19
	mov	x1, x23
	bl	_bytes_to_frames
	asr	x8, x22, #3
	ldp	x10, x9, [x19]
	madd	x8, x9, x8, x0
	cmp	x8, x10
	csel	x9, xzr, x10, lt
	sub	x0, x8, x9
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PLAYBACK_LIST_PTR,4,2          ; @PLAYBACK_LIST_PTR
	.comm	_PLAYBACK_POINTER,4,2           ; @PLAYBACK_POINTER
	.no_dead_strip	_snd_emu10k1x_pcm_pointer
.subsections_via_symbols
