	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sc2731_charger_probe
_sc2731_charger_probe:                  ## @sc2731_charger_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r15
	leaq	32(%rax), %rdi
	callq	_mutex_init
	movq	%r14, 24(%r15)
	leaq	20(%r15), %rdi
	movq	_sc2731_charger_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movl	(%r14), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_dev_get_regmap
	movl	%eax, 16(%r15)
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movq	%r15, %rdx
	addq	$12, %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, -40(%rbp)
	movq	%r12, -48(%rbp)
	movq	_sc2731_charger_desc@GOTPCREL(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_devm_power_supply_register
	movl	%eax, 8(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	8(%r15), %edi
LBB0_11:
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_12:
	movq	%r15, %rdi
	callq	_sc2731_charger_hw_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.13:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_devm_usb_get_phy_by_phandle
	movl	%eax, 4(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	4(%r15), %edi
	jmp	LBB0_11
LBB0_15:
	movq	_sc2731_charger_usb_change@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movl	4(%r15), %edi
	movq	%r15, %rsi
	callq	_usb_register_notifier
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_17:
	movq	%r15, %rdi
	callq	_sc2731_charger_detect_status
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_sc2731_charger_work,4,2        ## @sc2731_charger_work
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get charger regmap\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"reg"

L_.str.2:                               ## @.str.2
	.asciz	"failed to get register address\n"

	.comm	_sc2731_charger_desc,4,2        ## @sc2731_charger_desc
L_.str.3:                               ## @.str.3
	.asciz	"failed to register power supply\n"

L_.str.4:                               ## @.str.4
	.asciz	"phys"

L_.str.5:                               ## @.str.5
	.asciz	"failed to find USB phy\n"

	.comm	_sc2731_charger_usb_change,4,2  ## @sc2731_charger_usb_change
L_.str.6:                               ## @.str.6
	.asciz	"failed to register notifier: %d\n"

	.no_dead_strip	_sc2731_charger_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sc2731_charger_probe
_sc2731_charger_probe:                  ; @sc2731_charger_probe
	.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
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	add	x0, x0, #32
	bl	_mutex_init
	str	x19, [x20, #24]
	add	x0, x20, #20
Lloh3:
	adrp	x8, _sc2731_charger_work@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sc2731_charger_work@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_INIT_WORK
	ldr	w0, [x19]
	mov	x1, #0
	bl	_dev_get_regmap
	str	w0, [x20, #16]
	cbz	w0, LBB0_5
; %bb.2:
	add	x2, x20, #12
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_u32
	cbz	w0, LBB0_9
; %bb.3:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_dev_err
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	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:
	stp	x21, x20, [sp, #16]
Lloh16:
	adrp	x1, _sc2731_charger_desc@GOTPAGE
Lloh17:
	ldr	x1, [x1, _sc2731_charger_desc@GOTPAGEOFF]
	add	x2, sp, #16
	mov	x0, x19
	bl	_devm_power_supply_register
	str	w0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.10:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #8]
LBB0_11:
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_8
LBB0_12:
	mov	x0, x20
	bl	_sc2731_charger_hw_init
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.13:
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	w2, #0
	bl	_devm_usb_get_phy_by_phandle
	str	w0, [x20, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_15
; %bb.14:
Lloh22:
	adrp	x1, l_.str.5@PAGE
Lloh23:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #4]
	b	LBB0_11
LBB0_15:
Lloh24:
	adrp	x8, _sc2731_charger_usb_change@GOTPAGE
Lloh25:
	ldr	x8, [x8, _sc2731_charger_usb_change@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	w8, [x20]
	ldr	w0, [x20, #4]
	mov	x1, x20
	bl	_usb_register_notifier
	mov	x21, x0
	cbz	w0, LBB0_17
; %bb.16:
	str	x21, [sp]
Lloh27:
	adrp	x1, l_.str.6@PAGE
Lloh28:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_8
LBB0_17:
	mov	x0, x20
	bl	_sc2731_charger_detect_status
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_sc2731_charger_work,4,2        ; @sc2731_charger_work
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get charger regmap\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"reg"

l_.str.2:                               ; @.str.2
	.asciz	"failed to get register address\n"

	.comm	_sc2731_charger_desc,4,2        ; @sc2731_charger_desc
l_.str.3:                               ; @.str.3
	.asciz	"failed to register power supply\n"

l_.str.4:                               ; @.str.4
	.asciz	"phys"

l_.str.5:                               ; @.str.5
	.asciz	"failed to find USB phy\n"

	.comm	_sc2731_charger_usb_change,4,2  ; @sc2731_charger_usb_change
l_.str.6:                               ; @.str.6
	.asciz	"failed to register notifier: %d\n"

	.no_dead_strip	_sc2731_charger_probe
.subsections_via_symbols
