	.file	"extr_pcm.c_pcd_pcm_sync.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pcd_pcm_sync
	.type	pcd_pcm_sync, @function
pcd_pcm_sync:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, QWORD PTR Pico_mcd[rip]
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	eax, DWORD PTR 32[r14]
	sub	edi, eax
	mov	DWORD PTR -4[rsp], eax
	cmp	edi, 383
	jle	.L1
	mov	r13d, edi
	mov	edi, 2863311531
	mov	eax, DWORD PTR [r14]
	mov	r15d, DWORD PTR 36[r14]
	imul	r13, rdi
	mov	edx, DWORD PTR PCM_MIXBUF_LEN[rip]
	mov	ecx, edx
	shr	r13, 40
	sub	ecx, eax
	lea	esi, [rax+r13]
	cmp	esi, edx
	cmovg	r13d, ecx
	test	BYTE PTR 40[r14], -128
	je	.L14
	test	r15d, r15d
	jne	.L4
.L14:
	cmp	QWORD PTR 56[r14], 0
	je	.L6
	xor	r15d, r15d
.L4:
	mov	rdx, QWORD PTR 8[r14]
	add	eax, eax
	mov	rbp, QWORD PTR 48[r14]
	xor	r12d, r12d
	cdqe
	mov	DWORD PTR 16[r14], 1
	lea	rax, [rdx+rax*4]
	mov	QWORD PTR 56[r14], 0
	mov	rbx, rax
	mov	QWORD PTR -16[rsp], rax
	lea	eax, -1[r13]
	lea	r11, 8[rbx+rax*8]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L26:
	mov	eax, DWORD PTR PCM_STEP_SHIFT[rip]
	add	r12d, 1
	add	rbp, 16
	lea	ecx, 8[rax]
	mov	eax, DWORD PTR 24[rbx]
	sal	eax, cl
	mov	DWORD PTR -16[rbp], eax
	cmp	r12d, 8
	je	.L25
.L13:
	bt	r15d, r12d
	mov	rbx, QWORD PTR 8[rbp]
	jnc	.L26
	mov	eax, DWORD PTR 4[rbx]
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR 0[rbp]
	movzx	r10d, WORD PTR 8[rbx]
	mov	r9d, eax
	sar	eax, 4
	and	r9d, 15
	mov	edi, eax
	imul	r9d, edx
	imul	edi, edx
	sar	r9d, 6
	sar	edi, 6
	test	r13d, r13d
	jle	.L9
	mov	r8, QWORD PTR 24[r14]
	mov	rdx, QWORD PTR -16[rsp]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	mov	ecx, eax
	and	ecx, 127
	neg	ecx
	test	al, -128
	cmovne	eax, ecx
	add	esi, r10d
	and	esi, 134217727
	mov	ecx, eax
	imul	eax, edi
	add	DWORD PTR 4[rdx], eax
	imul	ecx, r9d
	add	DWORD PTR [rdx], ecx
	add	rdx, 8
	cmp	r11, rdx
	je	.L9
.L12:
	mov	ecx, DWORD PTR PCM_STEP_SHIFT[rip]
	mov	eax, esi
	shr	eax, cl
	mov	eax, DWORD PTR [r8+rax*4]
	cmp	eax, 255
	jne	.L10
	movzx	esi, WORD PTR 16[rbx]
	mov	eax, DWORD PTR [r8+rsi*4]
	sal	esi, cl
	cmp	eax, 255
	jne	.L10
.L9:
	add	r12d, 1
	mov	DWORD PTR 0[rbp], esi
	add	rbp, 16
	cmp	r12d, 8
	jne	.L13
.L25:
	mov	eax, DWORD PTR [r14]
.L6:
	lea	edx, 0[r13+r13*2]
	add	r13d, eax
	sal	edx, 7
	add	edx, DWORD PTR -4[rsp]
	mov	DWORD PTR [r14], r13d
	mov	DWORD PTR 32[r14], edx
.L1:
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	pcd_pcm_sync, .-pcd_pcm_sync
	.comm	Pico_mcd,8,8
	.comm	PCM_STEP_SHIFT,4,4
	.comm	PCM_MIXBUF_LEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pcm.c_pcd_pcm_sync.c"
	.text
	.align	2
	.global	pcd_pcm_sync
	.syntax unified
	.arm
	.fpu softvfp
	.type	pcd_pcm_sync, %function
pcd_pcm_sync:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L29
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	fp, [r3]
	sub	sp, sp, #36
	ldr	r3, [fp, #16]
	sub	r0, r0, r3
	cmp	r0, #384
	str	r3, [sp, #28]
	blt	.L1
	ldr	r4, .L29+4
	ldr	r3, .L29+8
	umull	r2, r0, r4, r0
	ldr	r2, [fp]
	ldr	r3, [r3]
	add	r1, r2, r0, lsr #8
	cmp	r1, r3
	lsr	r4, r0, #8
	ldr	r1, [fp, #20]
	subgt	r4, r3, r2
	ldr	r3, [fp, #24]
	cmp	r1, #0
	lsr	r3, r3, #7
	eor	r3, r3, #1
	moveq	r3, #1
	andne	r3, r3, #1
	cmp	r3, #0
	str	r1, [sp, #4]
	beq	.L4
	ldr	r3, [fp, #32]
	cmp	r3, #0
	beq	.L5
	mov	r3, #0
	str	r3, [sp, #4]
.L4:
	mov	r3, #0
	mov	r1, #1
	ldr	r0, [fp, #28]
	ldr	ip, [fp, #4]
	lsl	r2, r2, #3
	str	r3, [fp, #32]
	mov	r7, r3
	add	r2, r2, #4
	add	r3, r0, #4
	str	r1, [fp, #8]
	str	fp, [sp, #16]
	ldr	r8, .L29+12
	mov	fp, r0
	str	ip, [sp, #20]
	str	r2, [sp, #24]
	str	r3, [sp, #8]
	b	.L12
.L28:
	ldr	r2, [r8]
	ldr	r3, [r10, #24]
	add	r2, r2, #8
	lsl	r3, r3, r2
	str	r3, [fp, r7, lsl #3]
	add	r7, r7, #1
	cmp	r7, #8
	beq	.L27
.L12:
	ldr	r3, [sp, #4]
	asr	r3, r3, r7
	tst	r3, #1
	ldr	r3, [sp, #8]
	ldr	r10, [r3, r7, lsl #3]
	beq	.L28
	ldm	r10, {r2, r3}
	and	r6, r3, #15
	asr	lr, r3, #4
	mul	r6, r2, r6
	mul	lr, r2, lr
	cmp	r4, #0
	ldr	r2, [fp, r7, lsl #3]
	ldrh	r9, [r10, #8]
	asr	r6, r6, #6
	asr	lr, lr, #6
	ble	.L8
	ldr	r3, [sp, #16]
	ldr	r1, [sp, #24]
	ldr	r5, [r3, #12]
	ldr	r3, [sp, #20]
	mov	ip, #0
	add	r1, r3, r1
	str	r7, [sp, #12]
	b	.L11
.L9:
	tst	r3, #128
	andne	r3, r3, #127
	ldr	r0, [r1, #-4]
	ldr	r7, [r1]
	rsbne	r3, r3, #0
	mla	r0, r6, r3, r0
	mla	r7, lr, r3, r7
	add	r2, r9, r2
	cmp	r4, ip
	str	r0, [r1, #-4]
	bic	r2, r2, #-134217728
	str	r7, [r1], #8
	beq	.L24
.L11:
	ldr	r0, [r8]
	add	ip, ip, #1
	lsr	r3, r2, r0
	ldr	r3, [r5, r3, lsl #2]
	cmp	r3, #255
	bne	.L9
	ldrh	r2, [r10, #16]
	ldr	r3, [r5, r2, lsl #2]
	lsl	r2, r2, r0
	cmp	r3, #255
	bne	.L9
.L24:
	ldr	r7, [sp, #12]
.L8:
	str	r2, [fp, r7, lsl #3]
	add	r7, r7, #1
	cmp	r7, #8
	bne	.L12
.L27:
	ldr	fp, [sp, #16]
	ldr	r2, [fp]
.L5:
	add	r3, r4, r4, lsl #1
	add	r4, r4, r2
	ldr	r2, [sp, #28]
	str	r4, [fp]
	add	r3, r2, r3, lsl #7
	str	r3, [fp, #16]
.L1:
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L30:
	.align	2
.L29:
	.word	Pico_mcd
	.word	-1431655765
	.word	PCM_MIXBUF_LEN
	.word	PCM_STEP_SHIFT
	.size	pcd_pcm_sync, .-pcd_pcm_sync
	.comm	Pico_mcd,4,4
	.comm	PCM_STEP_SHIFT,4,4
	.comm	PCM_MIXBUF_LEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
