	.file	"extr_ws2812_effects.c_ws2812_effects_mode_rainbow.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ws2812_effects_mode_rainbow, @function
ws2812_effects_mode_rainbow:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR state[rip]
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, QWORD PTR 8[rax]
	mov	edi, DWORD PTR [rax]
	call	color_wheel@PLT
	mov	edx, DWORD PTR 8[rbx]
	movzx	edi, ah
	mov	r8d, eax
	mov	r9d, edi
	sar	r8d, 16
	movzx	edi, al
	mov	rax, QWORD PTR [rbx]
	test	edx, edx
	jle	.L2
	mov	rcx, QWORD PTR state[rip]
	movzx	r8d, r8b
	xor	esi, esi
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r10d, DWORD PTR 4[rcx]
	lea	r11, 12[rax]
	imul	r10d, r9d
	movsx	rdx, r10d
	imul	rdx, rdx, -2139062143
	shr	rdx, 32
	add	edx, r10d
	sar	r10d, 31
	sar	edx, 7
	sub	edx, r10d
	mov	DWORD PTR [rax], edx
	mov	r10d, DWORD PTR 4[rcx]
	imul	r10d, r8d
	movsx	rdx, r10d
	imul	rdx, rdx, -2139062143
	shr	rdx, 32
	add	edx, r10d
	sar	r10d, 31
	sar	edx, 7
	sub	edx, r10d
	mov	DWORD PTR 4[rax], edx
	mov	r10d, DWORD PTR 4[rcx]
	imul	r10d, edi
	movsx	rdx, r10d
	imul	rdx, rdx, -2139062143
	shr	rdx, 32
	add	edx, r10d
	sar	r10d, 31
	sar	edx, 7
	sub	edx, r10d
	mov	DWORD PTR 8[rax], edx
	cmp	DWORD PTR 12[rbx], 3
	mov	rax, r11
	jle	.L3
	mov	edx, 3
	.p2align 4,,10
	.p2align 3
.L4:
	add	rax, 4
	add	edx, 1
	mov	DWORD PTR -4[rax], 0
	cmp	DWORD PTR 12[rbx], edx
	jg	.L4
.L3:
	add	esi, 1
	cmp	DWORD PTR 8[rbx], esi
	jg	.L5
.L6:
	mov	eax, DWORD PTR [rcx]
	lea	edx, 1[rax]
	movsx	rax, edx
	mov	esi, edx
	imul	rax, rax, -1240768329
	sar	esi, 31
	shr	rax, 32
	add	eax, edx
	sar	eax, 8
	sub	eax, esi
	imul	eax, eax, 360
	sub	edx, eax
	xor	eax, eax
	mov	DWORD PTR [rcx], edx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	mov	rcx, QWORD PTR state[rip]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	ws2812_effects_mode_rainbow, .-ws2812_effects_mode_rainbow
	.comm	state,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ws2812_effects.c_ws2812_effects_mode_rainbow.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ws2812_effects_mode_rainbow, %function
ws2812_effects_mode_rainbow:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r5, .L12
	ldr	r3, [r5]
	ldr	r4, [r3, #8]
	ldr	r0, [r3]
	bl	color_wheel
	ldr	r3, [r4, #4]
	ldr	r2, [r4]
	cmp	r3, #0
	ble	.L2
	mov	lr, #0
	asr	r7, r0, #16
	asr	r8, r0, #8
	and	r6, r0, #255
	mov	r0, lr
	ldr	ip, [r5]
	ldr	r5, .L12+4
	and	r7, r7, #255
	and	r8, r8, #255
.L5:
	ldr	r3, [ip, #4]
	add	r1, r2, #12
	mul	r3, r8, r3
	smull	r9, r10, r5, r3
	asr	r9, r3, #31
	add	r3, r10, r3
	rsb	r3, r9, r3, asr #7
	str	r3, [r2]
	ldr	r3, [ip, #4]
	mul	r3, r7, r3
	smull	r9, r10, r5, r3
	asr	r9, r3, #31
	add	r3, r10, r3
	rsb	r3, r9, r3, asr #7
	str	r3, [r2, #4]
	ldr	r3, [ip, #4]
	mul	r3, r6, r3
	smull	r9, r10, r5, r3
	asr	r9, r3, #31
	add	r3, r10, r3
	rsb	r3, r9, r3, asr #7
	str	r3, [r2, #8]
	ldr	r3, [r4, #8]
	mov	r2, r1
	cmp	r3, #3
	ble	.L3
	mov	r3, #3
.L4:
	str	r0, [r2], #4
	ldr	r1, [r4, #8]
	add	r3, r3, #1
	cmp	r1, r3
	bgt	.L4
.L3:
	ldr	r3, [r4, #4]
	add	lr, lr, #1
	cmp	r3, lr
	bgt	.L5
.L6:
	ldr	r2, [ip]
	ldr	r1, .L12+8
	add	r2, r2, #1
	smull	r3, r1, r2, r1
	asr	r3, r2, #31
	add	r1, r1, r2
	rsb	r3, r3, r1, asr #8
	add	r3, r3, r3, lsl #1
	rsb	r3, r3, r3, lsl #4
	sub	r3, r2, r3, lsl #3
	mov	r0, #0
	str	r3, [ip]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	ip, [r5]
	b	.L6
.L13:
	.align	2
.L12:
	.word	state
	.word	-2139062143
	.word	-1240768329
	.size	ws2812_effects_mode_rainbow, .-ws2812_effects_mode_rainbow
	.comm	state,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
