	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function consume_fifo_do
_consume_fifo_do:                       ## @consume_fifo_do
	.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
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_pwm_cycles@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.1:
	movq	_pwm_doing_fifo@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_15
## %bb.2:
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	_Pico32xMem@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	(%r15), %rax
	movq	(%rax), %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r13
	movq	_EL_PWM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	movq	_Pico32x@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r10
	movq	(%r10), %r9
	movq	_pwm_ptr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	movl	%eax, %r8d
	pushq	%r11
	pushq	8(%r10)
	callq	_elprintf
	movq	_pwm_doing_fifo@GOTPCREL(%rip), %rcx
	addq	$16, %rsp
	movl	$1, (%rcx)
	movq	_pwm_cycles@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jle	LBB0_4
## %bb.3:
	leal	(%r12,%r12,2), %eax
	subl	%r14d, %eax
	movl	%eax, 16(%rbx)
	movl	$0, (%rcx)
	jmp	LBB0_15
LBB0_4:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%rbx, %r9
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_pwm_cycles@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	%eax, %r14d
	cmpl	%eax, %r14d
	jl	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r9), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movzwl	2(%r8), %edi
	movw	%di, (%r8)
	movl	4(%r8), %edx
	movl	%edx, 2(%r8)
	decq	%rcx
	movq	%rcx, (%rax)
	callq	_convert_sample
	movq	_Pico32x@GOTPCREL(%rip), %r9
	movq	8(%r15), %rcx
	movq	%rax, (%rcx)
	movq	8(%r15), %rax
	addl	(%rax), %r12d
	movq	(%r9), %rax
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	jle	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movzwl	2(%r13), %edi
	movw	%di, (%r13)
	movl	4(%r13), %edx
	movl	%edx, 2(%r13)
	decq	%rcx
	movq	%rcx, 8(%rax)
	callq	_convert_sample
	movq	_Pico32x@GOTPCREL(%rip), %r9
	movq	8(%r15), %rcx
	movq	%rax, 8(%rcx)
	movq	8(%r15), %rax
	addl	8(%rax), %r12d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r15), %rax
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	_pwm_ptr@GOTPCREL(%rip), %rbx
	movq	(%rax), %rax
	movq	16(%r15), %rcx
	movslq	(%rbx), %rdx
	leaq	(%rdx,%rdx), %rsi
	leal	1(%rdx), %edi
	shlq	$4, %rdx
	movq	%rax, (%rcx,%rdx)
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movq	8(%rax), %rax
	orl	$1, %esi
	movslq	%esi, %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	_PWM_BUFF_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	andl	%edi, %eax
	movl	%eax, (%rbx)
	decq	8(%r9)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_pwm_irq_reload@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r9)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_do_pwm_irq
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	_Pico32x@GOTPCREL(%rip), %r9
	jmp	LBB0_12
LBB0_13:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%rax,2), %eax
	subl	%r14d, %eax
	movl	%eax, 16(%r9)
	movq	_pwm_doing_fifo@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	testl	%r12d, %r12d
	je	LBB0_15
## %bb.14:
	movq	_pwm_silent@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico32xMem,8,3                 ## @Pico32xMem
	.comm	_pwm_cycles,4,2                 ## @pwm_cycles
	.comm	_pwm_doing_fifo,4,2             ## @pwm_doing_fifo
	.comm	_EL_PWM,4,2                     ## @EL_PWM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pwm: %u: consume %d/%d, %d,%d ptr %d"

	.comm	_Pico32x,24,3                   ## @Pico32x
	.comm	_pwm_ptr,4,2                    ## @pwm_ptr
	.comm	_PWM_BUFF_LEN,4,2               ## @PWM_BUFF_LEN
	.comm	_pwm_irq_reload,8,3             ## @pwm_irq_reload
	.comm	_pwm_silent,8,3                 ## @pwm_silent
	.no_dead_strip	_consume_fifo_do
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function consume_fifo_do
_consume_fifo_do:                       ; @consume_fifo_do
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x23, _pwm_cycles@GOTPAGE
Lloh1:
	ldr	x23, [x23, _pwm_cycles@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x21, _pwm_doing_fifo@GOTPAGE
Lloh3:
	ldr	x21, [x21, _pwm_doing_fifo@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	w8, #0
	ccmp	w9, #0, #0, ne
	b.ne	LBB0_14
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh4:
	adrp	x9, _Pico32xMem@GOTPAGE
Lloh5:
	ldr	x9, [x9, _Pico32xMem@GOTPAGEOFF]
Lloh6:
	ldr	x24, [x9]
	ldr	x9, [x24]
	ldp	x26, x27, [x9]
Lloh7:
	adrp	x9, _EL_PWM@GOTPAGE
Lloh8:
	ldr	x9, [x9, _EL_PWM@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x9]
	sdiv	w4, w2, w8
Lloh10:
	adrp	x25, _Pico32x@GOTPAGE
Lloh11:
	ldr	x25, [x25, _Pico32x@GOTPAGEOFF]
	ldr	x8, [x25]
	ldp	x5, x6, [x8]
Lloh12:
	adrp	x28, _pwm_ptr@GOTPAGE
Lloh13:
	ldr	x28, [x28, _pwm_ptr@GOTPAGEOFF]
	ldr	w7, [x28]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_elprintf
	mov	w8, #1
	str	w8, [x21]
	ldr	w8, [x23]
	cmp	w8, w19
	b.le	LBB0_3
; %bb.2:
	add	w8, w20, w20, lsl #1
	sub	w8, w8, w19
	str	w8, [x25, #16]
	str	wzr, [x21]
	b	LBB0_14
LBB0_3:
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	mov	w22, #0
Lloh16:
	adrp	x21, _PWM_BUFF_LEN@GOTPAGE
Lloh17:
	ldr	x21, [x21, _PWM_BUFF_LEN@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x23]
	sub	w19, w19, w8
	cmp	w19, w8
	b.lt	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	x9, [x8]
	subs	x9, x9, #1
	b.lt	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrh	w0, [x26, #2]
	strh	w0, [x26]
	ldr	w10, [x26, #4]
	stur	w10, [x26, #2]
	str	x9, [x8]
	bl	_convert_sample
	ldr	x8, [x24, #8]
	str	x0, [x8]
	ldr	x8, [x24, #8]
	ldr	w8, [x8]
	add	w22, w8, w22
	ldr	x8, [x25]
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x8, #8]
	cmp	x9, #0
	b.le	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrh	w0, [x27, #2]
	strh	w0, [x27]
	ldr	w10, [x27, #4]
	stur	w10, [x27, #2]
	sub	x9, x9, #1
	str	x9, [x8, #8]
	bl	_convert_sample
	ldr	x8, [x24, #8]
	str	x0, [x8, #8]
	ldr	x8, [x24, #8]
	ldr	w9, [x8, #8]
	add	w22, w9, w22
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x24, #8]
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x8]
	ldr	x9, [x24, #16]
	ldrsw	x10, [x28]
	lsl	x11, x10, #4
	str	x8, [x9, x11]
	ldp	x8, x9, [x24, #8]
	ldr	x8, [x8, #8]
	mov	w11, #1
	bfi	w11, w10, #1, #31
	str	x8, [x9, w11, sxtw #3]
	add	w8, w10, #1
	ldr	w9, [x21]
	sub	w9, w9, #1
	and	w8, w9, w8
	str	w8, [x28]
	ldr	x8, [x25, #8]
	subs	x8, x8, #1
	str	x8, [x25, #8]
	b.ne	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh18:
	adrp	x8, _pwm_irq_reload@GOTPAGE
Lloh19:
	ldr	x8, [x8, _pwm_irq_reload@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	str	x8, [x25, #8]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x20
	bl	_do_pwm_irq
	b	LBB0_4
LBB0_12:
	add	w8, w20, w20, lsl #1
	sub	w8, w8, w19
	str	w8, [x25, #16]
Lloh21:
	adrp	x8, _pwm_doing_fifo@GOTPAGE
Lloh22:
	ldr	x8, [x8, _pwm_doing_fifo@GOTPAGEOFF]
Lloh23:
	str	wzr, [x8]
	cbz	w22, LBB0_14
; %bb.13:
Lloh24:
	adrp	x8, _pwm_silent@GOTPAGE
Lloh25:
	ldr	x8, [x8, _pwm_silent@GOTPAGEOFF]
Lloh26:
	str	xzr, [x8]
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico32xMem,8,3                 ; @Pico32xMem
	.comm	_pwm_cycles,4,2                 ; @pwm_cycles
	.comm	_pwm_doing_fifo,4,2             ; @pwm_doing_fifo
	.comm	_EL_PWM,4,2                     ; @EL_PWM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pwm: %u: consume %d/%d, %d,%d ptr %d"

	.comm	_Pico32x,24,3                   ; @Pico32x
	.comm	_pwm_ptr,4,2                    ; @pwm_ptr
	.comm	_PWM_BUFF_LEN,4,2               ; @PWM_BUFF_LEN
	.comm	_pwm_irq_reload,8,3             ; @pwm_irq_reload
	.comm	_pwm_silent,8,3                 ; @pwm_silent
	.no_dead_strip	_consume_fifo_do
.subsections_via_symbols
