	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lp5523_run_engine
_lp5523_run_engine:                     ## @lp5523_run_engine
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	testl	%esi, %esi
	je	LBB0_11
## %bb.1:
	movq	_LP5523_REG_OP_MODE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_lp55xx_read
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:
	movq	_LP5523_REG_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_lp55xx_read
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movl	-32(%rbp), %edi
	callq	_LP5523_ENG1_IS_LOADING
	movl	-32(%rbp), %edi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_LP5523_MODE_ENG1_M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edi
	movq	_LP5523_RUN_ENG1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, %edi
	movl	%edi, -32(%rbp)
	movq	_LP5523_EXEC_ENG1_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	-28(%rbp), %ecx
	orl	%eax, %ecx
	movl	%ecx, -28(%rbp)
LBB0_5:
	callq	_LP5523_ENG2_IS_LOADING
	movl	-32(%rbp), %edi
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_LP5523_MODE_ENG2_M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edi
	movq	_LP5523_RUN_ENG2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, %edi
	movl	%edi, -32(%rbp)
	movq	_LP5523_EXEC_ENG2_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	-28(%rbp), %ecx
	orl	%eax, %ecx
	movl	%ecx, -28(%rbp)
LBB0_7:
	callq	_LP5523_ENG3_IS_LOADING
	movl	-32(%rbp), %edx
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_LP5523_MODE_ENG3_M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movq	_LP5523_RUN_ENG3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, %edx
	movl	%edx, -32(%rbp)
	movq	_LP5523_EXEC_ENG3_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	-28(%rbp), %ecx
	orl	%eax, %ecx
	movl	%ecx, -28(%rbp)
LBB0_9:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_lp55xx_write
	xorl	%eax, %eax
	callq	_lp5523_wait_opmode_done
	movl	(%r15), %esi
	movq	_LP5523_EXEC_M@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	%rbx, %rdi
	callq	_lp55xx_update_bits
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%rbx, %rdi
	callq	_lp5523_stop_engine
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lp5523_turn_off_channels       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LP5523_REG_OP_MODE,4,2         ## @LP5523_REG_OP_MODE
	.comm	_LP5523_REG_ENABLE,4,2          ## @LP5523_REG_ENABLE
	.comm	_LP5523_MODE_ENG1_M,4,2         ## @LP5523_MODE_ENG1_M
	.comm	_LP5523_RUN_ENG1,4,2            ## @LP5523_RUN_ENG1
	.comm	_LP5523_EXEC_ENG1_M,4,2         ## @LP5523_EXEC_ENG1_M
	.comm	_LP5523_MODE_ENG2_M,4,2         ## @LP5523_MODE_ENG2_M
	.comm	_LP5523_RUN_ENG2,4,2            ## @LP5523_RUN_ENG2
	.comm	_LP5523_EXEC_ENG2_M,4,2         ## @LP5523_EXEC_ENG2_M
	.comm	_LP5523_MODE_ENG3_M,4,2         ## @LP5523_MODE_ENG3_M
	.comm	_LP5523_RUN_ENG3,4,2            ## @LP5523_RUN_ENG3
	.comm	_LP5523_EXEC_ENG3_M,4,2         ## @LP5523_EXEC_ENG3_M
	.comm	_LP5523_EXEC_M,4,2              ## @LP5523_EXEC_M
	.no_dead_strip	_lp5523_run_engine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lp5523_run_engine
_lp5523_run_engine:                     ; @lp5523_run_engine
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	cbz	w1, LBB0_11
; %bb.1:
Lloh0:
	adrp	x20, _LP5523_REG_OP_MODE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _LP5523_REG_OP_MODE@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_lp55xx_read
	cbnz	w0, LBB0_10
; %bb.2:
Lloh2:
	adrp	x21, _LP5523_REG_ENABLE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _LP5523_REG_ENABLE@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_lp55xx_read
	cbnz	w0, LBB0_10
; %bb.3:
	ldr	w0, [sp, #12]
	bl	_LP5523_ENG1_IS_LOADING
	mov	x8, x0
	ldr	w0, [sp, #12]
	cbz	x8, LBB0_5
; %bb.4:
Lloh4:
	adrp	x8, _LP5523_MODE_ENG1_M@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LP5523_MODE_ENG1_M@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh7:
	adrp	x9, _LP5523_RUN_ENG1@GOTPAGE
Lloh8:
	ldr	x9, [x9, _LP5523_RUN_ENG1@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w0, w8, w9
	str	w0, [sp, #12]
	ldr	w8, [sp, #8]
Lloh10:
	adrp	x10, _LP5523_EXEC_ENG1_M@GOTPAGE
Lloh11:
	ldr	x10, [x10, _LP5523_EXEC_ENG1_M@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	bic	w8, w8, w10
	orr	w8, w8, w9
	str	w8, [sp, #8]
LBB0_5:
	bl	_LP5523_ENG2_IS_LOADING
	mov	x8, x0
	ldr	w0, [sp, #12]
	cbz	x8, LBB0_7
; %bb.6:
Lloh13:
	adrp	x8, _LP5523_MODE_ENG2_M@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LP5523_MODE_ENG2_M@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh16:
	adrp	x9, _LP5523_RUN_ENG2@GOTPAGE
Lloh17:
	ldr	x9, [x9, _LP5523_RUN_ENG2@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w0, w8, w9
	str	w0, [sp, #12]
	ldr	w8, [sp, #8]
Lloh19:
	adrp	x10, _LP5523_EXEC_ENG2_M@GOTPAGE
Lloh20:
	ldr	x10, [x10, _LP5523_EXEC_ENG2_M@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	bic	w8, w8, w10
	orr	w8, w8, w9
	str	w8, [sp, #8]
LBB0_7:
	bl	_LP5523_ENG3_IS_LOADING
	ldr	w2, [sp, #12]
	cbz	x0, LBB0_9
; %bb.8:
Lloh22:
	adrp	x8, _LP5523_MODE_ENG3_M@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LP5523_MODE_ENG3_M@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	bic	w8, w2, w8
Lloh25:
	adrp	x9, _LP5523_RUN_ENG3@GOTPAGE
Lloh26:
	ldr	x9, [x9, _LP5523_RUN_ENG3@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w8, [sp, #8]
Lloh28:
	adrp	x10, _LP5523_EXEC_ENG3_M@GOTPAGE
Lloh29:
	ldr	x10, [x10, _LP5523_EXEC_ENG3_M@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	bic	w8, w8, w10
	orr	w8, w8, w9
	str	w8, [sp, #8]
LBB0_9:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_lp55xx_write
	bl	_lp5523_wait_opmode_done
	ldr	w1, [x21]
Lloh31:
	adrp	x8, _LP5523_EXEC_M@GOTPAGE
Lloh32:
	ldr	x8, [x8, _LP5523_EXEC_M@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	ldr	w3, [sp, #8]
	mov	x0, x19
	bl	_lp55xx_update_bits
LBB0_10:
	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
	add	sp, sp, #64
	ret
LBB0_11:
	mov	x0, x19
	bl	_lp5523_stop_engine
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_lp5523_turn_off_channels
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_LP5523_REG_OP_MODE,4,2         ; @LP5523_REG_OP_MODE
	.comm	_LP5523_REG_ENABLE,4,2          ; @LP5523_REG_ENABLE
	.comm	_LP5523_MODE_ENG1_M,4,2         ; @LP5523_MODE_ENG1_M
	.comm	_LP5523_RUN_ENG1,4,2            ; @LP5523_RUN_ENG1
	.comm	_LP5523_EXEC_ENG1_M,4,2         ; @LP5523_EXEC_ENG1_M
	.comm	_LP5523_MODE_ENG2_M,4,2         ; @LP5523_MODE_ENG2_M
	.comm	_LP5523_RUN_ENG2,4,2            ; @LP5523_RUN_ENG2
	.comm	_LP5523_EXEC_ENG2_M,4,2         ; @LP5523_EXEC_ENG2_M
	.comm	_LP5523_MODE_ENG3_M,4,2         ; @LP5523_MODE_ENG3_M
	.comm	_LP5523_RUN_ENG3,4,2            ; @LP5523_RUN_ENG3
	.comm	_LP5523_EXEC_ENG3_M,4,2         ; @LP5523_EXEC_ENG3_M
	.comm	_LP5523_EXEC_M,4,2              ; @LP5523_EXEC_M
	.no_dead_strip	_lp5523_run_engine
.subsections_via_symbols
