	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function overlay_set
_overlay_set:                           ## @overlay_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movl	%edi, %esi
	testl	%edi, %edi
	js	LBB0_8
## %bb.1:
	movq	_MAX_LEDS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jle	LBB0_8
## %bb.2:
	movq	_cur@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	%esi, %ecx
	movl	(%rax,%rcx,4), %ebx
	testl	%ebx, %ebx
	js	LBB0_7
## %bb.3:
	testl	%r14d, %r14d
	jne	LBB0_4
## %bb.5:
	movq	_OVERLAY_VISIBILITY_HIDDEN@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_RARCH_WARN                     ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	_OVERLAY_VISIBILITY_VISIBLE@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_input_overlay_set_visibility
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_RARCH_LOG                      ## 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
	.comm	_OVERLAY_VISIBILITY_VISIBLE,4,2 ## @OVERLAY_VISIBILITY_VISIBLE
	.comm	_OVERLAY_VISIBILITY_HIDDEN,4,2  ## @OVERLAY_VISIBILITY_HIDDEN
L_.str.1:                               ## @.str.1
	.asciz	"[LED]: set visibility %d %d\n"

	.no_dead_strip	_overlay_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function overlay_set
_overlay_set:                           ; @overlay_set
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x1, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _MAX_LEDS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_LEDS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.le	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _cur@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cur@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w20, [x8, w1, uxtw #2]
	tbnz	w20, #31, LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _OVERLAY_VISIBILITY_VISIBLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OVERLAY_VISIBILITY_VISIBLE@GOTPAGEOFF]
Lloh8:
	adrp	x9, _OVERLAY_VISIBILITY_HIDDEN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _OVERLAY_VISIBILITY_HIDDEN@GOTPAGEOFF]
	cmp	w19, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	x0, x20
	bl	_input_overlay_set_visibility
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_RARCH_LOG
LBB0_4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_RARCH_WARN
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.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
	.comm	_OVERLAY_VISIBILITY_VISIBLE,4,2 ; @OVERLAY_VISIBILITY_VISIBLE
	.comm	_OVERLAY_VISIBILITY_HIDDEN,4,2  ; @OVERLAY_VISIBILITY_HIDDEN
l_.str.1:                               ; @.str.1
	.asciz	"[LED]: set visibility %d %d\n"

	.no_dead_strip	_overlay_set
.subsections_via_symbols
