	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lp55xx_init_led
_lp55xx_init_led:                       ## @lp55xx_init_led
	.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
	movl	%edx, %r8d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rsi), %r10
	movq	8(%rsi), %rcx
	leaq	8(%r10), %r14
	movl	(%rcx), %ecx
	cmpl	%edx, %ecx
	jle	LBB0_1
## %bb.3:
	movq	16(%rsi), %r9
	movq	8(%r9), %rsi
	movslq	%r8d, %rdx
	shlq	$5, %rdx
	movq	(%rsi,%rdx), %rbx
	xorl	%r13d, %r13d
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.4:
	movq	%rbx, (%rdi)
	movl	28(%rsi,%rdx), %ebx
	movl	%ebx, 40(%rdi)
	movl	8(%rsi,%rdx), %ebx
	movl	%ebx, 8(%rdi)
	movl	24(%rsi,%rdx), %eax
	movl	%eax, 32(%rdi)
	cmpl	%ecx, %ebx
	jge	LBB0_5
## %bb.6:
	leaq	16(%rdi), %r15
	movq	_lp55xx_set_brightness@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rdi)
	movq	_lp55xx_led_groups@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdi)
	movq	16(%rsi,%rdx), %r12
	testq	%r12, %r12
	jne	LBB0_10
## %bb.7:
	movq	(%r9), %rcx
	testq	%rcx, %rcx
	jne	LBB0_9
## %bb.8:
	movq	(%r10), %rcx
LBB0_9:
	leaq	-80(%rbp), %r12
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_snprintf
LBB0_10:
	movq	%r12, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_led_classdev_register
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r15d, %r13d
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	movl	%r8d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_2
LBB0_5:
	decl	%ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	movl	%ecx, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid channel: %d / %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Use channel numbers between 0 and %d\n"

	.comm	_lp55xx_set_brightness,4,2      ## @lp55xx_set_brightness
	.comm	_lp55xx_led_groups,4,2          ## @lp55xx_led_groups
L_.str.2:                               ## @.str.2
	.asciz	"%s:channel%d"

L_.str.3:                               ## @.str.3
	.asciz	"led register err: %d\n"

	.no_dead_strip	_lp55xx_init_led
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lp55xx_init_led
_lp55xx_init_led:                       ; @lp55xx_init_led
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x4, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldp	x8, x9, [x1]
	add	x19, x8, #8
	ldr	w10, [x9]
	cmp	w10, w2
	b.le	LBB0_9
; %bb.1:
	ldr	x9, [x1, #16]
	ldr	x11, [x9, #8]
	sbfiz	x12, x4, #5, #32
	ldr	x12, [x11, x12]
	cbz	x12, LBB0_10
; %bb.2:
	sxtw	x13, w4
	str	x12, [x0]
	add	x11, x11, x13, lsl #5
	ldr	w12, [x11, #28]
	str	w12, [x0, #40]
	ldr	w12, [x11, #8]
	str	w12, [x0, #8]
	ldr	w13, [x11, #24]
	str	w13, [x0, #32]
	cmp	w12, w10
	b.ge	LBB0_11
; %bb.3:
	add	x20, x0, #16
Lloh3:
	adrp	x10, _lp55xx_set_brightness@GOTPAGE
Lloh4:
	ldr	x10, [x10, _lp55xx_set_brightness@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
Lloh6:
	adrp	x12, _lp55xx_led_groups@GOTPAGE
Lloh7:
	ldr	x12, [x12, _lp55xx_led_groups@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
	stp	w12, w10, [x0, #24]
	ldr	x21, [x11, #16]
	cbnz	x21, LBB0_7
; %bb.4:
	ldr	x3, [x9]
	cbnz	x3, LBB0_6
; %bb.5:
	ldr	x3, [x8]
LBB0_6:
	add	x21, sp, #8
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x0, sp, #8
	mov	w1, #32
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_snprintf
LBB0_7:
	str	x21, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_led_classdev_register
	mov	x20, x0
	cbz	w0, LBB0_13
; %bb.8:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
	b	LBB0_13
LBB0_9:
	str	x10, [sp]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x4
	b	LBB0_12
LBB0_10:
	mov	w20, #0
	b	LBB0_13
LBB0_11:
	sub	w2, w10, #1
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
LBB0_12:
	bl	_dev_err
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_13:
	ldr	x8, [sp, #40]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid channel: %d / %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Use channel numbers between 0 and %d\n"

	.comm	_lp55xx_set_brightness,4,2      ; @lp55xx_set_brightness
	.comm	_lp55xx_led_groups,4,2          ; @lp55xx_led_groups
l_.str.2:                               ; @.str.2
	.asciz	"%s:channel%d"

l_.str.3:                               ; @.str.3
	.asciz	"led register err: %d\n"

	.no_dead_strip	_lp55xx_init_led
.subsections_via_symbols
