	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p32x_pwm_write16               ## -- Begin function p32x_pwm_write16
	.p2align	4, 0x90
_p32x_pwm_write16:                      ## @p32x_pwm_write16
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %r12
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_EL_PWM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	$14, %ebx
	movq	_Pico32x@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movl	(%rax), %r9d
	movl	4(%rax), %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	movl	%ebx, %ecx
	movl	%r14d, %r8d
	callq	_elprintf
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_consume_fifo
	cmpl	$2, %ebx
	je	LBB0_5
## %bb.1:
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.2:
	movq	8(%r13), %rax
	testb	$15, 96(%rax)
	jne	LBB0_4
## %bb.3:
	movq	_Pico32xMem@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	8(%rcx), %rdx
	movw	$0, (%rdx)
	movq	(%rcx), %rcx
	movw	$0, (%rcx)
LBB0_4:
	movl	%r14d, 96(%rax)
	xorl	%eax, %eax
	callq	_p32x_pwm_ctl_changed
	movq	_pwm_irq_reload@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	jmp	LBB0_20
LBB0_5:
	andl	$4095, %r14d                    ## imm = 0xFFF
	movq	8(%r13), %rax
	movl	%r14d, 100(%rax)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_pwm_ctl_changed           ## TAILCALL
LBB0_6:
	cmpl	$8, %ebx
	ja	LBB0_20
## %bb.7:
	decl	%r14d
	andl	$4095, %r14d                    ## imm = 0xFFF
	cmpl	$4, %ebx
	je	LBB0_11
## %bb.8:
	cmpl	$8, %ebx
	je	LBB0_11
## %bb.9:
	cmpl	$6, %ebx
	jne	LBB0_20
## %bb.10:
	movq	_Pico32xMem@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	movq	(%r13), %rax
	jmp	LBB0_16
LBB0_11:
	movq	_Pico32xMem@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %rdx
	movq	(%r13), %rax
	movl	(%rax), %esi
	cmpl	$2, %esi
	jg	LBB0_13
## %bb.12:
	incl	%esi
	movl	%esi, (%rax)
	jmp	LBB0_14
LBB0_13:
	movl	4(%rdx), %edi
	movl	%edi, 2(%rdx)
LBB0_14:
	movslq	%esi, %rsi
	movw	%r14w, (%rdx,%rsi,2)
	cmpl	$8, %ebx
	je	LBB0_16
## %bb.15:
	cmpl	$6, %ebx
	jne	LBB0_20
LBB0_16:
	movq	8(%rcx), %rcx
	movl	4(%rax), %edx
	cmpl	$2, %edx
	jg	LBB0_18
## %bb.17:
	incl	%edx
	movl	%edx, 4(%rax)
	jmp	LBB0_19
LBB0_18:
	movl	4(%rcx), %eax
	movl	%eax, 2(%rcx)
LBB0_19:
	movslq	%edx, %rax
	movw	%r14w, (%rcx,%rax,2)
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EL_PWM,4,2                     ## @EL_PWM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pwm: %u: w16 %02x %04x (p %d %d)"

	.comm	_Pico32x,24,3                   ## @Pico32x
	.comm	_Pico32xMem,8,3                 ## @Pico32xMem
	.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_write16               ; -- Begin function p32x_pwm_write16
	.p2align	2
_p32x_pwm_write16:                      ; @p32x_pwm_write16
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
Lloh0:
	adrp	x8, _EL_PWM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EL_PWM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w19, w0, #0xe
Lloh3:
	adrp	x23, _Pico32x@GOTPAGE
Lloh4:
	ldr	x23, [x23, _Pico32x@GOTPAGEOFF]
	ldr	x9, [x23]
	ldp	w5, w6, [x9]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	mov	x2, x3
	mov	x3, x19
	mov	x4, x20
	bl	_elprintf
	mov	x0, x22
	mov	x1, x21
	bl	_consume_fifo
	cmp	w19, #2
	b.eq	LBB0_5
; %bb.1:
	cbnz	w19, LBB0_6
; %bb.2:
	ldr	x8, [x23, #8]
	ldrb	w9, [x8, #96]
	tst	w9, #0xf
	b.ne	LBB0_4
; %bb.3:
Lloh7:
	adrp	x9, _Pico32xMem@GOTPAGE
Lloh8:
	ldr	x9, [x9, _Pico32xMem@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldp	x9, x10, [x9]
	strh	wzr, [x10]
	strh	wzr, [x9]
LBB0_4:
	str	w20, [x8, #96]
	bl	_p32x_pwm_ctl_changed
Lloh10:
	adrp	x8, _pwm_irq_reload@GOTPAGE
Lloh11:
	ldr	x8, [x8, _pwm_irq_reload@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x23, #16]
	b	LBB0_20
LBB0_5:
	and	w8, w20, #0xfff
	ldr	x9, [x23, #8]
	str	w8, [x9, #100]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_p32x_pwm_ctl_changed
LBB0_6:
	cmp	w19, #8
	b.hi	LBB0_20
; %bb.7:
	sub	w8, w20, #1
	and	w8, w8, #0xfff
	cmp	w19, #4
	b.eq	LBB0_11
; %bb.8:
	cmp	w19, #8
	b.eq	LBB0_11
; %bb.9:
	cmp	w19, #6
	b.ne	LBB0_20
; %bb.10:
Lloh13:
	adrp	x9, _Pico32xMem@GOTPAGE
Lloh14:
	ldr	x9, [x9, _Pico32xMem@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	ldr	x10, [x9]
	ldr	x9, [x23]
	b	LBB0_16
LBB0_11:
Lloh16:
	adrp	x9, _Pico32xMem@GOTPAGE
Lloh17:
	ldr	x9, [x9, _Pico32xMem@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	ldr	x10, [x9]
	ldr	x11, [x10]
	ldr	x9, [x23]
	ldr	w12, [x9]
	cmp	w12, #2
	b.gt	LBB0_13
; %bb.12:
	add	w12, w12, #1
	str	w12, [x9]
	b	LBB0_14
LBB0_13:
	ldr	w13, [x11, #4]
	stur	w13, [x11, #2]
LBB0_14:
	strh	w8, [x11, w12, sxtw #1]
	cmp	w19, #8
	b.eq	LBB0_16
; %bb.15:
	cmp	w19, #6
	b.ne	LBB0_20
LBB0_16:
	ldr	x10, [x10, #8]
	ldr	w11, [x9, #4]
	cmp	w11, #2
	b.gt	LBB0_18
; %bb.17:
	add	w11, w11, #1
	str	w11, [x9, #4]
	b	LBB0_19
LBB0_18:
	ldr	w9, [x10, #4]
	stur	w9, [x10, #2]
LBB0_19:
	strh	w8, [x10, w11, sxtw #1]
LBB0_20:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EL_PWM,4,2                     ; @EL_PWM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pwm: %u: w16 %02x %04x (p %d %d)"

	.comm	_Pico32x,24,3                   ; @Pico32x
	.comm	_Pico32xMem,8,3                 ; @Pico32xMem
	.comm	_pwm_irq_reload,4,2             ; @pwm_irq_reload
.subsections_via_symbols
