	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sony_battery_probe
_sony_battery_probe:                    ## @sony_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	testl	%esi, %esi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %r15
	cmoveq	%rax, %r15
	movq	%rdi, -32(%rbp)
	movq	48(%rdi), %r14
	movl	$100, (%rdi)
	movq	_sony_battery_props@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 36(%rbx)
	callq	_ARRAY_SIZE
	movl	%eax, 32(%rbx)
	movq	_sony_battery_get_property@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_POWER_SUPPLY_TYPE_BATTERY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	$0, 16(%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	40(%rbx), %r8d
	movl	44(%rbx), %ecx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_devm_kasprintf
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	8(%rbx), %rsi
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	callq	_devm_power_supply_register
	movl	%eax, 4(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	4(%rbx), %edi
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_hid_err
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_4:
	movq	%r14, %rsi
	callq	_power_supply_powers
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sony_controller_battery_%pMR_%i"

L_.str.1:                               ## @.str.1
	.asciz	"sony_controller_battery_%pMR"

	.comm	_sony_battery_props,4,2         ## @sony_battery_props
	.comm	_sony_battery_get_property,4,2  ## @sony_battery_get_property
	.comm	_POWER_SUPPLY_TYPE_BATTERY,4,2  ## @POWER_SUPPLY_TYPE_BATTERY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"Unable to register battery device\n"

	.no_dead_strip	_sony_battery_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sony_battery_probe
_sony_battery_probe:                    ; @sony_battery_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w1, #0
	csel	x21, x9, x8, eq
	str	x0, [sp, #8]
	ldr	x19, [x0, #48]
	mov	w8, #100
	str	w8, [x0]
Lloh4:
	adrp	x8, _sony_battery_props@GOTPAGE
Lloh5:
	ldr	x8, [x8, _sony_battery_props@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	str	w0, [x20, #36]
	bl	_ARRAY_SIZE
	str	w0, [x20, #32]
Lloh7:
	adrp	x8, _sony_battery_get_property@GOTPAGE
Lloh8:
	ldr	x8, [x8, _sony_battery_get_property@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _POWER_SUPPLY_TYPE_BATTERY@GOTPAGE
Lloh11:
	ldr	x9, [x9, _POWER_SUPPLY_TYPE_BATTERY@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #24]
	str	xzr, [x20, #16]
Lloh13:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldp	w4, w3, [x20, #40]
	mov	x0, x19
	mov	x2, x21
	bl	_devm_kasprintf
	mov	x1, x20
	str	w0, [x1, #8]!
	cbz	w0, LBB0_3
; %bb.1:
	add	x2, sp, #8
	mov	x0, x19
	bl	_devm_power_supply_register
	str	w0, [x20, #4]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x20, #4]
	cbz	x8, LBB0_4
; %bb.2:
	bl	_PTR_ERR
	mov	x20, x0
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_hid_err
	b	LBB0_5
LBB0_3:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_4:
	mov	x1, x19
	bl	_power_supply_powers
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sony_controller_battery_%pMR_%i"

l_.str.1:                               ; @.str.1
	.asciz	"sony_controller_battery_%pMR"

	.comm	_sony_battery_props,4,2         ; @sony_battery_props
	.comm	_sony_battery_get_property,4,2  ; @sony_battery_get_property
	.comm	_POWER_SUPPLY_TYPE_BATTERY,4,2  ; @POWER_SUPPLY_TYPE_BATTERY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"Unable to register battery device\n"

	.no_dead_strip	_sony_battery_probe
.subsections_via_symbols
