	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimod_led_probe
_wiimod_led_probe:                      ## @wiimod_led_probe
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	16(%rsi), %r12
	movq	%r12, %rdi
	callq	_dev_name
	movq	%rax, %rdi
	callq	_strlen
	movl	%eax, %r13d
	leal	41(%r13), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	addl	$9, %r13d
	movslq	%r13d, %r13
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %r15
	movq	%rax, %r14
	addq	$32, %r14
	movq	%r12, %rdi
	callq	_dev_name
	movq	(%r15), %r8
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rax, %rcx
	callq	_snprintf
	movq	%r14, (%rbx)
	movq	%r15, %r14
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	$0, 24(%rbx)
	movl	$1, 8(%rbx)
	movq	_wiimod_led_get@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_wiimod_led_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	(%r15), %rax
	movq	(%r14), %rcx
	movq	%rbx, (%rax,%rcx,8)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_led_classdev_register
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movl	%eax, %r12d
	movq	(%r15), %rax
	movq	(%r14), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_6
LBB0_3:
	xorl	%r12d, %r12d
	cmpq	$0, (%r14)
	jne	LBB0_6
## %bb.4:
	leaq	8(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_WIIPROTO_FLAG_LED1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wiiproto_req_leds
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_6:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s:blue:p%lu"

	.comm	_wiimod_led_get,4,2             ## @wiimod_led_get
	.comm	_wiimod_led_set,4,2             ## @wiimod_led_set
	.comm	_WIIPROTO_FLAG_LED1,4,2         ## @WIIPROTO_FLAG_LED1
	.no_dead_strip	_wiimod_led_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimod_led_probe
_wiimod_led_probe:                      ; @wiimod_led_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	mov	x20, x0
	ldr	x21, [x1, #16]
	mov	x0, x21
	bl	_dev_name
	bl	_strlen
	mov	x23, x0
	add	w0, w0, #41
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	add	w8, w23, #9
	sxtw	x23, w8
	add	x24, x0, #32
	mov	x0, x21
	bl	_dev_name
	mov	x3, x0
	ldr	x4, [x20]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x24
	mov	x1, x23
	bl	_snprintf
	str	x24, [x22]
	str	xzr, [x22, #24]
Lloh5:
	adrp	x8, _wiimod_led_get@GOTPAGE
Lloh6:
	ldr	x8, [x8, _wiimod_led_get@GOTPAGEOFF]
	mov	w9, #1
Lloh7:
	ldr	w8, [x8]
	str	w8, [x22, #16]
Lloh8:
	adrp	x8, _wiimod_led_set@GOTPAGE
Lloh9:
	ldr	x8, [x8, _wiimod_led_set@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	stp	w9, w8, [x22, #8]
	ldr	x8, [x19]
	ldr	x9, [x20]
	str	x22, [x8, x9, lsl #3]
	mov	x0, x21
	mov	x1, x22
	bl	_led_classdev_register
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x9, [x20]
	str	xzr, [x8, x9, lsl #3]
	mov	x0, x22
	bl	_kfree
	b	LBB0_7
LBB0_3:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_4:
	ldr	x8, [x20]
	cbnz	x8, LBB0_6
; %bb.5:
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh14:
	adrp	x8, _WIIPROTO_FLAG_LED1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WIIPROTO_FLAG_LED1@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wiiproto_req_leds
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_6:
	mov	w21, #0
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s:blue:p%lu"

	.comm	_wiimod_led_get,4,2             ; @wiimod_led_get
	.comm	_wiimod_led_set,4,2             ; @wiimod_led_set
	.comm	_WIIPROTO_FLAG_LED1,4,2         ; @WIIPROTO_FLAG_LED1
	.no_dead_strip	_wiimod_led_probe
.subsections_via_symbols
