	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpcap_charger_probe
_cpcap_charger_probe:                   ## @cpcap_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	$0, -32(%rbp)
	movq	_cpcap_charger_id_table@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_of_match_ptr
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_of_match_device
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r14
	movq	%r15, 8(%rax)
	movl	4(%r15), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_dev_get_regmap
	movl	%eax, 36(%r14)
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:
	leaq	32(%r14), %rdi
	callq	_INIT_LIST_HEAD
	movq	_cpcap_usb_detect@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_INIT_DELAYED_WORK
	leaq	28(%r14), %rdi
	movq	_cpcap_charger_vbus_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	callq	_cpcap_charger_init_iio
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	leaq	24(%r14), %rdi
	movl	$1, %esi
	callq	_atomic_set
	movl	(%r15), %eax
	movl	%eax, -32(%rbp)
	movq	%r14, -40(%rbp)
	movq	8(%r14), %rdi
	movq	_cpcap_charger_usb_desc@GOTPCREL(%rip), %rsi
	leaq	-40(%rbp), %rdx
	callq	_devm_power_supply_register
	movl	%eax, 20(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movl	20(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_10
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_12:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_cpcap_usb_init_interrupts
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.13:
	movq	_cpcap_charger_set_vbus@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r14, %rdi
	addq	$16, %rdi
	movl	%eax, 16(%r14)
	callq	_omap_usb2_set_comparator
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_15
## %bb.14:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_15:
	movq	%r14, %rdi
	callq	_cpcap_charger_init_optional_gpios
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_schedule_delayed_work
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_cpcap_charger_id_table,4,2     ## @cpcap_charger_id_table
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_cpcap_usb_detect,4,2           ## @cpcap_usb_detect
	.comm	_cpcap_charger_vbus_work,4,2    ## @cpcap_charger_vbus_work
	.comm	_cpcap_charger_usb_desc,4,2     ## @cpcap_charger_usb_desc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to register USB charger: %i\n"

	.comm	_cpcap_charger_set_vbus,4,2     ## @cpcap_charger_set_vbus
L_.str.1:                               ## @.str.1
	.asciz	"charger needs phy, deferring probe\n"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.no_dead_strip	_cpcap_charger_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpcap_charger_probe
_cpcap_charger_probe:                   ; @cpcap_charger_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _cpcap_charger_id_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cpcap_charger_id_table@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_of_match_ptr
	mov	x1, x20
	bl	_of_match_device
	cbz	x0, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x19, x0
	str	x20, [x0, #8]
	ldr	w0, [x20, #4]
	mov	x1, #0
	bl	_dev_get_regmap
	str	w0, [x19, #36]
	cbz	w0, LBB0_8
; %bb.3:
	add	x0, x19, #32
	bl	_INIT_LIST_HEAD
Lloh6:
	adrp	x8, _cpcap_usb_detect@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cpcap_usb_detect@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_INIT_DELAYED_WORK
	add	x0, x19, #28
Lloh9:
	adrp	x8, _cpcap_charger_vbus_work@GOTPAGE
Lloh10:
	ldr	x8, [x8, _cpcap_charger_vbus_work@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	mov	x0, x19
	bl	_cpcap_charger_init_iio
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.4:
	add	x0, x19, #24
	mov	w1, #1
	bl	_atomic_set
	ldr	w8, [x20]
	str	w8, [sp, #8]
	str	x19, [sp]
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x1, _cpcap_charger_usb_desc@GOTPAGE
Lloh13:
	ldr	x1, [x1, _cpcap_charger_usb_desc@GOTPAGEOFF]
	mov	x2, sp
	bl	_devm_power_supply_register
	str	w0, [x19, #20]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.5:
	ldr	w0, [x19, #20]
	bl	_PTR_ERR
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_10
LBB0_6:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	bl	_cpcap_usb_init_interrupts
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.12:
Lloh22:
	adrp	x8, _cpcap_charger_set_vbus@GOTPAGE
Lloh23:
	ldr	x8, [x8, _cpcap_charger_set_vbus@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	mov	x0, x19
	str	w8, [x0, #16]!
	bl	_omap_usb2_set_comparator
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_14
; %bb.13:
	ldr	x0, [x19, #8]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
Lloh30:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
	b	LBB0_9
LBB0_14:
	mov	x0, x19
	bl	_cpcap_charger_init_optional_gpios
	mov	x0, x19
	mov	w1, #0
	bl	_schedule_delayed_work
	mov	w21, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_cpcap_charger_id_table,4,2     ; @cpcap_charger_id_table
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_cpcap_usb_detect,4,2           ; @cpcap_usb_detect
	.comm	_cpcap_charger_vbus_work,4,2    ; @cpcap_charger_vbus_work
	.comm	_cpcap_charger_usb_desc,4,2     ; @cpcap_charger_usb_desc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to register USB charger: %i\n"

	.comm	_cpcap_charger_set_vbus,4,2     ; @cpcap_charger_set_vbus
l_.str.1:                               ; @.str.1
	.asciz	"charger needs phy, deferring probe\n"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.no_dead_strip	_cpcap_charger_probe
.subsections_via_symbols
