	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ensoniq_playback1_prepare
_snd_ensoniq_playback1_prepare:         ## @snd_ensoniq_playback1_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, %r12
	movq	(%rbx), %r13
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, (%r12)
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, 4(%r12)
	movl	12(%r13), %edi
	callq	_snd_pcm_format_width
	xorl	%ecx, %ecx
	cmpl	$16, %eax
	sete	%cl
	xorl	%eax, %eax
	cmpl	$2, (%r13)
	setge	%al
	leal	(%rax,%rcx,2), %r15d
	leaq	16(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	_ES_DAC1_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	andl	8(%r12), %ebx
	movl	%ebx, 8(%r12)
	movq	_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ES_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outl
	movq	_ES_PAGE_DAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ES_MEM_PAGEO
	movl	%eax, %ebx
	movq	_MEM_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ES_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outl
	movl	8(%r13), %ebx
	movq	_DAC1_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ES_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outl
	movl	(%r12), %ebx
	sarl	$2, %ebx
	decl	%ebx
	movq	_DAC1_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ES_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outl
	movq	_ES_P1_LOOP_SEL@GOTPCREL(%rip), %rax
	movq	_ES_P1_PAUSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_ES_P1_SCT_RLD@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_ES_P1_MODEM@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, 12(%r12)
	movq	_ES_P1_INT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_ES_P1_MODEO
	orl	%eax, %ebx
	orl	12(%r12), %ebx
	movl	%ebx, 12(%r12)
	movq	_SERIAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ES_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outl
	movl	4(%r12), %ebx
	movq	_snd_ensoniq_sample_shift@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	(%rax,%r15,4), %cl
	sarl	%cl, %ebx
	decl	%ebx
	movq	_DAC1_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ES_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outl
	movl	8(%r12), %ebx
	movq	_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ES_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outl
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movl	4(%r13), %esi
	movq	%r12, %rdi
	callq	_snd_es1371_dac1_rate
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ES_DAC1_EN,4,2                 ## @ES_DAC1_EN
	.comm	_CONTROL,4,2                    ## @CONTROL
	.comm	_ES_PAGE_DAC,4,2                ## @ES_PAGE_DAC
	.comm	_MEM_PAGE,4,2                   ## @MEM_PAGE
	.comm	_DAC1_FRAME,4,2                 ## @DAC1_FRAME
	.comm	_DAC1_SIZE,4,2                  ## @DAC1_SIZE
	.comm	_ES_P1_LOOP_SEL,4,2             ## @ES_P1_LOOP_SEL
	.comm	_ES_P1_PAUSE,4,2                ## @ES_P1_PAUSE
	.comm	_ES_P1_SCT_RLD,4,2              ## @ES_P1_SCT_RLD
	.comm	_ES_P1_MODEM,4,2                ## @ES_P1_MODEM
	.comm	_ES_P1_INT_EN,4,2               ## @ES_P1_INT_EN
	.comm	_SERIAL,4,2                     ## @SERIAL
	.comm	_snd_ensoniq_sample_shift,8,3   ## @snd_ensoniq_sample_shift
	.comm	_DAC1_COUNT,4,2                 ## @DAC1_COUNT
	.comm	_ES_1370_WTSRSELM,4,2           ## @ES_1370_WTSRSELM
	.comm	_ES_1373_BYPASS_P1,4,2          ## @ES_1373_BYPASS_P1
	.no_dead_strip	_snd_ensoniq_playback1_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ensoniq_playback1_prepare
_snd_ensoniq_playback1_prepare:         ; @snd_ensoniq_playback1_prepare
	.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
	mov	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x23, [x20]
	mov	x0, x20
	bl	_snd_pcm_lib_buffer_bytes
	str	w0, [x19]
	mov	x0, x20
	bl	_snd_pcm_lib_period_bytes
	str	w0, [x19, #4]
	ldr	w0, [x23, #12]
	bl	_snd_pcm_format_width
	cmp	w0, #16
	cset	w8, eq
	ldr	w9, [x23]
	cmp	w9, #1
	cset	w21, gt
	bfi	w21, w8, #1, #1
	add	x20, x19, #16
	mov	x0, x20
	bl	_spin_lock_irq
Lloh0:
	adrp	x8, _ES_DAC1_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ES_DAC1_EN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	bic	w22, w9, w8
	str	w22, [x19, #8]
Lloh3:
	adrp	x24, _CONTROL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _CONTROL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_ES_REG
	mov	x1, x0
	mov	x0, x22
	bl	_outl
Lloh5:
	adrp	x8, _ES_PAGE_DAC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ES_PAGE_DAC@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_ES_MEM_PAGEO
	mov	x22, x0
Lloh8:
	adrp	x8, _MEM_PAGE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MEM_PAGE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ES_REG
	mov	x1, x0
	mov	x0, x22
	bl	_outl
	ldr	w22, [x23, #8]
Lloh11:
	adrp	x8, _DAC1_FRAME@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DAC1_FRAME@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ES_REG
	mov	x1, x0
	mov	x0, x22
	bl	_outl
	ldr	w8, [x19]
	asr	w8, w8, #2
	sub	w22, w8, #1
Lloh14:
	adrp	x8, _DAC1_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DAC1_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ES_REG
	mov	x1, x0
	mov	x0, x22
	bl	_outl
Lloh17:
	adrp	x8, _ES_P1_LOOP_SEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ES_P1_LOOP_SEL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _ES_P1_PAUSE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ES_P1_PAUSE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _ES_P1_SCT_RLD@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ES_P1_SCT_RLD@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh26:
	adrp	x9, _ES_P1_MODEM@GOTPAGE
Lloh27:
	ldr	x9, [x9, _ES_P1_MODEM@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x19, #12]
	bic	w8, w9, w8
	str	w8, [x19, #12]
Lloh29:
	adrp	x8, _ES_P1_INT_EN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ES_P1_INT_EN@GOTPAGEOFF]
Lloh31:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_ES_P1_MODEO
	orr	w8, w0, w22
	ldr	w9, [x19, #12]
	orr	w22, w8, w9
	str	w22, [x19, #12]
Lloh32:
	adrp	x8, _SERIAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SERIAL@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ES_REG
	mov	x1, x0
	mov	x0, x22
	bl	_outl
Lloh35:
	adrp	x8, _snd_ensoniq_sample_shift@GOTPAGE
Lloh36:
	ldr	x8, [x8, _snd_ensoniq_sample_shift@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	ldr	w8, [x8, w21, uxtw #2]
	ldr	w9, [x19, #4]
	asr	w8, w9, w8
	sub	w21, w8, #1
Lloh38:
	adrp	x8, _DAC1_COUNT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _DAC1_COUNT@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ES_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outl
	ldr	w21, [x19, #8]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_ES_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outl
	mov	x0, x20
	bl	_spin_unlock_irq
	ldr	w1, [x23, #4]
	mov	x0, x19
	bl	_snd_es1371_dac1_rate
	mov	w0, #0
	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	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ES_DAC1_EN,4,2                 ; @ES_DAC1_EN
	.comm	_CONTROL,4,2                    ; @CONTROL
	.comm	_ES_PAGE_DAC,4,2                ; @ES_PAGE_DAC
	.comm	_MEM_PAGE,4,2                   ; @MEM_PAGE
	.comm	_DAC1_FRAME,4,2                 ; @DAC1_FRAME
	.comm	_DAC1_SIZE,4,2                  ; @DAC1_SIZE
	.comm	_ES_P1_LOOP_SEL,4,2             ; @ES_P1_LOOP_SEL
	.comm	_ES_P1_PAUSE,4,2                ; @ES_P1_PAUSE
	.comm	_ES_P1_SCT_RLD,4,2              ; @ES_P1_SCT_RLD
	.comm	_ES_P1_MODEM,4,2                ; @ES_P1_MODEM
	.comm	_ES_P1_INT_EN,4,2               ; @ES_P1_INT_EN
	.comm	_SERIAL,4,2                     ; @SERIAL
	.comm	_snd_ensoniq_sample_shift,8,3   ; @snd_ensoniq_sample_shift
	.comm	_DAC1_COUNT,4,2                 ; @DAC1_COUNT
	.comm	_ES_1370_WTSRSELM,4,2           ; @ES_1370_WTSRSELM
	.comm	_ES_1373_BYPASS_P1,4,2          ; @ES_1373_BYPASS_P1
	.no_dead_strip	_snd_ensoniq_playback1_prepare
.subsections_via_symbols
