	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function charger_manager_prepare_sysfs
_charger_manager_prepare_sysfs:         ## @charger_manager_prepare_sysfs
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r13
	cmpl	$0, (%r13)
	jle	LBB0_7
## %bb.1:
	movl	$1, %ebx
	movl	$64, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r15d, %ecx
	callq	_devm_kasprintf
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r14,%r12), %rdi
	movq	32(%r14,%r12), %rcx
	movq	%rdi, (%rcx)
	movq	32(%r14,%r12), %rcx
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	%r13, %rbx
	leaq	-24(%r14,%r12), %r13
	movq	%r13, 8(%rcx)
	leaq	-48(%r14,%r12), %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	32(%r14,%r12), %rcx
	movq	%rdx, 16(%rcx)
	movq	32(%r14,%r12), %rcx
	movq	$0, 24(%rcx)
	leaq	16(%r14,%r12), %rcx
	movq	%rax, 16(%r14,%r12)
	movq	32(%r14,%r12), %rax
	movq	%rax, 24(%r14,%r12)
	movq	16(%rbx), %rax
	movq	%rcx, (%rax,%r15,8)
	callq	_sysfs_attr_init
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r14,%r12)
	movl	$292, 8(%r14,%r12)              ## imm = 0x124
	movq	_charger_name_show@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%r14,%r12)
	movq	%r13, %rdi
	movq	%rbx, %r13
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	callq	_sysfs_attr_init
	leaq	L_.str.2(%rip), %rax
	movq	%rax, -24(%r14,%r12)
	movl	$292, -16(%r14,%r12)            ## imm = 0x124
	movq	_charger_state_show@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%r14,%r12)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_sysfs_attr_init
	leaq	L_.str.3(%rip), %rax
	movq	%rax, -48(%r14,%r12)
	movl	$420, -40(%r14,%r12)            ## imm = 0x1A4
	movq	_charger_externally_control_show@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%r14,%r12)
	movq	_charger_externally_control_store@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%r14,%r12)
	movq	8(%r13), %rax
	movl	-64(%rax,%r12), %eax
	testl	%eax, %eax
	cmovel	%eax, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	-64(%r14,%r12), %ecx
	movl	-60(%r14,%r12), %edx
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_info
	incq	%r15
	movslq	(%r13), %rax
	addq	$104, %r12
	cmpq	%rax, %r15
	jl	LBB0_2
## %bb.5:
	testl	%ebx, %ebx
	je	LBB0_6
LBB0_7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"charger.%d"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"name"

	.comm	_charger_name_show,4,2          ## @charger_name_show
L_.str.2:                               ## @.str.2
	.asciz	"state"

	.comm	_charger_state_show,4,2         ## @charger_state_show
L_.str.3:                               ## @.str.3
	.asciz	"externally_control"

	.comm	_charger_externally_control_show,4,2 ## @charger_externally_control_show
	.comm	_charger_externally_control_store,4,2 ## @charger_externally_control_store
L_.str.4:                               ## @.str.4
	.asciz	"'%s' regulator's externally_control is %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Cannot register regulator because charger-manager must need at least one charger for charging battery\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_charger_manager_prepare_sysfs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function charger_manager_prepare_sysfs
_charger_manager_prepare_sysfs:         ; @charger_manager_prepare_sysfs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x25, [x0, #8]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, #0
	mov	w26, #1
	mov	w27, #96
	mov	w28, #292
Lloh0:
	adrp	x22, l_.str.4@PAGE
Lloh1:
	add	x22, x22, l_.str.4@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x25, #8]
	ldr	w0, [x19]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x20
	bl	_devm_kasprintf
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x23, x27
	sub	x8, x21, #32
	ldr	x9, [x21]
	str	x8, [x9]
	ldr	x9, [x21]
	sub	x23, x21, #56
	str	x23, [x9, #8]
	sub	x24, x21, #80
	ldr	x9, [x21]
	str	x24, [x9, #16]
	ldr	x9, [x21]
	str	xzr, [x9, #24]
	mov	x9, x21
	str	x0, [x9, #-16]!
	ldr	x10, [x21]
	stur	x10, [x21, #-8]
	ldr	x10, [x25, #16]
	str	x9, [x10, x20, lsl #3]
	mov	x0, x8
	bl	_sysfs_attr_init
Lloh7:
	adrp	x8, l_.str.1@PAGE
Lloh8:
	add	x8, x8, l_.str.1@PAGEOFF
	stur	x8, [x21, #-32]
	stur	w28, [x21, #-24]
Lloh9:
	adrp	x8, _charger_name_show@GOTPAGE
Lloh10:
	ldr	x8, [x8, _charger_name_show@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	stur	w8, [x21, #-40]
	mov	x0, x23
	bl	_sysfs_attr_init
Lloh12:
	adrp	x8, l_.str.2@PAGE
Lloh13:
	add	x8, x8, l_.str.2@PAGEOFF
	stur	x8, [x21, #-56]
	stur	w28, [x21, #-48]
Lloh14:
	adrp	x8, _charger_state_show@GOTPAGE
Lloh15:
	ldr	x8, [x8, _charger_state_show@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	stur	w8, [x21, #-64]
	mov	x0, x24
	bl	_sysfs_attr_init
Lloh17:
	adrp	x8, l_.str.3@PAGE
Lloh18:
	add	x8, x8, l_.str.3@PAGEOFF
	stur	x8, [x21, #-80]
	mov	w8, #420
	stur	w8, [x21, #-72]
Lloh19:
	adrp	x8, _charger_externally_control_show@GOTPAGE
Lloh20:
	ldr	x8, [x8, _charger_externally_control_show@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	stur	w8, [x21, #-84]
Lloh22:
	adrp	x8, _charger_externally_control_store@GOTPAGE
Lloh23:
	ldr	x8, [x8, _charger_externally_control_store@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	stur	w8, [x21, #-88]
	ldr	x8, [x25, #8]
	add	x8, x8, x27
	ldur	w8, [x8, #-96]
	cmp	w26, #0
	ccmp	w8, #0, #4, ne
	csel	w26, w26, wzr, ne
	ldr	w0, [x19]
	ldp	w3, w2, [x21, #-96]
	mov	x1, x22
	bl	_dev_info
	add	x20, x20, #1
	ldrsw	x8, [x25]
	add	x27, x27, #104
	cmp	x20, x8
	b.lt	LBB0_2
; %bb.4:
	cbz	w26, LBB0_9
LBB0_5:
	ldr	w0, [x19]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"charger.%d"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"name"

	.comm	_charger_name_show,4,2          ; @charger_name_show
l_.str.2:                               ; @.str.2
	.asciz	"state"

	.comm	_charger_state_show,4,2         ; @charger_state_show
l_.str.3:                               ; @.str.3
	.asciz	"externally_control"

	.comm	_charger_externally_control_show,4,2 ; @charger_externally_control_show
	.comm	_charger_externally_control_store,4,2 ; @charger_externally_control_store
l_.str.4:                               ; @.str.4
	.asciz	"'%s' regulator's externally_control is %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Cannot register regulator because charger-manager must need at least one charger for charging battery\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_charger_manager_prepare_sysfs
.subsections_via_symbols
