	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lp55xx_register_leds           ## -- Begin function lp55xx_register_leds
	.p2align	4, 0x90
_lp55xx_register_leds:                  ## @lp55xx_register_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	%rsi, %r15
	movq	16(%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, 8(%rax)
	je	LBB0_8
## %bb.1:
	movq	24(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%rax), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jle	LBB0_10
## %bb.2:
	xorl	%ebx, %ebx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	addq	$8, %r12
	cmpq	%rbx, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax,%rbx,8), %r13
	testq	%r13, %r13
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_lp55xx_init_led
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	(%r15)
	movq	%r15, (%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	*%rax
	jmp	LBB0_3
LBB0_10:
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_8:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_11:
	movl	%eax, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_lp55xx_unregister_leds
LBB0_12:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"empty brightness configuration\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lp55xx_register_leds           ; -- Begin function lp55xx_register_leds
	.p2align	2
_lp55xx_register_leds:                  ; @lp55xx_register_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, x1
	ldr	x25, [x1, #16]
	ldr	w8, [x25, #8]
	cbz	w8, LBB0_9
; %bb.1:
	ldr	x26, [x19, #24]
	ldr	w27, [x26]
	cmp	w27, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x20, x0
	mov	x21, #0
	mov	x22, x0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	add	x22, x22, #8
	cmp	x27, x21
	b.eq	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26, #8]
	ldr	x23, [x8, x21, lsl #3]
	cbz	x23, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	bl	_lp55xx_init_led
	cbnz	w0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	str	x19, [x22]
	ldr	x8, [x25]
	cbz	x8, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x23
	blr	x8
	b	LBB0_3
LBB0_8:
	mov	w24, #0
	b	LBB0_11
LBB0_9:
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_11
LBB0_10:
	mov	x24, x0
	mov	x0, x20
	mov	x1, x19
	bl	_lp55xx_unregister_leds
LBB0_11:
	mov	x0, x24
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"empty brightness configuration\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
