	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_fg_sysfs_psy_create_attrs
_ab8500_fg_sysfs_psy_create_attrs:      ## @ab8500_fg_sysfs_psy_create_attrs
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	8(%rdi), %edi
	callq	_is_ab8505
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	_ab8505_fg_sysfs_psy_attrs@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	movq	$-4, %rbx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	(%r15), %rax
	leaq	(%rax,%rbx), %rsi
	addq	$4, %rsi
	callq	_device_create_file
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jb	LBB0_3
## %bb.5:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_6:
	movq	(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	testl	%r14d, %r14d
	je	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	(%r15), %rsi
	addq	%rbx, %rsi
	callq	_device_remove_file
	addq	$-4, %rbx
	cmpq	$-4, %rbx
	jne	LBB0_7
LBB0_8:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ab8505_fg_sysfs_psy_attrs,8,3  ## @ab8505_fg_sysfs_psy_attrs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed creating sysfs psy attrs for ab8505.\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ab8500_fg_sysfs_psy_create_attrs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_fg_sysfs_psy_create_attrs
_ab8500_fg_sysfs_psy_create_attrs:      ; @ab8500_fg_sysfs_psy_create_attrs
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_is_ab8505
	cbz	x0, LBB0_9
; %bb.1:
Lloh0:
	adrp	x20, _ab8505_fg_sysfs_psy_attrs@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ab8505_fg_sysfs_psy_attrs@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_9
; %bb.2:
	mov	x22, #0
	mov	x21, #-4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	ldr	x8, [x20]
	add	x8, x8, x21
	add	x1, x8, #4
	bl	_device_create_file
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	add	x21, x21, #4
	cmp	x22, w0, uxtw
	b.lo	LBB0_3
; %bb.5:
	mov	w0, #0
	b	LBB0_9
LBB0_6:
	ldr	x0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	cbz	w22, LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	ldr	x8, [x20]
	add	x1, x8, x21
	bl	_device_remove_file
	sub	x21, x21, #4
	cmn	x21, #4
	b.ne	LBB0_7
LBB0_8:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	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
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ab8505_fg_sysfs_psy_attrs,8,3  ; @ab8505_fg_sysfs_psy_attrs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed creating sysfs psy attrs for ab8505.\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ab8500_fg_sysfs_psy_create_attrs
.subsections_via_symbols
