	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimod_led_get
_wiimod_led_get:                        ## @wiimod_led_get
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	callq	_dev_to_wii
	movq	%rax, %r15
	movq	8(%rax), %rax
	cmpq	%rbx, (%rax)
	je	LBB0_1
## %bb.2:
	cmpq	%rbx, 8(%rax)
	je	LBB0_3
## %bb.4:
	cmpq	%rbx, 16(%rax)
	je	LBB0_5
## %bb.6:
	cmpq	%rbx, 24(%rax)
	jne	LBB0_10
## %bb.7:
	movl	$4, %r14d
	jmp	LBB0_8
LBB0_1:
	movl	$1, %r14d
	jmp	LBB0_8
LBB0_3:
	movl	$2, %r14d
	jmp	LBB0_8
LBB0_5:
	movl	$3, %r14d
LBB0_8:
	movq	%r15, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movl	(%r15), %r15d
	movl	%r14d, %edi
	callq	_WIIPROTO_FLAG_LED
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	testl	%r15d, %r14d
	je	LBB0_10
## %bb.9:
	movq	_LED_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_LED_OFF@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LED_FULL,4,2                   ## @LED_FULL
	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.no_dead_strip	_wiimod_led_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimod_led_get
_wiimod_led_get:                        ; @wiimod_led_get
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x0, [x8]
	bl	_dev_to_wii
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x9, [x8]
	cmp	x9, x20
	b.eq	LBB0_5
; %bb.1:
	ldr	x9, [x8, #8]
	cmp	x9, x20
	b.eq	LBB0_6
; %bb.2:
	ldr	x9, [x8, #16]
	cmp	x9, x20
	b.eq	LBB0_7
; %bb.3:
	ldr	x8, [x8, #24]
	cmp	x8, x20
	b.ne	LBB0_10
; %bb.4:
	mov	w20, #4
	b	LBB0_8
LBB0_5:
	mov	w20, #1
	b	LBB0_8
LBB0_6:
	mov	w20, #2
	b	LBB0_8
LBB0_7:
	mov	w20, #3
LBB0_8:
	add	x21, x19, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w19, [x19]
	mov	x0, x20
	bl	_WIIPROTO_FLAG_LED
	and	w19, w0, w19
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cbz	w19, LBB0_10
; %bb.9:
Lloh0:
	adrp	x8, _LED_FULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LED_FULL@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh2:
	adrp	x8, _LED_OFF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LED_OFF@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_LED_FULL,4,2                   ; @LED_FULL
	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.no_dead_strip	_wiimod_led_get
.subsections_via_symbols
