	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoPicoPCMUpdate              ## -- Begin function PicoPicoPCMUpdate
	.p2align	4, 0x90
_PicoPicoPCMUpdate:                     ## @PicoPicoPCMUpdate
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	_PicoPicohw@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	8(%rax), %rbx
	cmpq	%rbx, %rsi
	je	LBB0_28
## %bb.1:
	setb	%al
	testl	%r13d, %r13d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	jle	LBB0_25
## %bb.2:
	cmpq	%rbx, %rsi
	jae	LBB0_25
## %bb.3:
	xorl	%r15d, %r15d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_do_sample
	movq	_stepsamples@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	cmpl	$1025, %r15d                    ## imm = 0x401
	jl	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_sample@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzwl	(%r14), %ecx
	addw	%ax, %cx
	movw	%cx, (%r14)
	testl	%edx, %edx
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movw	%cx, 2(%r14)
	addq	$4, %r14
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=2
	addq	$2, %r14
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	leal	-1024(%r15), %r12d
	leal	-1(%r13), %ebx
	cmpl	$2049, %r15d                    ## imm = 0x801
	jl	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	%r12d, %r15d
	cmpl	$1, %r13d
	movl	%ebx, %r13d
	jne	LBB0_7
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r13d, %ebx
	movl	%r15d, %r12d
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	callq	_do_sample
	movq	_stepsamples@GOTPCREL(%rip), %rax
	addl	(%rax), %r12d
	movq	_sample@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$1025, %r12d                    ## imm = 0x401
	jl	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	testl	%ebx, %ebx
	je	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzwl	(%r14), %ecx
	addw	%ax, %cx
	movw	%cx, (%r14)
	testl	%edx, %edx
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=2
	movw	%cx, 2(%r14)
	addq	$4, %r14
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_16 Depth=2
	addq	$2, %r14
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=2
	leal	-1024(%r12), %r15d
	leal	-1(%rbx), %r13d
	cmpl	$2049, %r12d                    ## imm = 0x801
	jl	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=2
	movl	%r15d, %r12d
	cmpl	$1, %ebx
	movl	%r13d, %ebx
	jne	LBB0_16
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %r13d
	movl	%r12d, %r15d
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %ecx
	sarl	$31, %ecx
	orl	$1, %ecx
	movq	_sgn@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edx
	leal	(%rcx,%rdx), %esi
	movl	%esi, (%rdi)
	addl	%edx, %ecx
	addl	$-17, %ecx
	cmpl	$-34, %ecx
	ja	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %ecx
	sarl	$5, %ecx
	subl	%ecx, %eax
	movq	_sample@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_23:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	incq	%rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%rbx, %rsi
	setb	%al
	testl	%r13d, %r13d
	jle	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rbx, %rsi
	jb	LBB0_4
LBB0_25:
	testb	%al, %al
	je	LBB0_27
## %bb.26:
	subq	%rsi, %rbx
	movq	_PicoPicohw@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movl	%ebx, %edx
	callq	_memmove
	movslq	%ebx, %r14
	movq	(%r15), %rax
	addq	%r14, %rax
	movq	%rax, 8(%r15)
	movq	_EL_PICOHW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_elprintf
	movl	%r14d, 16(%r15)
	jmp	LBB0_38
LBB0_27:
	movq	_EL_PICOHW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	callq	_elprintf
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	_PicoPicohw@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	%rax, 8(%rcx)
LBB0_28:
	testl	%edx, %edx
	je	LBB0_37
## %bb.29:
	testl	%r13d, %r13d
	jle	LBB0_37
## %bb.30:
	leal	-1(%r13), %eax
	testb	$7, %r13b
	je	LBB0_34
## %bb.31:
	movl	%r13d, %edx
	andl	$7, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	movzwl	(%r14), %esi
	movw	%si, 2(%r14)
	addq	$4, %r14
	incq	%rcx
	cmpl	%ecx, %edx
	jne	LBB0_32
## %bb.33:
	subl	%ecx, %r13d
LBB0_34:
	cmpl	$7, %eax
	jb	LBB0_37
## %bb.35:
	decl	%r13d
	.p2align	4, 0x90
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movzwl	(%r14), %eax
	movzwl	4(%r14), %ecx
	movw	%ax, 2(%r14)
	movw	%cx, 6(%r14)
	movzwl	8(%r14), %eax
	movw	%ax, 10(%r14)
	movzwl	12(%r14), %eax
	movw	%ax, 14(%r14)
	movzwl	16(%r14), %eax
	movw	%ax, 18(%r14)
	movzwl	20(%r14), %eax
	movw	%ax, 22(%r14)
	movzwl	24(%r14), %eax
	movw	%ax, 26(%r14)
	movzwl	28(%r14), %eax
	movw	%ax, 30(%r14)
	addl	$-8, %r13d
	addq	$32, %r14
	cmpl	$-2, %r13d
	jb	LBB0_36
LBB0_37:
	movq	_sgn@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_sample@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_quant@GOTPCREL(%rip), %rax
	movl	$127, (%rax)
LBB0_38:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PicoPicohw,24,3                ## @PicoPicohw
	.comm	_stepsamples,8,3                ## @stepsamples
	.comm	_sample,4,2                     ## @sample
	.comm	_sgn,4,2                        ## @sgn
	.comm	_EL_PICOHW,4,2                  ## @EL_PICOHW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"xpcm update: over %i"

L_.str.1:                               ## @.str.1
	.asciz	"xpcm update: under %i"

	.comm	_quant,4,2                      ## @quant
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoPicoPCMUpdate              ; -- Begin function PicoPicoPCMUpdate
	.p2align	2
_PicoPicoPCMUpdate:                     ; @PicoPicoPCMUpdate
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PicoPicohw@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PicoPicohw@GOTPAGEOFF]
	ldp	x22, x26, [x8]
Lloh2:
	adrp	x23, _sgn@GOTPAGE
Lloh3:
	ldr	x23, [x23, _sgn@GOTPAGEOFF]
Lloh4:
	adrp	x24, _sample@GOTPAGE
Lloh5:
	ldr	x24, [x24, _sample@GOTPAGEOFF]
	cmp	x22, x26
	b.eq	LBB0_26
; %bb.1:
	cset	w8, lo
	cmp	w20, #1
	b.lt	LBB0_23
; %bb.2:
	cmp	x22, x26
	b.hs	LBB0_23
; %bb.3:
	mov	w25, #0
Lloh6:
	adrp	x27, _stepsamples@GOTPAGE
Lloh7:
	ldr	x27, [x27, _stepsamples@GOTPAGEOFF]
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_14 Depth 2
	bl	_do_sample
	ldr	w8, [x27]
	add	w8, w25, w8
	cmp	w8, #1025
	b.lt	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x24]
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrh	w10, [x19]
	add	w10, w10, w9
	mov	x11, x19
	strh	w10, [x11], #2
	cbz	w21, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	strh	w10, [x19, #2]
	add	x19, x19, #4
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x19, x11
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	sub	w25, w8, #1024
	sub	w28, w20, #1
	cmp	w8, #2049
	b.lt	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x8, x25
	cmp	w20, #1
	mov	x20, x28
	b.ne	LBB0_6
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, x20
	mov	x25, x8
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_do_sample
	ldr	w8, [x27]
	add	w9, w25, w8
	ldr	w8, [x24]
	cmp	w9, #1025
	ccmp	w28, #0, #4, ge
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x28
	mov	x25, x9
	b	LBB0_19
LBB0_14:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrh	w10, [x19]
	add	w10, w10, w8
	mov	x11, x19
	strh	w10, [x11], #2
	cbz	w21, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	strh	w10, [x19, #2]
	add	x19, x19, #4
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_14 Depth=2
	mov	x19, x11
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=2
	sub	w25, w9, #1024
	sub	w20, w28, #1
	cmp	w9, #2049
	b.lt	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=2
	mov	x9, x25
	cmp	w28, #1
	mov	x28, x20
	b.ne	LBB0_14
LBB0_19:                                ;   in Loop: Header=BB0_4 Depth=1
	asr	w9, w8, #31
	orr	w9, w9, #0x1
	ldr	w10, [x23]
	add	w9, w9, w10
	str	w9, [x23]
	sub	w9, w9, #17
	cmn	w9, #34
	b.hi	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	w8, w8, w8, asr #5
	str	w8, [x24]
LBB0_21:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	cmp	x22, x26
	cset	w8, lo
	cmp	w20, #1
	b.lt	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	x22, x26
	b.lo	LBB0_4
LBB0_23:
	cbz	w8, LBB0_25
; %bb.24:
	sub	x19, x26, x22
Lloh8:
	adrp	x20, _PicoPicohw@GOTPAGE
Lloh9:
	ldr	x20, [x20, _PicoPicohw@GOTPAGEOFF]
	ldr	x0, [x20]
	mov	x1, x22
	mov	x2, x19
	bl	_memmove
	ldr	x8, [x20]
	add	x8, x8, w19, sxtw
	str	x8, [x20, #8]
Lloh10:
	adrp	x8, _EL_PICOHW@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EL_PICOHW@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_elprintf
	str	w19, [x20, #16]
	b	LBB0_36
LBB0_25:
Lloh15:
	adrp	x8, _EL_PICOHW@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EL_PICOHW@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_elprintf
Lloh20:
	adrp	x9, _PicoPicohw@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PicoPicohw@GOTPAGEOFF]
	ldr	x8, [x9]
	str	x8, [x9, #8]
LBB0_26:
	cbz	w21, LBB0_35
; %bb.27:
	subs	w8, w20, #1
	b.lt	LBB0_35
; %bb.28:
	cmp	w8, #3
	b.hs	LBB0_30
; %bb.29:
	mov	x8, x19
	b	LBB0_33
LBB0_30:
	add	x9, x8, #1
	and	x10, x9, #0x1fffffffc
	sub	w20, w20, w10
	add	x8, x19, x10, lsl #2
	add	x11, x19, #8
	mov	x12, x10
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	ldurh	w13, [x11, #-8]
	ldurh	w14, [x11, #-4]
	ldrh	w15, [x11]
	ldrh	w16, [x11, #4]
	sturh	w13, [x11, #-6]
	sturh	w14, [x11, #-2]
	strh	w15, [x11, #2]
	strh	w16, [x11, #6]
	add	x11, x11, #16
	subs	x12, x12, #4
	b.ne	LBB0_31
; %bb.32:
	cmp	x9, x10
	b.eq	LBB0_35
LBB0_33:
	add	w9, w20, #1
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	ldrh	w10, [x8]
	strh	w10, [x8, #2]
	sub	w9, w9, #1
	add	x8, x8, #4
	cmp	w9, #1
	b.hi	LBB0_34
LBB0_35:
	str	wzr, [x23]
	str	wzr, [x24]
Lloh22:
	adrp	x8, _quant@GOTPAGE
Lloh23:
	ldr	x8, [x8, _quant@GOTPAGEOFF]
	mov	w9, #127
Lloh24:
	str	w9, [x8]
LBB0_36:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_PicoPicohw,24,3                ; @PicoPicohw
	.comm	_stepsamples,8,3                ; @stepsamples
	.comm	_sample,4,2                     ; @sample
	.comm	_sgn,4,2                        ; @sgn
	.comm	_EL_PICOHW,4,2                  ; @EL_PICOHW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"xpcm update: over %i"

l_.str.1:                               ; @.str.1
	.asciz	"xpcm update: under %i"

	.comm	_quant,4,2                      ; @quant
.subsections_via_symbols
