	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_lightbar_version
_get_lightbar_version:                  ## @get_lightbar_version
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_alloc_lightbar_cmd_msg
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	8(%rax), %rax
	movq	_LIGHTBAR_CMD_VERSION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movl	(%rbx), %edi
	movq	%r13, %rsi
	callq	_cros_ec_cmd_xfer
	xorl	%r12d, %r12d
	testl	%eax, %eax
	js	LBB0_14
## %bb.3:
	movl	(%r13), %eax
	cmpl	$128, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_14
## %bb.5:
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movl	$0, (%r15)
LBB0_7:
	xorl	%eax, %eax
	testq	%r14, %r14
	jne	LBB0_12
	jmp	LBB0_13
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_15
LBB0_8:
	movq	8(%r13), %rax
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	movl	4(%rax), %ecx
	movl	%ecx, (%r15)
LBB0_10:
	testq	%r14, %r14
	je	LBB0_13
## %bb.11:
	movl	(%rax), %eax
LBB0_12:
	movl	%eax, (%r14)
LBB0_13:
	movl	$1, %r12d
LBB0_14:
	movq	%r13, %rdi
	callq	_kfree
LBB0_15:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIGHTBAR_CMD_VERSION,4,2       ## @LIGHTBAR_CMD_VERSION
	.no_dead_strip	_get_lightbar_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_lightbar_version
_get_lightbar_version:                  ; @get_lightbar_version
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_alloc_lightbar_cmd_msg
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _LIGHTBAR_CMD_VERSION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LIGHTBAR_CMD_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x8]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_cros_ec_cmd_xfer
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.4:
	cbz	x21, LBB0_6
; %bb.5:
	str	wzr, [x21]
LBB0_6:
	cbz	x20, LBB0_15
; %bb.7:
	mov	w8, #0
	b	LBB0_14
LBB0_8:
	mov	w20, #0
	b	LBB0_17
LBB0_9:
	mov	w20, #0
	b	LBB0_16
LBB0_10:
	ldr	x8, [x19, #8]
	cbz	x21, LBB0_12
; %bb.11:
	ldr	w9, [x8, #4]
	str	w9, [x21]
LBB0_12:
	cbz	x20, LBB0_15
; %bb.13:
	ldr	w8, [x8]
LBB0_14:
	str	w8, [x20]
LBB0_15:
	mov	w20, #1
LBB0_16:
	mov	x0, x19
	bl	_kfree
LBB0_17:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LIGHTBAR_CMD_VERSION,4,2       ; @LIGHTBAR_CMD_VERSION
	.no_dead_strip	_get_lightbar_version
.subsections_via_symbols
