	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p32x_pwm_schedule_
_p32x_pwm_schedule_:                    ## @p32x_pwm_schedule_
	.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
                                        ## kill: def $esi killed $esi def $rsi
	movq	_pwm_cycles@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	leal	(%rsi,%rsi,2), %r12d
	movq	_Pico32x@GOTPCREL(%rip), %r15
	movl	%r12d, %edx
	subl	(%r15), %edx
	cmpl	%eax, %edx
	jl	LBB0_3
## %bb.2:
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_consume_fifo_do
LBB0_3:
	movq	8(%r15), %rax
	movl	4(%rax), %ecx
	orl	(%rax), %ecx
	testb	$1, %cl
	je	LBB0_5
## %bb.4:
	movl	(%r15), %eax
	subl	%r12d, %eax
	movl	(%r14), %ecx
	imull	16(%r15), %ecx
	addl	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1431655766, %rax, %rax         ## imm = 0x55555556
	movq	%rax, %rcx
	shrq	$32, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %ebx
	incl	%ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pwm_cycles,4,2                 ## @pwm_cycles
	.comm	_Pico32x,24,3                   ## @Pico32x
	.no_dead_strip	_p32x_pwm_schedule_
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p32x_pwm_schedule_
_p32x_pwm_schedule_:                    ; @p32x_pwm_schedule_
	.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
Lloh0:
	adrp	x19, _pwm_cycles@GOTPAGE
Lloh1:
	ldr	x19, [x19, _pwm_cycles@GOTPAGEOFF]
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.1:
	add	w20, w1, w1, lsl #1
Lloh2:
	adrp	x21, _Pico32x@GOTPAGE
Lloh3:
	ldr	x21, [x21, _Pico32x@GOTPAGEOFF]
	ldr	w9, [x21]
	sub	w2, w20, w9
	cmp	w2, w8
	b.lt	LBB0_3
; %bb.2:
	bl	_consume_fifo_do
LBB0_3:
	ldr	x8, [x21, #8]
	ldp	w9, w8, [x8]
	orr	w8, w8, w9
	tbnz	w8, #0, LBB0_5
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w8, [x21]
	sub	w8, w8, w20
	ldr	w9, [x21, #16]
	ldr	w10, [x19]
	madd	w8, w10, w9, w8
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w9
	add	w0, w8, #1
LBB0_6:
	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 AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_pwm_cycles,4,2                 ; @pwm_cycles
	.comm	_Pico32x,24,3                   ; @Pico32x
	.no_dead_strip	_p32x_pwm_schedule_
.subsections_via_symbols
