	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_propagated_boost_from_neighbors
_get_propagated_boost_from_neighbors:   ## @get_propagated_boost_from_neighbors
	.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
	xorl	%eax, %eax
	testl	%edi, %edi
	js	LBB0_3
## %bb.1:
	movq	_KEY_LED_COUNT@GOTPCREL(%rip), %rcx
	cmpl	%edi, (%rcx)
	jle	LBB0_3
## %bb.2:
	movq	_LED_TO_KEY_MAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%edi, %ecx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rbx
	movq	8(%rax,%rcx), %r14
	leaq	-1(%r14), %rdi
	movq	%rbx, %rsi
	callq	_get_led_boost_at_keypos
	movl	%eax, %r15d
	leaq	1(%r14), %rdi
	movq	%rbx, %rsi
	callq	_get_led_boost_at_keypos
	movl	%eax, %r12d
	leaq	-1(%rbx), %rsi
	movq	%r14, %rdi
	callq	_get_led_boost_at_keypos
	movl	%eax, %r13d
	incq	%rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_get_led_boost_at_keypos
	movl	%eax, %r14d
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_max
	movl	%eax, %ebx
	movl	%r13d, %edi
	movl	%r14d, %esi
	callq	_max
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_max
	movl	%eax, %ecx
	movq	_LED_BOOST_PEAK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	cmovll	%ecx, %eax
	movq	_LED_BOOST_PROPAGATE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_LED_COUNT,4,2              ## @KEY_LED_COUNT
	.comm	_LED_TO_KEY_MAP,8,3             ## @LED_TO_KEY_MAP
	.comm	_LED_BOOST_PEAK,4,2             ## @LED_BOOST_PEAK
	.comm	_LED_BOOST_PROPAGATE,4,2        ## @LED_BOOST_PROPAGATE
	.no_dead_strip	_get_propagated_boost_from_neighbors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_propagated_boost_from_neighbors
_get_propagated_boost_from_neighbors:   ; @get_propagated_boost_from_neighbors
	.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	x8, x0
	mov	w0, #0
	tbnz	w8, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _KEY_LED_COUNT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KEY_LED_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w8
	b.le	LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, _LED_TO_KEY_MAP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LED_TO_KEY_MAP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x8, x9, w8, uxtw #4
	ldp	x19, x20, [x8]
	sub	x0, x20, #1
	mov	x1, x19
	bl	_get_led_boost_at_keypos
	mov	x21, x0
	add	x0, x20, #1
	mov	x1, x19
	bl	_get_led_boost_at_keypos
	mov	x22, x0
	sub	x1, x19, #1
	mov	x0, x20
	bl	_get_led_boost_at_keypos
	mov	x23, x0
	add	x1, x19, #1
	mov	x0, x20
	bl	_get_led_boost_at_keypos
	mov	x19, x0
	mov	x0, x21
	mov	x1, x22
	bl	_max
	mov	x20, x0
	mov	x0, x23
	mov	x1, x19
	bl	_max
	mov	x1, x0
	mov	x0, x20
	bl	_max
Lloh6:
	adrp	x8, _LED_BOOST_PEAK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LED_BOOST_PEAK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	csel	w8, w0, w8, lt
Lloh9:
	adrp	x9, _LED_BOOST_PROPAGATE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LED_BOOST_PROPAGATE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mul	w0, w8, w9
LBB0_3:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_LED_COUNT,4,2              ; @KEY_LED_COUNT
	.comm	_LED_TO_KEY_MAP,8,3             ; @LED_TO_KEY_MAP
	.comm	_LED_BOOST_PEAK,4,2             ; @LED_BOOST_PEAK
	.comm	_LED_BOOST_PROPAGATE,4,2        ; @LED_BOOST_PROPAGATE
	.no_dead_strip	_get_propagated_boost_from_neighbors
.subsections_via_symbols
