	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lp5562_run_predef_led_pattern
_lp5562_run_predef_led_pattern:         ## @lp5562_run_predef_led_pattern
	.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
	movq	%rdi, %rbx
	movq	_LP5562_PATTERN_OFF@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	jmp	LBB0_8
LBB0_2:
	movq	16(%rbx), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	decl	%esi
	movslq	%esi, %rax
	leaq	(%rax,%rax,2), %r13
	leaq	(%r12,%r13,8), %r14
	movq	%r14, %rdi
	callq	__is_pc_overflow
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_lp5562_stop_engine
	movq	_LP5562_REG_ENG_SEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_LP5562_ENG_SEL_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_lp55xx_write
	movq	_LP55XX_ENGINE_1@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_LP55XX_ENGINE_3@GOTPCREL(%rip), %r15
	cmpl	(%r15), %r14d
	jg	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, (%rbx)
	movq	%rbx, %rdi
	callq	_lp5562_load_engine
	leal	1(%r14), %eax
	cmpl	(%r15), %r14d
	movl	%eax, %r14d
	jl	LBB0_6
LBB0_7:
	movq	_LP5562_REG_PROG_MEM_ENG1@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_lp55xx_write
	movq	(%r14), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_lp55xx_write
	movq	_LP5562_REG_PROG_MEM_ENG2@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_lp55xx_write
	movq	(%r14), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_lp55xx_write
	movq	_LP5562_REG_PROG_MEM_ENG3@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_lp55xx_write
	movq	(%r14), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_lp55xx_write
	movq	_LP5562_REG_PROG_MEM_ENG1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	16(%r12,%r13,8), %ecx
	movl	20(%r12,%r13,8), %edx
	movq	%rbx, %rdi
	callq	_lp5562_write_program_memory
	movq	_LP5562_REG_PROG_MEM_ENG2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	8(%r12,%r13,8), %ecx
	movl	12(%r12,%r13,8), %edx
	movq	%rbx, %rdi
	callq	_lp5562_write_program_memory
	movq	(%r14), %rsi
	movl	4(%r12,%r13,8), %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_lp5562_write_program_memory
	movq	%rbx, %rdi
	movl	$1, %esi
LBB0_8:
	callq	_lp5562_run_engine
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LP5562_PATTERN_OFF,4,2         ## @LP5562_PATTERN_OFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid pattern data\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LP5562_REG_ENG_SEL,8,3         ## @LP5562_REG_ENG_SEL
	.comm	_LP5562_ENG_SEL_RGB,4,2         ## @LP5562_ENG_SEL_RGB
	.comm	_LP55XX_ENGINE_1,4,2            ## @LP55XX_ENGINE_1
	.comm	_LP55XX_ENGINE_3,4,2            ## @LP55XX_ENGINE_3
	.comm	_LP5562_REG_PROG_MEM_ENG1,8,3   ## @LP5562_REG_PROG_MEM_ENG1
	.comm	_LP5562_REG_PROG_MEM_ENG2,8,3   ## @LP5562_REG_PROG_MEM_ENG2
	.comm	_LP5562_REG_PROG_MEM_ENG3,8,3   ## @LP5562_REG_PROG_MEM_ENG3
	.no_dead_strip	_lp5562_run_predef_led_pattern
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lp5562_run_predef_led_pattern
_lp5562_run_predef_led_pattern:         ; @lp5562_run_predef_led_pattern
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
Lloh0:
	adrp	x8, _LP5562_PATTERN_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LP5562_PATTERN_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	b	LBB0_8
LBB0_2:
	ldr	x8, [x19, #16]
	ldr	x21, [x8]
	cbz	x21, LBB0_4
; %bb.3:
	sxtw	x8, w1
	sub	x22, x8, #1
	mov	w8, #24
	madd	x20, x22, x8, x21
	mov	x0, x20
	bl	__is_pc_overflow
	cbz	x0, LBB0_5
LBB0_4:
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_lp5562_stop_engine
Lloh8:
	adrp	x8, _LP5562_REG_ENG_SEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LP5562_REG_ENG_SEL@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x8]
Lloh11:
	adrp	x8, _LP5562_ENG_SEL_RGB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LP5562_ENG_SEL_RGB@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_lp55xx_write
Lloh14:
	adrp	x8, _LP55XX_ENGINE_1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LP55XX_ENGINE_1@GOTPAGEOFF]
Lloh16:
	ldr	w24, [x8]
Lloh17:
	adrp	x23, _LP55XX_ENGINE_3@GOTPAGE
Lloh18:
	ldr	x23, [x23, _LP55XX_ENGINE_3@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w24, w8
	b.gt	LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	str	w24, [x19]
	mov	x0, x19
	bl	_lp5562_load_engine
	add	w8, w24, #1
	ldr	w9, [x23]
	cmp	w24, w9
	mov	x24, x8
	b.lt	LBB0_6
LBB0_7:
Lloh19:
	adrp	x23, _LP5562_REG_PROG_MEM_ENG1@GOTPAGE
Lloh20:
	ldr	x23, [x23, _LP5562_REG_PROG_MEM_ENG1@GOTPAGEOFF]
	ldr	x1, [x23]
	mov	x0, x19
	mov	w2, #0
	bl	_lp55xx_write
	ldr	x8, [x23]
	add	x1, x8, #1
	mov	x0, x19
	mov	w2, #0
	bl	_lp55xx_write
Lloh21:
	adrp	x24, _LP5562_REG_PROG_MEM_ENG2@GOTPAGE
Lloh22:
	ldr	x24, [x24, _LP5562_REG_PROG_MEM_ENG2@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	x0, x19
	mov	w2, #0
	bl	_lp55xx_write
	ldr	x8, [x24]
	add	x1, x8, #1
	mov	x0, x19
	mov	w2, #0
	bl	_lp55xx_write
Lloh23:
	adrp	x25, _LP5562_REG_PROG_MEM_ENG3@GOTPAGE
Lloh24:
	ldr	x25, [x25, _LP5562_REG_PROG_MEM_ENG3@GOTPAGEOFF]
	ldr	x1, [x25]
	mov	x0, x19
	mov	w2, #0
	bl	_lp55xx_write
	ldr	x8, [x25]
	add	x1, x8, #1
	mov	x0, x19
	mov	w2, #0
	bl	_lp55xx_write
	ldr	x1, [x23]
	mov	w8, #24
	madd	x21, x22, x8, x21
	ldp	w3, w2, [x21, #16]
	mov	x0, x19
	bl	_lp5562_write_program_memory
	ldr	x1, [x24]
	ldp	w3, w2, [x21, #8]
	mov	x0, x19
	bl	_lp5562_write_program_memory
	ldr	x1, [x25]
	ldr	w2, [x21, #4]
	ldr	w3, [x20]
	mov	x0, x19
	bl	_lp5562_write_program_memory
	mov	x0, x19
	mov	w1, #1
LBB0_8:
	bl	_lp5562_run_engine
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_LP5562_PATTERN_OFF,4,2         ; @LP5562_PATTERN_OFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid pattern data\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LP5562_REG_ENG_SEL,8,3         ; @LP5562_REG_ENG_SEL
	.comm	_LP5562_ENG_SEL_RGB,4,2         ; @LP5562_ENG_SEL_RGB
	.comm	_LP55XX_ENGINE_1,4,2            ; @LP55XX_ENGINE_1
	.comm	_LP55XX_ENGINE_3,4,2            ; @LP55XX_ENGINE_3
	.comm	_LP5562_REG_PROG_MEM_ENG1,8,3   ; @LP5562_REG_PROG_MEM_ENG1
	.comm	_LP5562_REG_PROG_MEM_ENG2,8,3   ; @LP5562_REG_PROG_MEM_ENG2
	.comm	_LP5562_REG_PROG_MEM_ENG3,8,3   ; @LP5562_REG_PROG_MEM_ENG3
	.no_dead_strip	_lp5562_run_predef_led_pattern
.subsections_via_symbols
