	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isp1704_charger_verify
_isp1704_charger_verify:                ## @isp1704_charger_verify
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_ULPI_FUNC_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_isp1704_read
	movl	%eax, %ebx
	movq	_ULPI_FUNC_CTRL_RESET@GOTPCREL(%rip), %r13
	orl	(%r13), %ebx
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_isp1704_write
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	_ULPI_FUNC_CTRL_OPMODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r13), %edx
	notl	%edx
	andl	%ebx, %edx
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_isp1704_write
	movq	_ULPI_OTG_CTRL_DP_PULLDOWN@GOTPCREL(%rip), %rax
	movq	_ULPI_OTG_CTRL_DM_PULLDOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_ULPI_OTG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ULPI_CLR
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_isp1704_write
	movq	_ULPI_FUNC_CTRL_TERMSELECT@GOTPCREL(%rip), %r12
	movl	(%r13), %ebx
	orl	(%r12), %ebx
	movl	(%r15), %edi
	callq	_ULPI_SET
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_isp1704_write
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	_ULPI_DEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_isp1704_read
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_ISP1704_PWR_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_ULPI_SET
	movq	_ISP1704_PWR_CTRL_DP_WKPU_EN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_isp1704_write
	movq	_ULPI_FUNC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ULPI_CLR
	movq	_ULPI_FUNC_CTRL_TERMSELECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_isp1704_write
	movq	_ULPI_OTG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ULPI_SET
	movq	_ULPI_OTG_CTRL_DM_PULLDOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_isp1704_write
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_isp1704_read
	xorl	%ebx, %ebx
	testl	%eax, %eax
	sete	%bl
	jmp	LBB0_3
LBB0_1:
	movl	$1, %ebx
LBB0_3:
	movl	(%r15), %edi
	callq	_ULPI_CLR
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_isp1704_write
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ULPI_FUNC_CTRL,4,2             ## @ULPI_FUNC_CTRL
	.comm	_ULPI_FUNC_CTRL_RESET,4,2       ## @ULPI_FUNC_CTRL_RESET
	.comm	_ULPI_FUNC_CTRL_OPMODE_MASK,4,2 ## @ULPI_FUNC_CTRL_OPMODE_MASK
	.comm	_ULPI_OTG_CTRL_DP_PULLDOWN,4,2  ## @ULPI_OTG_CTRL_DP_PULLDOWN
	.comm	_ULPI_OTG_CTRL_DM_PULLDOWN,4,2  ## @ULPI_OTG_CTRL_DM_PULLDOWN
	.comm	_ULPI_OTG_CTRL,4,2              ## @ULPI_OTG_CTRL
	.comm	_ULPI_FUNC_CTRL_TERMSELECT,4,2  ## @ULPI_FUNC_CTRL_TERMSELECT
	.comm	_ULPI_DEBUG,4,2                 ## @ULPI_DEBUG
	.comm	_ISP1704_PWR_CTRL,4,2           ## @ISP1704_PWR_CTRL
	.comm	_ISP1704_PWR_CTRL_DP_WKPU_EN,4,2 ## @ISP1704_PWR_CTRL_DP_WKPU_EN
	.no_dead_strip	_isp1704_charger_verify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isp1704_charger_verify
_isp1704_charger_verify:                ; @isp1704_charger_verify
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x21, _ULPI_FUNC_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ULPI_FUNC_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_isp1704_read
Lloh2:
	adrp	x25, _ULPI_FUNC_CTRL_RESET@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ULPI_FUNC_CTRL_RESET@GOTPAGEOFF]
	ldr	w8, [x25]
	orr	w20, w8, w0
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_isp1704_write
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w8, [x25]
Lloh4:
	adrp	x9, _ULPI_FUNC_CTRL_OPMODE_MASK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ULPI_FUNC_CTRL_OPMODE_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w2, w20, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_isp1704_write
Lloh7:
	adrp	x8, _ULPI_OTG_CTRL_DP_PULLDOWN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ULPI_OTG_CTRL_DP_PULLDOWN@GOTPAGEOFF]
Lloh9:
	adrp	x22, _ULPI_OTG_CTRL_DM_PULLDOWN@GOTPAGE
Lloh10:
	ldr	x22, [x22, _ULPI_OTG_CTRL_DM_PULLDOWN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w20, w9, w8
Lloh12:
	adrp	x24, _ULPI_OTG_CTRL@GOTPAGE
Lloh13:
	ldr	x24, [x24, _ULPI_OTG_CTRL@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_ULPI_CLR
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_isp1704_write
Lloh14:
	adrp	x23, _ULPI_FUNC_CTRL_TERMSELECT@GOTPAGE
Lloh15:
	ldr	x23, [x23, _ULPI_FUNC_CTRL_TERMSELECT@GOTPAGEOFF]
	ldr	w8, [x23]
	ldr	w9, [x25]
	orr	w20, w9, w8
	ldr	w0, [x21]
	bl	_ULPI_SET
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_isp1704_write
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
Lloh16:
	adrp	x20, _ULPI_DEBUG@GOTPAGE
Lloh17:
	ldr	x20, [x20, _ULPI_DEBUG@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_isp1704_read
	cbz	w0, LBB0_2
; %bb.1:
Lloh18:
	adrp	x25, _ISP1704_PWR_CTRL@GOTPAGE
Lloh19:
	ldr	x25, [x25, _ISP1704_PWR_CTRL@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_ULPI_SET
	mov	x1, x0
Lloh20:
	adrp	x26, _ISP1704_PWR_CTRL_DP_WKPU_EN@GOTPAGE
Lloh21:
	ldr	x26, [x26, _ISP1704_PWR_CTRL_DP_WKPU_EN@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x19
	bl	_isp1704_write
	ldr	w0, [x21]
	bl	_ULPI_CLR
	mov	x1, x0
	ldr	w2, [x23]
	mov	x0, x19
	bl	_isp1704_write
	ldr	w0, [x24]
	bl	_ULPI_SET
	mov	x1, x0
	ldr	w2, [x22]
	mov	x0, x19
	bl	_isp1704_write
	ldr	w1, [x20]
	mov	x0, x19
	bl	_isp1704_read
	cmp	w0, #0
	cset	w20, eq
	mov	x21, x25
	mov	x23, x26
	b	LBB0_3
LBB0_2:
	mov	w20, #1
LBB0_3:
	ldr	w0, [x21]
	bl	_ULPI_CLR
	mov	x1, x0
	ldr	w2, [x23]
	mov	x0, x19
	bl	_isp1704_write
	mov	x0, x20
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ULPI_FUNC_CTRL,4,2             ; @ULPI_FUNC_CTRL
	.comm	_ULPI_FUNC_CTRL_RESET,4,2       ; @ULPI_FUNC_CTRL_RESET
	.comm	_ULPI_FUNC_CTRL_OPMODE_MASK,4,2 ; @ULPI_FUNC_CTRL_OPMODE_MASK
	.comm	_ULPI_OTG_CTRL_DP_PULLDOWN,4,2  ; @ULPI_OTG_CTRL_DP_PULLDOWN
	.comm	_ULPI_OTG_CTRL_DM_PULLDOWN,4,2  ; @ULPI_OTG_CTRL_DM_PULLDOWN
	.comm	_ULPI_OTG_CTRL,4,2              ; @ULPI_OTG_CTRL
	.comm	_ULPI_FUNC_CTRL_TERMSELECT,4,2  ; @ULPI_FUNC_CTRL_TERMSELECT
	.comm	_ULPI_DEBUG,4,2                 ; @ULPI_DEBUG
	.comm	_ISP1704_PWR_CTRL,4,2           ; @ISP1704_PWR_CTRL
	.comm	_ISP1704_PWR_CTRL_DP_WKPU_EN,4,2 ; @ISP1704_PWR_CTRL_DP_WKPU_EN
	.no_dead_strip	_isp1704_charger_verify
.subsections_via_symbols
