	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq2415x_power_supply_init
_bq2415x_power_supply_init:             ## @bq2415x_power_supply_init
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_bq2415x_sysfs_groups@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	32(%rdi), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	%rdi, -48(%rbp)
	movl	40(%rdi), %eax
	movl	%eax, 24(%rdi)
	movq	_POWER_SUPPLY_TYPE_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rdi)
	movq	_bq2415x_power_supply_props@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 16(%rbx)
	callq	_ARRAY_SIZE
	movl	%eax, 12(%rbx)
	movq	_bq2415x_power_supply_get_property@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_bq2415x_detect_chip
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	_BQUNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_2:
	movq	%rbx, %rdi
	callq	_bq2415x_detect_revision
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	leaq	-40(%rbp), %rdi
	movl	%eax, %edx
	callq	_sprintf
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdi
	callq	_strcpy
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_bq2415x_chip_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	movl	(%rax,%rcx,4), %r14d
	movq	%rbx, %rdi
	callq	_bq2415x_get_vender_code
	leaq	L_.str.2(%rip), %rsi
	leaq	-40(%rbp), %rcx
	movl	%r15d, %edi
	movl	%r14d, %edx
	movl	%eax, %r8d
	callq	_kasprintf
	movl	%eax, 4(%rbx)
	movq	32(%rbx), %rdi
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	leaq	8(%rbx), %rsi
	leaq	-56(%rbp), %rdx
	callq	_power_supply_register
	movl	%eax, (%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movl	4(%rbx), %edi
	callq	_kfree
	movl	(%rbx), %edi
	callq	_PTR_ERR
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_8:
	xorl	%eax, %eax
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_12
## %bb.11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_bq2415x_sysfs_groups,4,2       ## @bq2415x_sysfs_groups
	.comm	_POWER_SUPPLY_TYPE_USB,4,2      ## @POWER_SUPPLY_TYPE_USB
	.comm	_bq2415x_power_supply_props,4,2 ## @bq2415x_power_supply_props
	.comm	_bq2415x_power_supply_get_property,4,2 ## @bq2415x_power_supply_get_property
	.comm	_BQUNKNOWN,4,2                  ## @BQUNKNOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown"

L_.str.1:                               ## @.str.1
	.asciz	"1.%d"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"chip %s, revision %s, vender code %.3d"

	.comm	_bq2415x_chip_name,8,3          ## @bq2415x_chip_name
L_.str.3:                               ## @.str.3
	.asciz	"failed to allocate model name\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_bq2415x_power_supply_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq2415x_power_supply_init
_bq2415x_power_supply_init:             ; @bq2415x_power_supply_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _bq2415x_sysfs_groups@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bq2415x_sysfs_groups@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp]
	ldr	x8, [x0, #32]
	ldr	w8, [x8]
	str	w8, [sp, #4]
	str	x0, [sp, #8]
	ldr	w8, [x0, #40]
	str	w8, [x0, #24]
Lloh6:
	adrp	x8, _POWER_SUPPLY_TYPE_USB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POWER_SUPPLY_TYPE_USB@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _bq2415x_power_supply_props@GOTPAGE
Lloh10:
	ldr	x9, [x9, _bq2415x_power_supply_props@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x9]
	stp	w0, w8, [x19, #16]
	bl	_ARRAY_SIZE
Lloh12:
	adrp	x8, _bq2415x_power_supply_get_property@GOTPAGE
Lloh13:
	ldr	x8, [x8, _bq2415x_power_supply_get_property@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	x20, x19
	str	w8, [x20, #8]!
	str	w0, [x19, #12]
	mov	x0, x19
	bl	_bq2415x_detect_chip
Lloh15:
	adrp	x8, _BQUNKNOWN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BQUNKNOWN@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w22, w8, w0, lt
	mov	x0, x19
	bl	_bq2415x_detect_revision
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x2, x0
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #16
	bl	_sprintf
	b	LBB0_3
LBB0_2:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #16
	bl	_strcpy
LBB0_3:
Lloh22:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh24:
	ldr	w21, [x8]
Lloh25:
	adrp	x8, _bq2415x_chip_name@GOTPAGE
Lloh26:
	ldr	x8, [x8, _bq2415x_chip_name@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	ldr	w22, [x8, w22, sxtw #2]
	mov	x0, x19
	bl	_bq2415x_get_vender_code
	mov	x4, x0
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x3, sp, #16
	mov	x0, x21
	mov	x2, x22
	bl	_kasprintf
	mov	x8, x0
	str	w0, [x19, #4]
	ldr	x0, [x19, #32]
	cbz	w8, LBB0_6
; %bb.4:
	mov	x2, sp
	mov	x1, x20
	bl	_power_supply_register
	str	w0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.5:
	ldr	w0, [x19, #4]
	bl	_kfree
	ldr	w0, [x19]
	bl	_PTR_ERR
	b	LBB0_7
LBB0_6:
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldr	x8, [sp, #24]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_bq2415x_sysfs_groups,4,2       ; @bq2415x_sysfs_groups
	.comm	_POWER_SUPPLY_TYPE_USB,4,2      ; @POWER_SUPPLY_TYPE_USB
	.comm	_bq2415x_power_supply_props,4,2 ; @bq2415x_power_supply_props
	.comm	_bq2415x_power_supply_get_property,4,2 ; @bq2415x_power_supply_get_property
	.comm	_BQUNKNOWN,4,2                  ; @BQUNKNOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown"

l_.str.1:                               ; @.str.1
	.asciz	"1.%d"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"chip %s, revision %s, vender code %.3d"

	.comm	_bq2415x_chip_name,8,3          ; @bq2415x_chip_name
l_.str.3:                               ; @.str.3
	.asciz	"failed to allocate model name\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_bq2415x_power_supply_init
.subsections_via_symbols
