	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isp1704_charger_probe
_isp1704_charger_probe:                 ## @isp1704_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	$0, -40(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$80, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	_GPIOD_OUT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 72(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	72(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_4:
	cmpq	$0, (%r14)
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_devm_usb_get_phy_by_phandle
	jmp	LBB0_7
LBB0_6:
	movq	_USB_PHY_TYPE_USB2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_devm_usb_get_phy
LBB0_7:
	movq	%rax, 16(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	16(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_11:
	movq	%r14, 32(%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_isp1704_charger_set_power
	movq	%r15, %rdi
	callq	_isp1704_test_ulpi
	testl	%eax, %eax
	js	LBB0_12
## %bb.14:
	leaq	48(%r15), %rbx
	leaq	L_.str.5(%rip), %rax
	movq	%rax, 48(%r15)
	movq	_POWER_SUPPLY_TYPE_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%r15)
	movq	_power_props@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 64(%r15)
	callq	_ARRAY_SIZE
	movl	%eax, 60(%r15)
	movq	_isp1704_charger_get_property@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r15)
	movq	%r15, -40(%rbp)
	movq	32(%r15), %rdi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_power_supply_register
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_13
LBB0_12:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
LBB0_13:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_18:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_isp1704_charger_set_power
LBB0_9:
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
LBB0_10:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_26:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leaq	8(%r15), %r12
	movq	_isp1704_charger_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_INIT_WORK
	movq	_isp1704_notifier_call@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r15, %rsi
	addq	$40, %rsi
	movl	%eax, 40(%r15)
	movq	16(%r15), %rdi
	callq	_usb_register_notifier
	testl	%eax, %eax
	je	LBB0_19
## %bb.17:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	(%r15), %rdi
	callq	_power_supply_unregister
	jmp	LBB0_18
LBB0_19:
	movq	32(%r15), %rdi
	movl	24(%r15), %edx
	leaq	L_.str.8(%rip), %rsi
	callq	_dev_info
	movq	16(%r15), %rax
	movq	8(%rax), %rcx
	movq	8(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.20:
	callq	_usb_gadget_disconnect
	movq	16(%r15), %rax
LBB0_21:
	movq	(%rax), %rcx
	movq	_USB_EVENT_NONE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_23
## %bb.22:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_isp1704_charger_set_power
	movq	16(%r15), %rax
	movq	(%rax), %rcx
LBB0_23:
	movq	_USB_EVENT_VBUS@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	cmpq	(%rdx), %rcx
	jne	LBB0_26
## %bb.24:
	movq	8(%rax), %rax
	cmpl	$0, (%rax)
	jne	LBB0_26
## %bb.25:
	movq	%r12, %rdi
	callq	_schedule_work
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nxp,enable"

	.comm	_GPIOD_OUT_HIGH,4,2             ## @GPIOD_OUT_HIGH
L_.str.1:                               ## @.str.1
	.asciz	"Could not get reset gpio: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"usb-phy"

	.comm	_USB_PHY_TYPE_USB2,4,2          ## @USB_PHY_TYPE_USB2
L_.str.3:                               ## @.str.3
	.asciz	"usb_get_phy failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"isp1704_test_ulpi failed\n"

L_.str.5:                               ## @.str.5
	.asciz	"isp1704"

	.comm	_POWER_SUPPLY_TYPE_USB,4,2      ## @POWER_SUPPLY_TYPE_USB
	.comm	_power_props,4,2                ## @power_props
	.comm	_isp1704_charger_get_property,4,2 ## @isp1704_charger_get_property
L_.str.6:                               ## @.str.6
	.asciz	"power_supply_register failed\n"

	.comm	_isp1704_charger_work,4,2       ## @isp1704_charger_work
	.comm	_isp1704_notifier_call,4,2      ## @isp1704_notifier_call
L_.str.7:                               ## @.str.7
	.asciz	"usb_register_notifier failed\n"

L_.str.8:                               ## @.str.8
	.asciz	"registered with product id %s\n"

	.comm	_USB_EVENT_NONE,8,3             ## @USB_EVENT_NONE
	.comm	_USB_EVENT_VBUS,8,3             ## @USB_EVENT_VBUS
L_.str.9:                               ## @.str.9
	.asciz	"failed to register isp1704 with error %d\n"

	.no_dead_strip	_isp1704_charger_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isp1704_charger_probe
_isp1704_charger_probe:                 ; @isp1704_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	x19, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #80
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _GPIOD_OUT_HIGH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPIOD_OUT_HIGH@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x20, #72]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x0, [x20, #72]
	bl	_PTR_ERR
	mov	x22, x0
	str	x22, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_16
LBB0_3:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_4:
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w2, #0
	bl	_devm_usb_get_phy_by_phandle
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _USB_PHY_TYPE_USB2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _USB_PHY_TYPE_USB2@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_devm_usb_get_phy
LBB0_7:
	str	x0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
	ldr	x0, [x20, #16]
	bl	_PTR_ERR
	mov	x22, x0
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_15
LBB0_9:
	str	x19, [x20, #32]
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x20
	mov	w1, #1
	bl	_isp1704_charger_set_power
	mov	x0, x20
	bl	_isp1704_test_ulpi
	tbnz	w0, #31, LBB0_12
; %bb.10:
Lloh20:
	adrp	x8, l_.str.5@PAGE
Lloh21:
	add	x8, x8, l_.str.5@PAGEOFF
	mov	x21, x20
	str	x8, [x21, #48]!
Lloh22:
	adrp	x8, _POWER_SUPPLY_TYPE_USB@GOTPAGE
Lloh23:
	ldr	x8, [x8, _POWER_SUPPLY_TYPE_USB@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _power_props@GOTPAGE
Lloh26:
	ldr	x9, [x9, _power_props@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x9]
	stp	w0, w8, [x20, #64]
	bl	_ARRAY_SIZE
Lloh28:
	adrp	x8, _isp1704_charger_get_property@GOTPAGE
Lloh29:
	ldr	x8, [x8, _isp1704_charger_get_property@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	stp	w8, w0, [x20, #56]
	str	x20, [sp, #8]
	ldr	x0, [x20, #32]
	add	x2, sp, #8
	mov	x1, x21
	bl	_power_supply_register
	str	x0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_17
; %bb.11:
	ldr	x0, [x20]
	bl	_PTR_ERR
	mov	x22, x0
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_13
LBB0_12:
	mov	x22, x0
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_dev_err
LBB0_14:
	mov	x0, x20
	mov	w1, #0
	bl	_isp1704_charger_set_power
LBB0_15:
	str	x22, [sp]
Lloh35:
	adrp	x1, l_.str.9@PAGE
Lloh36:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_16:
	mov	x0, x22
	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_17:
	add	x21, x20, #8
Lloh37:
	adrp	x8, _isp1704_charger_work@GOTPAGE
Lloh38:
	ldr	x8, [x8, _isp1704_charger_work@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_INIT_WORK
Lloh40:
	adrp	x8, _isp1704_notifier_call@GOTPAGE
Lloh41:
	ldr	x8, [x8, _isp1704_notifier_call@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	mov	x1, x20
	str	w8, [x1, #40]!
	ldur	x0, [x1, #-24]
	bl	_usb_register_notifier
	cbz	w0, LBB0_19
; %bb.18:
	mov	x22, x0
Lloh43:
	adrp	x1, l_.str.7@PAGE
Lloh44:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20]
	bl	_power_supply_unregister
	b	LBB0_14
LBB0_19:
	ldr	x0, [x20, #32]
	ldr	w2, [x20, #24]
Lloh45:
	adrp	x1, l_.str.8@PAGE
Lloh46:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_info
	ldr	x8, [x20, #16]
	ldr	x9, [x8, #8]
	ldr	x0, [x9, #8]
	cbz	x0, LBB0_21
; %bb.20:
	bl	_usb_gadget_disconnect
	ldr	x8, [x20, #16]
LBB0_21:
	ldr	x9, [x8]
Lloh47:
	adrp	x10, _USB_EVENT_NONE@GOTPAGE
Lloh48:
	ldr	x10, [x10, _USB_EVENT_NONE@GOTPAGEOFF]
Lloh49:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_23
; %bb.22:
	mov	x0, x20
	mov	w1, #0
	bl	_isp1704_charger_set_power
	ldr	x8, [x20, #16]
	ldr	x9, [x8]
LBB0_23:
Lloh50:
	adrp	x10, _USB_EVENT_VBUS@GOTPAGE
Lloh51:
	ldr	x10, [x10, _USB_EVENT_VBUS@GOTPAGEOFF]
Lloh52:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_26
; %bb.24:
	ldr	x8, [x8, #8]
	ldr	w8, [x8]
	cbnz	w8, LBB0_26
; %bb.25:
	mov	x0, x21
	bl	_schedule_work
LBB0_26:
	mov	w22, #0
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nxp,enable"

	.comm	_GPIOD_OUT_HIGH,4,2             ; @GPIOD_OUT_HIGH
l_.str.1:                               ; @.str.1
	.asciz	"Could not get reset gpio: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"usb-phy"

	.comm	_USB_PHY_TYPE_USB2,4,2          ; @USB_PHY_TYPE_USB2
l_.str.3:                               ; @.str.3
	.asciz	"usb_get_phy failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"isp1704_test_ulpi failed\n"

l_.str.5:                               ; @.str.5
	.asciz	"isp1704"

	.comm	_POWER_SUPPLY_TYPE_USB,4,2      ; @POWER_SUPPLY_TYPE_USB
	.comm	_power_props,4,2                ; @power_props
	.comm	_isp1704_charger_get_property,4,2 ; @isp1704_charger_get_property
l_.str.6:                               ; @.str.6
	.asciz	"power_supply_register failed\n"

	.comm	_isp1704_charger_work,4,2       ; @isp1704_charger_work
	.comm	_isp1704_notifier_call,4,2      ; @isp1704_notifier_call
l_.str.7:                               ; @.str.7
	.asciz	"usb_register_notifier failed\n"

l_.str.8:                               ; @.str.8
	.asciz	"registered with product id %s\n"

	.comm	_USB_EVENT_NONE,8,3             ; @USB_EVENT_NONE
	.comm	_USB_EVENT_VBUS,8,3             ; @USB_EVENT_VBUS
l_.str.9:                               ; @.str.9
	.asciz	"failed to register isp1704 with error %d\n"

	.no_dead_strip	_isp1704_charger_probe
.subsections_via_symbols
