	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rbled_attach
_rbled_attach:                          ## @rbled_attach
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, %edi
	callq	_ofw_bus_get_node
	leaq	L_.str(%rip), %rsi
	leaq	-32(%rbp), %rdx
	movl	%eax, %edi
	movl	$8, %ecx
	callq	_OF_getprop
	testq	%rax, %rax
	jle	LBB0_4
## %bb.1:
	movl	-32(%rbp), %edi
	callq	_OF_device_from_xref
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movl	-28(%rbp), %eax
	movl	%eax, 8(%r14)
	movq	_rbled_toggle@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rsi
	callq	_led_create
	movq	%rax, %rcx
	movq	%rax, (%r14)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_4
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
LBB0_4:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"user_led"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"No GPIO resource found!\n"

	.comm	_rbled_toggle,4,2               ## @rbled_toggle
	.no_dead_strip	_rbled_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rbled_attach
_rbled_attach:                          ; @rbled_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_device_get_softc
	mov	x19, x0
	mov	x0, x20
	bl	_ofw_bus_get_node
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, sp
	mov	w3, #8
	bl	_OF_getprop
	cmp	x0, #0
	b.le	LBB0_4
; %bb.1:
	ldr	w0, [sp]
	bl	_OF_device_from_xref
	str	x0, [x19, #16]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w8, [sp, #4]
	str	w8, [x19, #8]
Lloh5:
	adrp	x8, _rbled_toggle@GOTPAGE
Lloh6:
	ldr	x8, [x8, _rbled_toggle@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x19
	bl	_led_create
	str	x0, [x19]
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w8, wzr, eq
	b	LBB0_5
LBB0_3:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_device_printf
LBB0_4:
Lloh15:
	adrp	x8, _ENXIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_5:
	ldr	x8, [sp, #8]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"user_led"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"No GPIO resource found!\n"

	.comm	_rbled_toggle,4,2               ; @rbled_toggle
	.no_dead_strip	_rbled_attach
.subsections_via_symbols
