	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_picolcd_init_leds              ## -- Begin function picolcd_init_leds
	.p2align	4, 0x90
_picolcd_init_leds:                     ## @picolcd_init_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_dev_name
	movq	%rax, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.1:
	cmpl	$1, (%rbx)
	jne	LBB0_8
## %bb.2:
	movq	8(%rbx), %rcx
	movq	(%rcx), %rcx
	cmpl	$1, (%rcx)
	jne	LBB0_8
## %bb.3:
	cmpl	$8, 4(%rcx)
	jne	LBB0_8
## %bb.4:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leal	8(%rax), %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	addl	$40, %eax
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %r15
	movq	%rax, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r14
	movq	%rax, %rbx
	addq	$32, %rbx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_dev_name
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rdx
	movq	%rax, %rcx
	movl	%r12d, %r8d
	callq	_snprintf
	movq	%rbx, (%r14)
	movq	$0, 24(%r14)
	movl	$1, 8(%r14)
	movq	_picolcd_led_get_brightness@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_picolcd_led_set_brightness@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	%r14, (%rax,%r12,8)
	movq	(%rcx), %rax
	movq	(%rax,%r12,8), %rsi
	movq	%r13, %rdi
	callq	_led_classdev_register
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r12
	xorl	%r13d, %r13d
	cmpq	$8, %r12
	movq	%r15, %rax
	jne	LBB0_5
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
LBB0_10:
	subl	(%rax), %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_13:
	movl	%eax, %r13d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	$0, (%rax,%r12,8)
	movq	%r14, %rdi
	movq	%rcx, %r14
	callq	_kfree
	leaq	L_.str.3(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_14:
	movq	(%r14), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.15:
	movq	$0, (%rax)
	movq	%rbx, %rdi
	callq	_led_classdev_unregister
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r14), %rax
LBB0_16:
	movq	8(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_18
## %bb.17:
	movq	$0, 8(%rax)
	movq	%rbx, %rdi
	callq	_led_classdev_unregister
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r14), %rax
LBB0_18:
	movq	16(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_20
## %bb.19:
	movq	$0, 16(%rax)
	movq	%rbx, %rdi
	callq	_led_classdev_unregister
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r14), %rax
LBB0_20:
	movq	24(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_22
## %bb.21:
	movq	$0, 24(%rax)
	movq	%rbx, %rdi
	callq	_led_classdev_unregister
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r14), %rax
LBB0_22:
	movq	32(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.23:
	movq	$0, 32(%rax)
	movq	%rbx, %rdi
	callq	_led_classdev_unregister
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r14), %rax
LBB0_24:
	movq	40(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_26
## %bb.25:
	movq	$0, 40(%rax)
	movq	%rbx, %rdi
	callq	_led_classdev_unregister
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r14), %rax
LBB0_26:
	movq	48(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_28
## %bb.27:
	movq	$0, 48(%rax)
	movq	%rbx, %rdi
	callq	_led_classdev_unregister
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r14), %rax
LBB0_28:
	movq	56(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.29:
	movq	$0, 56(%rax)
	movq	%rbx, %rdi
	callq	_led_classdev_unregister
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported LED_STATE report"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"can't allocate memory for LED %d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"%s::GPO%d"

	.comm	_picolcd_led_get_brightness,4,2 ## @picolcd_led_get_brightness
	.comm	_picolcd_led_set_brightness,4,2 ## @picolcd_led_set_brightness
L_.str.3:                               ## @.str.3
	.asciz	"can't register LED %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_picolcd_init_leds              ; -- Begin function picolcd_init_leds
	.p2align	2
_picolcd_init_leds:                     ; @picolcd_init_leds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	mov	x0, x21
	bl	_dev_name
	bl	_strlen
	cbz	x20, LBB0_9
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x8, #4]
	cmp	w8, #8
	b.ne	LBB0_8
; %bb.4:
	mov	x22, #0
	add	w8, w0, #8
	sxtw	x23, w8
	add	w24, w0, #40
Lloh0:
	adrp	x28, _picolcd_led_get_brightness@GOTPAGE
Lloh1:
	ldr	x28, [x28, _picolcd_led_get_brightness@GOTPAGEOFF]
Lloh2:
	adrp	x27, _picolcd_led_set_brightness@GOTPAGE
Lloh3:
	ldr	x27, [x27, _picolcd_led_set_brightness@GOTPAGEOFF]
Lloh4:
	adrp	x25, l_.str.2@PAGE
Lloh5:
	add	x25, x25, l_.str.2@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x26, x0
	add	x20, x0, #32
	mov	x0, x21
	bl	_dev_name
	mov	x3, x0
	mov	x0, x20
	mov	x1, x23
	mov	x2, x25
	mov	x4, x22
	bl	_snprintf
	str	x20, [x26]
	str	xzr, [x26, #24]
	ldr	w10, [x28]
	ldr	w8, [x27]
	mov	w9, #1
	str	w9, [x26, #8]
	stp	w8, w10, [x26, #12]
	ldr	x8, [x19]
	lsl	x9, x22, #3
	str	x26, [x8, x9]
	ldr	x8, [x19]
	ldr	x1, [x8, x9]
	mov	x0, x21
	bl	_led_classdev_register
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	cmp	x22, #8
	b.ne	LBB0_5
	b	LBB0_11
LBB0_8:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
	str	x22, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_14
LBB0_13:
	ldr	x8, [x19]
	str	xzr, [x8, x22, lsl #3]
	mov	x0, x26
	bl	_kfree
	str	x22, [sp]
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_14:
	ldr	x8, [x19]
	ldr	x21, [x8]
	cbz	x21, LBB0_16
; %bb.15:
	str	xzr, [x8]
	mov	x0, x21
	bl	_led_classdev_unregister
	mov	x0, x21
	bl	_kfree
	ldr	x8, [x19]
LBB0_16:
	ldr	x21, [x8, #8]
	cbz	x21, LBB0_18
; %bb.17:
	str	xzr, [x8, #8]
	mov	x0, x21
	bl	_led_classdev_unregister
	mov	x0, x21
	bl	_kfree
	ldr	x8, [x19]
LBB0_18:
	ldr	x21, [x8, #16]
	cbz	x21, LBB0_20
; %bb.19:
	str	xzr, [x8, #16]
	mov	x0, x21
	bl	_led_classdev_unregister
	mov	x0, x21
	bl	_kfree
	ldr	x8, [x19]
LBB0_20:
	ldr	x21, [x8, #24]
	cbz	x21, LBB0_22
; %bb.21:
	str	xzr, [x8, #24]
	mov	x0, x21
	bl	_led_classdev_unregister
	mov	x0, x21
	bl	_kfree
	ldr	x8, [x19]
LBB0_22:
	ldr	x21, [x8, #32]
	cbz	x21, LBB0_24
; %bb.23:
	str	xzr, [x8, #32]
	mov	x0, x21
	bl	_led_classdev_unregister
	mov	x0, x21
	bl	_kfree
	ldr	x8, [x19]
LBB0_24:
	ldr	x21, [x8, #40]
	cbz	x21, LBB0_26
; %bb.25:
	str	xzr, [x8, #40]
	mov	x0, x21
	bl	_led_classdev_unregister
	mov	x0, x21
	bl	_kfree
	ldr	x8, [x19]
LBB0_26:
	ldr	x21, [x8, #48]
	cbz	x21, LBB0_28
; %bb.27:
	str	xzr, [x8, #48]
	mov	x0, x21
	bl	_led_classdev_unregister
	mov	x0, x21
	bl	_kfree
	ldr	x8, [x19]
LBB0_28:
	ldr	x19, [x8, #56]
	cbz	x19, LBB0_11
; %bb.29:
	str	xzr, [x8, #56]
	mov	x0, x19
	bl	_led_classdev_unregister
	mov	x0, x19
	bl	_kfree
	b	LBB0_11
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported LED_STATE report"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"can't allocate memory for LED %d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"%s::GPO%d"

	.comm	_picolcd_led_get_brightness,4,2 ; @picolcd_led_get_brightness
	.comm	_picolcd_led_set_brightness,4,2 ; @picolcd_led_set_brightness
l_.str.3:                               ; @.str.3
	.asciz	"can't register LED %d\n"

.subsections_via_symbols
