	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_gpio
_set_gpio:                              ## @set_gpio
	.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	%rbx
	subq	$264, %rsp                      ## imm = 0x108
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	L_.str(%rip), %rdx
	leaq	-288(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$256, %esi                      ## imm = 0x100
	movl	%r15d, %ecx
	callq	_snprintf
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	xorl	%edx, %edx
	testl	%r14d, %r14d
	setne	%dl
	leaq	L_.str.3(%rip), %rsi
	movq	%rax, %rdi
	callq	_fprintf
	movq	%rbx, %rdi
	callq	_fclose
	movl	$1, %eax
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	callq	_RARCH_WARN
	movl	$-1, %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$264, %rsp                      ## imm = 0x108
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/sys/class/gpio/gpio%d/value"

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

L_.str.2:                               ## @.str.2
	.asciz	"[LED]: failed to set GPIO %d\n"

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

	.no_dead_strip	_set_gpio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_gpio
_set_gpio:                              ; @set_gpio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #320
	.cfi_def_cfa_offset 320
	stp	x22, x21, [sp, #272]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #288]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #304]            ; 16-byte Folded Spill
	add	x29, sp, #304
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w1, #256
	mov	x3, x19
	bl	_snprintf
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #8
	bl	_fopen
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, x0
	cmp	w20, #0
	cset	w2, ne
Lloh7:
	adrp	x1, l_.str.3@PAGE
Lloh8:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	mov	x0, x21
	bl	_fclose
	mov	w0, #1
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_RARCH_WARN
	mov	w0, #-1
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #304]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #288]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #320
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/sys/class/gpio/gpio%d/value"

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

l_.str.2:                               ; @.str.2
	.asciz	"[LED]: failed to set GPIO %d\n"

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

	.no_dead_strip	_set_gpio
.subsections_via_symbols
