	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimod_battery_probe
_wiimod_battery_probe:                  ## @wiimod_battery_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rsi, -24(%rbp)
	movq	_wiimod_battery_props@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 28(%rsi)
	callq	_ARRAY_SIZE
	movl	%eax, 24(%rbx)
	movq	_wiimod_battery_get_property@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_POWER_SUPPLY_TYPE_BATTERY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	$0, 8(%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	32(%rbx), %rax
	movl	4(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_kasprintf
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	32(%rbx), %rdi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_power_supply_register
	movl	%eax, 40(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	32(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_hid_err
	movl	40(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %r14d
	movq	(%rbx), %rdi
	callq	_kfree
	movq	$0, (%rbx)
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_4:
	movl	40(%rbx), %edi
	movq	32(%rbx), %rsi
	callq	_power_supply_powers
	xorl	%r14d, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wiimod_battery_props,4,2       ## @wiimod_battery_props
	.comm	_wiimod_battery_get_property,4,2 ## @wiimod_battery_get_property
	.comm	_POWER_SUPPLY_TYPE_BATTERY,4,2  ## @POWER_SUPPLY_TYPE_BATTERY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wiimote_battery_%s"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"cannot register battery device\n"

	.no_dead_strip	_wiimod_battery_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimod_battery_probe
_wiimod_battery_probe:                  ; @wiimod_battery_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	str	x1, [sp, #8]
Lloh0:
	adrp	x8, _wiimod_battery_props@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wiimod_battery_props@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	str	w0, [x1, #28]
	bl	_ARRAY_SIZE
	str	w0, [x19, #24]
Lloh3:
	adrp	x8, _wiimod_battery_get_property@GOTPAGE
Lloh4:
	ldr	x8, [x8, _wiimod_battery_get_property@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _POWER_SUPPLY_TYPE_BATTERY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _POWER_SUPPLY_TYPE_BATTERY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
	str	xzr, [x19, #8]
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x8, [x19, #32]
	ldr	w2, [x8, #4]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_kasprintf
	str	x0, [x19]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x0, [x19, #32]
	add	x2, sp, #8
	mov	x1, x19
	bl	_power_supply_register
	str	w0, [x19, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x0, [x19, #32]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_hid_err
	ldr	w0, [x19, #40]
	bl	_PTR_ERR
	mov	x20, x0
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
	b	LBB0_5
LBB0_3:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19, #40]
	ldr	x1, [x19, #32]
	bl	_power_supply_powers
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_wiimod_battery_props,4,2       ; @wiimod_battery_props
	.comm	_wiimod_battery_get_property,4,2 ; @wiimod_battery_get_property
	.comm	_POWER_SUPPLY_TYPE_BATTERY,4,2  ; @POWER_SUPPLY_TYPE_BATTERY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wiimote_battery_%s"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"cannot register battery device\n"

	.no_dead_strip	_wiimod_battery_probe
.subsections_via_symbols
