	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpi_set
_rpi_set:                               ## @rpi_set
	.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
	movl	%edi, %ebx
	testl	%edi, %edi
	js	LBB0_8
## %bb.1:
	movq	_MAX_LEDS@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jle	LBB0_8
## %bb.2:
	movq	_cur@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	(%rax), %rcx
	movl	%ebx, %r13d
	movl	(%rcx,%r13,4), %r15d
	testl	%r15d, %r15d
	jle	LBB0_7
## %bb.3:
	movl	%esi, %r14d
	movq	8(%rax), %rax
	movq	(%rax,%r13,8), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	testq	%rax, %rax
	jg	LBB0_9
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RARCH_WARN                     ## TAILCALL
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_RARCH_LOG
	movl	%r15d, %edi
	callq	_setup_gpio
	movq	(%r12), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, (%rcx,%r13,8)
	testq	%rax, %rax
	jg	LBB0_9
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_RARCH_WARN
	movq	(%r12), %rax
	movq	8(%rax), %rax
	movq	(%rax,%r13,8), %rax
	testq	%rax, %rax
	jle	LBB0_7
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_RARCH_LOG
	movl	%r15d, %edi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_gpio                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_LEDS,4,2                   ## @MAX_LEDS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[LED]: invalid led %d\n"

	.comm	_cur,8,3                        ## @cur
L_.str.1:                               ## @.str.1
	.asciz	"[LED]: rpi setup led %d gpio %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"[LED]: failed to setup led %d gpio %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"[LED]: rpi LED driver set led %d gpio %d = %d\n"

	.no_dead_strip	_rpi_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpi_set
_rpi_set:                               ; @rpi_set
	.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, x0
	tbnz	w0, #31, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _MAX_LEDS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_LEDS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.le	LBB0_6
; %bb.2:
Lloh3:
	adrp	x22, _cur@GOTPAGE
Lloh4:
	ldr	x22, [x22, _cur@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x9, [x8]
	ldr	w21, [x9, w20, uxtw #2]
	cmp	w21, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x19, x1
	mov	w23, w20
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x23, lsl #3]
	cbz	x8, LBB0_7
; %bb.4:
	cmp	x8, #1
	b.ge	LBB0_9
LBB0_5:
	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_6:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	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
	b	_RARCH_WARN
LBB0_7:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	bl	_RARCH_LOG
	mov	x0, x21
	bl	_setup_gpio
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	str	x0, [x8, x23, lsl #3]
	cmp	x0, #0
	b.gt	LBB0_9
; %bb.8:
	str	x21, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_RARCH_WARN
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x23, lsl #3]
	cmp	x8, #1
	b.lt	LBB0_5
LBB0_9:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	bl	_RARCH_LOG
	mov	x0, x21
	mov	x1, x19
	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
	b	_set_gpio
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_LEDS,4,2                   ; @MAX_LEDS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[LED]: invalid led %d\n"

	.comm	_cur,8,3                        ; @cur
l_.str.1:                               ; @.str.1
	.asciz	"[LED]: rpi setup led %d gpio %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"[LED]: failed to setup led %d gpio %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"[LED]: rpi LED driver set led %d gpio %d = %d\n"

	.no_dead_strip	_rpi_set
.subsections_via_symbols
