	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_led                       ## -- Begin function init_led
	.p2align	4, 0x90
_init_led:                              ## @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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_strlen
	movl	%eax, %ebx
	movq	_LEDS_BASEPATH@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rbx,%rax), %esi
	addl	$12, %esi
	movl	$1, %edi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	(%r12), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	movq	%r15, %rcx
	callq	_sprintf
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_4
LBB0_7:
	movq	%r12, %rdi
	callq	_fclose
LBB0_8:
	movq	%rbx, %rdi
	callq	_free
LBB0_9:
	movq	_LOG_CRIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdx
	callq	_syslog
	movq	$0, (%r14)
	movl	$-1, %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$16, %edi
	movl	$1, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rax, %r13
	movq	%rbx, (%rax)
	movq	%r12, 8(%rax)
	movq	%rax, (%r14)
	movq	%rax, %rdi
	movl	$255, %esi
	callq	_set_led
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_set_led
	testq	%rax, %rax
	jne	LBB0_7
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_LEDS_BASEPATH,8,3              ## @LEDS_BASEPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%s/brightness"

L_.str.1:                               ## @.str.1
	.asciz	"w"

	.comm	_LOG_CRIT,4,2                   ## @LOG_CRIT
L_.str.2:                               ## @.str.2
	.asciz	"can't open LED %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_led                       ; -- Begin function init_led
	.p2align	2
_init_led:                              ; @init_led
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_strlen
	mov	x21, x0
Lloh0:
	adrp	x22, _LEDS_BASEPATH@GOTPAGE
Lloh1:
	ldr	x22, [x22, _LEDS_BASEPATH@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_strlen
	add	w8, w21, w0
	add	w1, w8, #12
	mov	w0, #1
	bl	_calloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	ldr	x2, [x22]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_sprintf
	add	x1, sp, #8
	mov	x0, x21
	bl	_stat
	cbnz	w0, LBB0_5
; %bb.2:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_fopen
	cbz	x0, LBB0_5
; %bb.3:
	mov	x22, x0
	bl	_ferror
	cbz	x0, LBB0_8
LBB0_4:
	mov	x0, x22
	bl	_fclose
LBB0_5:
	mov	x0, x21
	bl	_free
LBB0_6:
Lloh6:
	adrp	x8, _LOG_CRIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LOG_CRIT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_syslog
	str	xzr, [x19]
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	mov	w0, #16
	mov	w1, #1
	bl	_calloc
	cbz	x0, LBB0_4
; %bb.9:
	mov	x23, x0
	stp	x21, x22, [x0]
	str	x0, [x19]
	mov	w1, #255
	bl	_set_led
	cbnz	x0, LBB0_4
; %bb.10:
	mov	x0, x23
	mov	w1, #0
	bl	_set_led
	cbnz	x0, LBB0_4
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LEDS_BASEPATH,8,3              ; @LEDS_BASEPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%s/brightness"

l_.str.1:                               ; @.str.1
	.asciz	"w"

	.comm	_LOG_CRIT,4,2                   ; @LOG_CRIT
l_.str.2:                               ; @.str.2
	.asciz	"can't open LED %s\n"

.subsections_via_symbols
