	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_sgio2audio_pcm_prepare
_snd_sgio2audio_pcm_prepare:            ## @snd_sgio2audio_pcm_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, %r12
	callq	_snd_pcm_substream_chip
	movq	%rax, %r14
	movq	8(%r12), %r13
	movq	8(%r13), %rax
	movslq	(%rax), %r15
	movq	%r15, %rbx
	shlq	$5, %rbx
	movq	(%r14), %rdi
	addq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	(%r14), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax,%rbx)
	movq	%r12, 8(%rax,%rbx)
	movl	(%r12), %eax
	cmpl	$129, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	addq	$8, %rdi
	decl	%r15d
	movl	(%r13), %r8d
	movl	4(%r13), %edx
	movq	_SNDRV_PCM_FORMAT_S16_LE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %esi
	callq	_ad1843_setup_dac
	jmp	LBB0_4
LBB0_3:
	movq	%r14, %rdi
	addq	$8, %rdi
	movl	(%r13), %ecx
	movl	4(%r13), %esi
	movq	_SNDRV_PCM_FORMAT_S16_LE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ad1843_setup_adc
LBB0_4:
	addq	(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_PCM_FORMAT_S16_LE,4,2    ## @SNDRV_PCM_FORMAT_S16_LE
	.no_dead_strip	_snd_sgio2audio_pcm_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_sgio2audio_pcm_prepare
_snd_sgio2audio_pcm_prepare:            ; @snd_sgio2audio_pcm_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	x22, [x20, #8]
	ldr	x8, [x22, #8]
	ldrsw	x21, [x8]
	ldr	x8, [x0]
	lsl	x23, x21, #5
	add	x0, x8, x23
	bl	_spin_lock_irqsave
	ldr	x8, [x19]
	add	x8, x8, x23
	stp	xzr, xzr, [x8, #16]
	str	x20, [x8, #8]
	ldr	w8, [x20]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.2:
	add	x0, x19, #8
	sub	w1, w21, #1
Lloh0:
	adrp	x8, _SNDRV_PCM_FORMAT_S16_LE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNDRV_PCM_FORMAT_S16_LE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	ldp	w4, w2, [x22]
	bl	_ad1843_setup_dac
	b	LBB0_4
LBB0_3:
	add	x0, x19, #8
Lloh3:
	adrp	x8, _SNDRV_PCM_FORMAT_S16_LE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SNDRV_PCM_FORMAT_S16_LE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldp	w3, w1, [x22]
	bl	_ad1843_setup_adc
LBB0_4:
	ldr	x8, [x19]
	add	x0, x8, x21, lsl #5
	bl	_spin_unlock_irqrestore
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_PCM_FORMAT_S16_LE,4,2    ; @SNDRV_PCM_FORMAT_S16_LE
	.no_dead_strip	_snd_sgio2audio_pcm_prepare
.subsections_via_symbols
