	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_fx8010_playback_prepare
_snd_emu10k1_fx8010_playback_prepare:   ## @snd_emu10k1_fx8010_playback_prepare
	.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, %r14
	movq	8(%rbx), %r15
	movq	8(%rax), %r12
	imulq	$88, (%rbx), %r13
	leaq	(%r12,%r13), %rdi
	addq	$76, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	(%r12,%r13), %eax
	addl	%eax, %eax
	movl	%eax, 76(%r12,%r13)
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, 80(%r12,%r13)
	movl	(%r12,%r13), %edi
	callq	_INITIAL_TRAM_POS
	movl	%eax, 72(%r12,%r13)
	movq	$0, 64(%r12,%r13)
	movq	56(%r12,%r13), %rsi
	addq	(%r14), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_ptr_write
	movq	48(%r12,%r13), %rsi
	addq	(%r14), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_ptr_write
	movq	40(%r12,%r13), %rsi
	addq	(%r14), %rsi
	movl	(%r15), %ecx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_snd_emu10k1_ptr_write
	movq	32(%r12,%r13), %rsi
	addq	(%r14), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_ptr_write
	movq	24(%r12,%r13), %rsi
	addq	(%r14), %rsi
	movl	4(%r15), %ecx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_snd_emu10k1_ptr_write
	movq	16(%r12,%r13), %rsi
	addq	(%r14), %rsi
	movl	4(%r15), %ecx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_snd_emu10k1_ptr_write
	movl	4(%r12,%r13), %ecx
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.1:
	addq	%r13, %r12
	addq	$4, %r12
	xorl	%ebx, %ebx
	movq	_TANKMEMADDRREG_ALIGN@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TANKMEMADDRREGBASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	4(%r12), %rdx
	movq	(%rdx,%rbx,8), %rdx
	leaq	(%rax,%rdx), %rsi
	addq	$128, %rsi
	movl	(%r13), %edi
	movq	_TANKMEMADDRREG_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movl	(%r15), %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%ebx, %ecx
	imull	%eax, %ecx
	addl	%edi, %ecx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_snd_emu10k1_ptr_write
	incq	%rbx
	movl	(%r12), %ecx
	cmpq	%rcx, %rbx
	jb	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TANKMEMADDRREGBASE,8,3         ## @TANKMEMADDRREGBASE
	.comm	_TANKMEMADDRREG_READ,4,2        ## @TANKMEMADDRREG_READ
	.comm	_TANKMEMADDRREG_ALIGN,4,2       ## @TANKMEMADDRREG_ALIGN
	.no_dead_strip	_snd_emu10k1_fx8010_playback_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_emu10k1_fx8010_playback_prepare
_snd_emu10k1_fx8010_playback_prepare:   ; @snd_emu10k1_fx8010_playback_prepare
	.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	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x23, [x0, #8]
	ldp	x24, x21, [x20]
	mov	w8, #88
	madd	x22, x24, x8, x23
	add	x0, x22, #76
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w8, [x22]
	lsl	w8, w8, #1
	str	w8, [x22, #76]
	mov	x0, x20
	bl	_snd_pcm_lib_buffer_bytes
	str	w0, [x22, #80]
	ldr	w0, [x22]
	bl	_INITIAL_TRAM_POS
	str	w0, [x22, #72]
	str	xzr, [x22, #64]
	ldr	x8, [x19]
	ldr	x9, [x22, #56]
	add	x1, x9, x8
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_snd_emu10k1_ptr_write
	ldr	x8, [x19]
	ldr	x9, [x22, #48]
	add	x1, x9, x8
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_snd_emu10k1_ptr_write
	ldr	x8, [x19]
	ldr	x9, [x22, #40]
	add	x1, x9, x8
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_emu10k1_ptr_write
	ldr	x8, [x19]
	ldr	x9, [x22, #32]
	add	x1, x9, x8
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_snd_emu10k1_ptr_write
	ldr	x8, [x19]
	ldr	x9, [x22, #24]
	add	x1, x9, x8
	ldr	w3, [x21, #4]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_emu10k1_ptr_write
	ldr	x8, [x19]
	ldr	x9, [x22, #16]
	add	x1, x9, x8
	ldr	w3, [x21, #4]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_emu10k1_ptr_write
	ldr	w8, [x22, #4]!
	cbz	w8, LBB0_3
; %bb.1:
	mov	x20, #0
	mov	w9, #88
	madd	x9, x24, x9, x23
	add	x23, x9, #8
Lloh0:
	adrp	x24, _TANKMEMADDRREGBASE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TANKMEMADDRREGBASE@GOTPAGEOFF]
Lloh2:
	adrp	x25, _TANKMEMADDRREG_READ@GOTPAGE
Lloh3:
	ldr	x25, [x25, _TANKMEMADDRREG_READ@GOTPAGEOFF]
Lloh4:
	adrp	x26, _TANKMEMADDRREG_ALIGN@GOTPAGE
Lloh5:
	ldr	x26, [x26, _TANKMEMADDRREG_ALIGN@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24]
	ldr	x10, [x23]
	ldr	x10, [x10, x20, lsl #3]
	add	x9, x9, x10
	add	x1, x9, #128
	ldr	w9, [x25]
	ldr	w10, [x26]
	orr	w9, w10, w9
	ldr	w10, [x21]
	udiv	w8, w10, w8
	madd	w3, w8, w20, w9
	mov	x0, x19
	mov	w2, #0
	bl	_snd_emu10k1_ptr_write
	add	x20, x20, #1
	ldr	w8, [x22]
	cmp	x20, x8
	b.lo	LBB0_2
LBB0_3:
	mov	w0, #0
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_TANKMEMADDRREGBASE,8,3         ; @TANKMEMADDRREGBASE
	.comm	_TANKMEMADDRREG_READ,4,2        ; @TANKMEMADDRREG_READ
	.comm	_TANKMEMADDRREG_ALIGN,4,2       ; @TANKMEMADDRREG_ALIGN
	.no_dead_strip	_snd_emu10k1_fx8010_playback_prepare
.subsections_via_symbols
