	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lp8727_register_psy
_lp8727_register_psy:                   ## @lp8727_register_psy
	.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	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, 8(%rbx)
	movq	_battery_supplied_to@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, -20(%rbp)
	callq	_ARRAY_SIZE
	movl	%eax, -24(%rbp)
	movl	(%rbx), %edi
	movq	_lp8727_ac_desc@GOTPCREL(%rip), %rsi
	leaq	-24(%rbp), %rdx
	callq	_power_supply_register
	movq	%rax, (%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	movl	(%rbx), %edi
	movq	_lp8727_usb_desc@GOTPCREL(%rip), %rsi
	leaq	-24(%rbp), %rdx
	callq	_power_supply_register
	movq	%rax, 8(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movl	(%rbx), %edi
	movq	_lp8727_batt_desc@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_power_supply_register
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	8(%r14), %rdi
	callq	_power_supply_unregister
LBB0_6:
	movq	(%r14), %rdi
	callq	_power_supply_unregister
LBB0_7:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_battery_supplied_to,4,2        ## @battery_supplied_to
	.comm	_lp8727_ac_desc,4,2             ## @lp8727_ac_desc
	.comm	_lp8727_usb_desc,4,2            ## @lp8727_usb_desc
	.comm	_lp8727_batt_desc,4,2           ## @lp8727_batt_desc
	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_lp8727_register_psy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lp8727_register_psy
_lp8727_register_psy:                   ; @lp8727_register_psy
	.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	x20, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	str	x0, [x20, #8]
Lloh3:
	adrp	x8, _battery_supplied_to@GOTPAGE
Lloh4:
	ldr	x8, [x8, _battery_supplied_to@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	str	w0, [sp, #12]
	bl	_ARRAY_SIZE
	str	w0, [sp, #8]
	ldr	w0, [x20]
Lloh6:
	adrp	x1, _lp8727_ac_desc@GOTPAGE
Lloh7:
	ldr	x1, [x1, _lp8727_ac_desc@GOTPAGEOFF]
	add	x2, sp, #8
	bl	_power_supply_register
	str	x0, [x19]
	bl	_IS_ERR
	cbnz	x0, LBB0_6
; %bb.2:
	ldr	w0, [x20]
Lloh8:
	adrp	x1, _lp8727_usb_desc@GOTPAGE
Lloh9:
	ldr	x1, [x1, _lp8727_usb_desc@GOTPAGEOFF]
	add	x2, sp, #8
	bl	_power_supply_register
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbnz	x0, LBB0_5
; %bb.3:
	ldr	w0, [x20]
Lloh10:
	adrp	x1, _lp8727_batt_desc@GOTPAGE
Lloh11:
	ldr	x1, [x1, _lp8727_batt_desc@GOTPAGEOFF]
	mov	x2, #0
	bl	_power_supply_register
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.4:
	ldr	x0, [x19, #8]
	bl	_power_supply_unregister
LBB0_5:
	ldr	x0, [x19]
	bl	_power_supply_unregister
LBB0_6:
Lloh12:
	adrp	x8, _EPERM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_battery_supplied_to,4,2        ; @battery_supplied_to
	.comm	_lp8727_ac_desc,4,2             ; @lp8727_ac_desc
	.comm	_lp8727_usb_desc,4,2            ; @lp8727_usb_desc
	.comm	_lp8727_batt_desc,4,2           ; @lp8727_batt_desc
	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_lp8727_register_psy
.subsections_via_symbols
