	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_p16v_pcm_prepare_capture
_snd_p16v_pcm_prepare_capture:          ## @snd_p16v_pcm_prepare_capture
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	8(%rbx), %r15
	movl	(%rax), %ebx
	subl	(%r14), %ebx
	movq	_A_SPDIF_SAMPLERATE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_snd_emu10k1_ptr_read
	movl	(%r15), %ecx
	cmpl	$192000, %ecx                   ## imm = 0x2EE00
	je	LBB0_5
## %bb.1:
	cmpl	$96000, %ecx                    ## imm = 0x17700
	je	LBB0_4
## %bb.2:
	cmpl	$44100, %ecx                    ## imm = 0xAC44
	jne	LBB0_6
## %bb.3:
	movl	(%r12), %esi
	andl	$-3585, %eax                    ## imm = 0xF1FF
	orl	$2048, %eax                     ## imm = 0x800
	jmp	LBB0_7
LBB0_5:
	movl	(%r12), %esi
	andl	$-3585, %eax                    ## imm = 0xF1FF
	orl	$512, %eax                      ## imm = 0x200
	jmp	LBB0_7
LBB0_4:
	movl	(%r12), %esi
	andl	$-3585, %eax                    ## imm = 0xF1FF
	orl	$1024, %eax                     ## imm = 0x400
	jmp	LBB0_7
LBB0_6:
	movl	(%r12), %esi
	andl	$-3585, %eax                    ## imm = 0xF1FF
LBB0_7:
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_snd_emu10k1_ptr_write
	movq	%r14, %rdi
	movl	$19, %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_ptr20_write
	movq	_CAPTURE_DMA_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15), %ecx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_snd_emu10k1_ptr20_write
	movq	_CAPTURE_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	8(%r15), %esi
	movq	%r15, %rdi
	callq	_frames_to_bytes
	shll	$16, %eax
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_snd_emu10k1_ptr20_write
	movq	_CAPTURE_POINTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_ptr20_write
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_A_SPDIF_SAMPLERATE,4,2         ## @A_SPDIF_SAMPLERATE
	.comm	_CAPTURE_DMA_ADDR,4,2           ## @CAPTURE_DMA_ADDR
	.comm	_CAPTURE_BUFFER_SIZE,4,2        ## @CAPTURE_BUFFER_SIZE
	.comm	_CAPTURE_POINTER,4,2            ## @CAPTURE_POINTER
	.no_dead_strip	_snd_p16v_pcm_prepare_capture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_p16v_pcm_prepare_capture
_snd_p16v_pcm_prepare_capture:          ; @snd_p16v_pcm_prepare_capture
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldp	x8, x21, [x20]
	ldr	w8, [x8]
	ldr	w9, [x0]
	sub	w20, w8, w9
Lloh0:
	adrp	x22, _A_SPDIF_SAMPLERATE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _A_SPDIF_SAMPLERATE@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x2, x20
	bl	_snd_emu10k1_ptr_read
	ldr	w8, [x21]
	sub	w9, w8, #46, lsl #12            ; =188416
	cmp	w9, #3584
	b.eq	LBB0_4
; %bb.1:
	mov	w9, #30464
	movk	w9, #1, lsl #16
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.2:
	mov	w9, #44100
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.3:
	ldr	w1, [x22]
	and	w8, w0, #0xfffff1ff
	orr	w3, w8, #0x800
	b	LBB0_7
LBB0_4:
	ldr	w1, [x22]
	and	w8, w0, #0xfffff1ff
	orr	w3, w8, #0x200
	b	LBB0_7
LBB0_5:
	ldr	w1, [x22]
	and	w8, w0, #0xfffff1ff
	orr	w3, w8, #0x400
	b	LBB0_7
LBB0_6:
	ldr	w1, [x22]
	and	w3, w0, #0xfffff1ff
LBB0_7:
	mov	x0, x19
	mov	x2, x20
	bl	_snd_emu10k1_ptr_write
	mov	x0, x19
	mov	w1, #19
	mov	x2, x20
	mov	w3, #0
	bl	_snd_emu10k1_ptr20_write
Lloh2:
	adrp	x8, _CAPTURE_DMA_ADDR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CAPTURE_DMA_ADDR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w3, [x21, #4]
	mov	x0, x19
	mov	x2, x20
	bl	_snd_emu10k1_ptr20_write
Lloh5:
	adrp	x8, _CAPTURE_BUFFER_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CAPTURE_BUFFER_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	ldr	w1, [x21, #8]
	mov	x0, x21
	bl	_frames_to_bytes
	lsl	w3, w0, #16
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_snd_emu10k1_ptr20_write
Lloh8:
	adrp	x8, _CAPTURE_POINTER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CAPTURE_POINTER@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #0
	bl	_snd_emu10k1_ptr20_write
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_A_SPDIF_SAMPLERATE,4,2         ; @A_SPDIF_SAMPLERATE
	.comm	_CAPTURE_DMA_ADDR,4,2           ; @CAPTURE_DMA_ADDR
	.comm	_CAPTURE_BUFFER_SIZE,4,2        ; @CAPTURE_BUFFER_SIZE
	.comm	_CAPTURE_POINTER,4,2            ; @CAPTURE_POINTER
	.no_dead_strip	_snd_p16v_pcm_prepare_capture
.subsections_via_symbols
