	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function led_rgb_store
_led_rgb_store:                         ## @led_rgb_store
	.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	%rcx, %r15
	movq	%rdx, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_to_cros_ec_dev
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_alloc_lightbar_cmd_msg
	testq	%rax, %rax
	je	LBB0_22
## %bb.1:
	movq	%rax, %r14
	movb	(%rbx), %al
	xorl	%r13d, %r13d
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -72(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
	testb	%al, %al
	je	LBB0_19
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movsbl	%al, %edi
	callq	_isspace
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	1(%rbx), %al
	incq	%rbx
	jmp	LBB0_2
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, (%rbx)
	je	LBB0_19
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r13d, %rax
	incl	%r13d
	leaq	-64(,%rax,4), %rdx
	addq	%rbp, %rdx
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_sscanf
	testl	%eax, %eax
	je	LBB0_19
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$4, %r13d
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rax
	movq	_LIGHTBAR_CMD_SET_RGB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movl	-64(%rbp), %ecx
	movl	%ecx, (%rax)
	movl	-60(%rbp), %ecx
	movl	%ecx, 4(%rax)
	movl	-56(%rbp), %ecx
	movl	%ecx, 8(%rax)
	movl	-52(%rbp), %ecx
	movl	%ecx, 12(%rax)
	testb	$3, -68(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_lb_throttle
	testl	%eax, %eax
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_cros_ec_cmd_xfer
	movl	$4, %r13d
	testl	%eax, %eax
	js	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rax
	movq	_EC_RES_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	-68(%rbp)                       ## 4-byte Folded Spill
	movl	$1, -72(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movb	(%rbx), %al
	testb	%al, %al
	je	LBB0_19
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsbl	%al, %edi
	callq	_isspace
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=2
	movzbl	1(%rbx), %eax
	incq	%rbx
	testb	%al, %al
	jne	LBB0_16
	jmp	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movb	(%rbx), %al
	testb	%al, %al
	jne	LBB0_2
	jmp	LBB0_19
LBB0_22:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subq	(%rax), %r15
	jmp	LBB0_20
LBB0_10:
	movl	$4, %r13d
LBB0_19:
	movq	%r14, %rdi
	callq	_kfree
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subq	(%rax), %rcx
	testl	%r13d, %r13d
	cmovneq	%rcx, %r15
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	cmoveq	%rcx, %r15
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.21:
	movq	%r15, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,8,3                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%i"

	.comm	_LIGHTBAR_CMD_SET_RGB,4,2       ## @LIGHTBAR_CMD_SET_RGB
	.comm	_EC_RES_SUCCESS,8,3             ## @EC_RES_SUCCESS
	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_led_rgb_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function led_rgb_store
_led_rgb_store:                         ; @led_rgb_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x3
	mov	x21, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_to_cros_ec_dev
	mov	x22, x0
	bl	_alloc_lightbar_cmd_msg
	cbz	x0, LBB0_18
; %bb.1:
	mov	x20, x0
	mov	w28, #0
	mov	w25, #0
	mov	w24, #0
	ldrb	w8, [x21]
Lloh3:
	adrp	x27, _EC_RES_SUCCESS@GOTPAGE
Lloh4:
	ldr	x27, [x27, _EC_RES_SUCCESS@GOTPAGEOFF]
Lloh5:
	adrp	x23, l_.str@PAGE
Lloh6:
	add	x23, x23, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
                                        ;     Child Loop BB0_15 Depth 2
	tst	w8, #0xff
	b.eq	LBB0_21
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sxtb	w0, w8
	bl	_isspace
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	ldrb	w8, [x21, #1]!
	cbnz	w8, LBB0_3
	b	LBB0_21
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x21]
	cbz	w8, LBB0_21
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w26, w28, #1
	add	x8, sp, #8
	add	x2, x8, w28, sxtw #2
	mov	x0, x21
	mov	x1, x23
	bl	_sscanf
	cbz	w0, LBB0_20
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w26, #4
	b.ne	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20, #8]
Lloh7:
	adrp	x9, _LIGHTBAR_CMD_SET_RGB@GOTPAGE
Lloh8:
	ldr	x9, [x9, _LIGHTBAR_CMD_SET_RGB@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	ldr	w10, [sp, #8]
	str	w10, [x8]
	ldr	w10, [sp, #12]
	str	w10, [x8, #4]
	ldr	w10, [sp, #16]
	str	w10, [x8, #8]
	ldr	w10, [sp, #20]
	stp	w10, w9, [x8, #12]
	tst	w25, #0x3
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_lb_throttle
	cbnz	w0, LBB0_19
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x22]
	mov	x1, x20
	bl	_cros_ec_cmd_xfer
	tbnz	w0, #31, LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w28, #0
	add	w25, w25, #1
	mov	w24, #1
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x28, x26
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x21]
	cbz	w8, LBB0_21
LBB0_15:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sxtb	w0, w8
	bl	_isspace
	cbnz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldrb	w8, [x21, #1]!
	cbnz	w8, LBB0_15
	b	LBB0_21
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x21]
	cbnz	w8, LBB0_2
	b	LBB0_21
LBB0_18:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_22
LBB0_19:
	mov	w28, #4
	b	LBB0_21
LBB0_20:
	mov	x28, x26
LBB0_21:
	mov	x0, x20
	bl	_kfree
	cmp	w28, #0
	ccmp	w24, #0, #4, eq
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	csneg	x0, x19, x8, ne
LBB0_22:
	ldr	x8, [sp, #24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,8,3                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%i"

	.comm	_LIGHTBAR_CMD_SET_RGB,4,2       ; @LIGHTBAR_CMD_SET_RGB
	.comm	_EC_RES_SUCCESS,8,3             ; @EC_RES_SUCCESS
	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_led_rgb_store
.subsections_via_symbols
