	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_emulated_leds
_update_emulated_leds:                  ## @update_emulated_leds
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	(%rsi), %r12
	xorl	%eax, %eax
	callq	_is_serial_link_master
	testq	%rax, %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	je	LBB0_2
## %bb.1:
	callq	_get_led_index_master
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_get_led_index_master
	jmp	LBB0_3
LBB0_2:
	callq	_get_led_index_slave
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_get_led_index_slave
LBB0_3:
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_get_secondary_led_index
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_get_secondary_led_index
	movq	%rax, %r13
	movq	%r12, %rdi
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_get_brightness
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_get_brightness
	movq	%r12, %rdi
	movq	%rax, %r12
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rsi
	callq	_get_brightness
	movq	%rax, %r13
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_get_brightness
	movq	%r12, %rsi
	movq	%rax, %r12
	movq	_lcd_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_LCD_STATE_INITIAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%rbx, %rcx
	je	LBB0_8
## %bb.4:
	cmpq	-80(%rbp), %rcx                 ## 8-byte Folded Reload
	jne	LBB0_8
## %bb.5:
	cmpq	-72(%rbp), %r14                 ## 8-byte Folded Reload
	jne	LBB0_8
## %bb.6:
	cmpq	-64(%rbp), %rsi                 ## 8-byte Folded Reload
	jne	LBB0_8
## %bb.7:
	cmpq	%r13, %r12
	jne	LBB0_8
## %bb.12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_led_emulation_colors@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	(%rax,%rcx,4), %edi
	callq	_change_lcd_color_intensity
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%r14, %r14
	je	LBB0_9
## %bb.10:
	movq	(%rbx), %rax
	movl	(%rax,%r14,4), %edi
	movq	%r12, %rsi
	callq	_change_lcd_color_intensity
	movq	_next_led_target_color@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_two_led_colors@GOTPCREL(%rip), %rbx
	movq	_one_led_color@GOTPCREL(%rip), %rdi
	jmp	LBB0_11
LBB0_9:
	movq	_one_led_color@GOTPCREL(%rip), %rbx
	movq	_two_led_colors@GOTPCREL(%rip), %rdi
LBB0_11:
	callq	_stop_keyframe_animation
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_start_keyframe_animation       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_lcd_state,8,3                  ## @lcd_state
	.comm	_LCD_STATE_INITIAL,8,3          ## @LCD_STATE_INITIAL
	.comm	_led_emulation_colors,8,3       ## @led_emulation_colors
	.comm	_next_led_target_color,8,3      ## @next_led_target_color
	.comm	_one_led_color,4,2              ## @one_led_color
	.comm	_two_led_colors,4,2             ## @two_led_colors
	.no_dead_strip	_update_emulated_leds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_emulated_leds
_update_emulated_leds:                  ; @update_emulated_leds
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x21, [x0, #8]
	ldr	x22, [x1]
	bl	_is_serial_link_master
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_get_led_index_master
	mov	x20, x0
	mov	x0, x22
	bl	_get_led_index_master
	b	LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_get_led_index_slave
	mov	x20, x0
	mov	x0, x22
	bl	_get_led_index_slave
LBB0_3:
	mov	x24, x0
	mov	x0, x21
	bl	_get_secondary_led_index
	mov	x23, x0
	mov	x0, x22
	bl	_get_secondary_led_index
	mov	x26, x0
	mov	x0, x22
	mov	x1, x24
	bl	_get_brightness
	mov	x27, x0
	mov	x0, x21
	mov	x1, x20
	bl	_get_brightness
	mov	x25, x0
	mov	x0, x22
	mov	x1, x26
	bl	_get_brightness
	mov	x22, x0
	mov	x0, x21
	mov	x1, x23
	bl	_get_brightness
Lloh0:
	adrp	x8, _lcd_state@GOTPAGE
Lloh1:
	ldr	x8, [x8, _lcd_state@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _LCD_STATE_INITIAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LCD_STATE_INITIAL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	x20, x24, #0, ne
	ccmp	x23, x26, #0, eq
	ccmp	x25, x27, #0, eq
	ccmp	x0, x22, #0, eq
	b.eq	LBB0_6
; %bb.4:
	mov	x21, x0
Lloh6:
	adrp	x22, _led_emulation_colors@GOTPAGE
Lloh7:
	ldr	x22, [x22, _led_emulation_colors@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	w0, [x8, x20, lsl #2]
	mov	x1, x25
	bl	_change_lcd_color_intensity
	str	x0, [x19]
	cbz	x23, LBB0_7
; %bb.5:
	ldr	x8, [x22]
	ldr	w0, [x8, x23, lsl #2]
	mov	x1, x21
	bl	_change_lcd_color_intensity
Lloh8:
	adrp	x8, _next_led_target_color@GOTPAGE
Lloh9:
	ldr	x8, [x8, _next_led_target_color@GOTPAGEOFF]
Lloh10:
	str	x0, [x8]
Lloh11:
	adrp	x19, _two_led_colors@GOTPAGE
Lloh12:
	ldr	x19, [x19, _two_led_colors@GOTPAGEOFF]
Lloh13:
	adrp	x0, _one_led_color@GOTPAGE
Lloh14:
	ldr	x0, [x0, _one_led_color@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh15:
	adrp	x19, _one_led_color@GOTPAGE
Lloh16:
	ldr	x19, [x19, _one_led_color@GOTPAGEOFF]
Lloh17:
	adrp	x0, _two_led_colors@GOTPAGE
Lloh18:
	ldr	x0, [x0, _two_led_colors@GOTPAGEOFF]
LBB0_8:
	bl	_stop_keyframe_animation
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_start_keyframe_animation
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_lcd_state,8,3                  ; @lcd_state
	.comm	_LCD_STATE_INITIAL,8,3          ; @LCD_STATE_INITIAL
	.comm	_led_emulation_colors,8,3       ; @led_emulation_colors
	.comm	_next_led_target_color,8,3      ; @next_led_target_color
	.comm	_one_led_color,4,2              ; @one_led_color
	.comm	_two_led_colors,4,2             ; @two_led_colors
	.no_dead_strip	_update_emulated_leds
.subsections_via_symbols
