	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p32x_pwm_ctl_changed           ## -- Begin function p32x_pwm_ctl_changed
	.p2align	4, 0x90
_p32x_pwm_ctl_changed:                  ## @p32x_pwm_ctl_changed
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_Pico32x@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movl	96(%rax), %esi
	movl	100(%rax), %edi
	decl	%edi
	andl	$4095, %edi                     ## imm = 0xFFF
	movq	_pwm_cycles@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	testb	$15, %sil
	je	LBB0_1
## %bb.2:
	movl	$65536, %eax                    ## imm = 0x10000
	xorl	%edx, %edx
	divl	%edi
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movq	_pwm_mult@GOTPCREL(%rip), %rdx
	movl	%eax, (%rdx)
	shrl	$8, %esi
	decl	%esi
	andl	$15, %esi
	incl	%esi
	movq	_pwm_irq_reload@GOTPCREL(%rip), %rax
	movl	%esi, (%rax)
	cmpl	$0, 8(%rcx)
	je	LBB0_4
## %bb.5:
	popq	%rbp
	retq
LBB0_4:
	movl	%esi, 8(%rcx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico32x,16,3                   ## @Pico32x
	.comm	_pwm_cycles,4,2                 ## @pwm_cycles
	.comm	_pwm_mult,4,2                   ## @pwm_mult
	.comm	_pwm_irq_reload,4,2             ## @pwm_irq_reload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p32x_pwm_ctl_changed           ; -- Begin function p32x_pwm_ctl_changed
	.p2align	2
_p32x_pwm_ctl_changed:                  ; @p32x_pwm_ctl_changed
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _Pico32x@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Pico32x@GOTPAGEOFF]
	ldr	x10, [x8]
	ldp	w9, w10, [x10, #96]
	sub	w10, w10, #1
	and	w10, w10, #0xfff
Lloh2:
	adrp	x11, _pwm_cycles@GOTPAGE
Lloh3:
	ldr	x11, [x11, _pwm_cycles@GOTPAGEOFF]
Lloh4:
	str	w10, [x11]
	tst	w9, #0xf
	b.eq	LBB0_2
; %bb.1:
	mov	w11, #65536
	udiv	w10, w11, w10
	b	LBB0_3
LBB0_2:
	mov	w10, #0
LBB0_3:
Lloh5:
	adrp	x11, _pwm_mult@GOTPAGE
Lloh6:
	ldr	x11, [x11, _pwm_mult@GOTPAGEOFF]
Lloh7:
	str	w10, [x11]
	lsr	w9, w9, #8
	sub	w9, w9, #1
	and	w9, w9, #0xf
	add	w9, w9, #1
Lloh8:
	adrp	x10, _pwm_irq_reload@GOTPAGE
Lloh9:
	ldr	x10, [x10, _pwm_irq_reload@GOTPAGEOFF]
Lloh10:
	str	w9, [x10]
	ldr	w10, [x8, #8]
	cbz	w10, LBB0_5
; %bb.4:
	ret
LBB0_5:
	str	w9, [x8, #8]
	ret
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico32x,16,3                   ; @Pico32x
	.comm	_pwm_cycles,4,2                 ; @pwm_cycles
	.comm	_pwm_mult,4,2                   ; @pwm_mult
	.comm	_pwm_irq_reload,4,2             ; @pwm_irq_reload
.subsections_via_symbols
