	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_ipcm_peek
_snd_emu10k1_ipcm_peek:                 ## @snd_emu10k1_ipcm_peek
	.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	(%rsi), %r13
	movq	_EMU10K1_FX8010_PCM_COUNT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jae	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	callq	_mutex_lock
	leaq	16(%r14), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	leaq	(,%r13,2), %rcx
	addq	%r13, %rcx
	shlq	$4, %rcx
	movl	(%r12,%rcx), %eax
	movl	%eax, 8(%rbx)
	movups	32(%r12,%rcx), %xmm0
	movups	%xmm0, 64(%rbx)
	movups	16(%r12,%rcx), %xmm0
	movups	%xmm0, 48(%rbx)
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	leaq	(%r12,%rcx), %rax
	movq	8(%r12,%rcx), %rcx
	movq	40(%rbx), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rsi,4), %edi
	movl	%edi, (%rdx,%rsi,4)
	incq	%rsi
	movl	(%rax), %edi
	cmpq	%rdi, %rsi
	jb	LBB0_4
LBB0_5:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
	movq	$0, 32(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMU10K1_FX8010_PCM_COUNT,8,3   ## @EMU10K1_FX8010_PCM_COUNT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_snd_emu10k1_ipcm_peek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_emu10k1_ipcm_peek
_snd_emu10k1_ipcm_peek:                 ; @snd_emu10k1_ipcm_peek
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x22, [x1]
Lloh0:
	adrp	x8, _EMU10K1_FX8010_PCM_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EMU10K1_FX8010_PCM_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x22, x8
	b.hs	LBB0_5
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x0, #8]
	bl	_mutex_lock
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_irq
	mov	w8, #48
	madd	x8, x22, x8, x23
	ldr	w9, [x8]
	str	w9, [x20, #8]
	ldr	q0, [x8, #32]
	str	q0, [x20, #64]
	ldr	q0, [x8, #16]
	str	q0, [x20, #48]
	cbz	w9, LBB0_4
; %bb.2:
	mov	x9, #0
	mov	w10, #48
	madd	x10, x22, x10, x23
	ldr	x10, [x10, #8]
	ldr	x11, [x20, #40]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x12, x9, #2
	ldr	w13, [x10, x12]
	str	w13, [x11, x12]
	add	x9, x9, #1
	ldr	w12, [x8]
	cmp	x9, x12
	b.lo	LBB0_3
LBB0_4:
	stp	xzr, xzr, [x20, #16]
	str	xzr, [x20, #32]
	mov	x0, x21
	bl	_spin_unlock_irq
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EMU10K1_FX8010_PCM_COUNT,8,3   ; @EMU10K1_FX8010_PCM_COUNT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_snd_emu10k1_ipcm_peek
.subsections_via_symbols
