	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_USB2422_Port_Detect_Init       ## -- Begin function USB2422_Port_Detect_Init
	.p2align	4, 0x90
_USB2422_Port_Detect_Init:              ## @USB2422_Port_Detect_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_DC_PORT_DETECT_INIT_BEGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DBGC
	xorl	%eax, %eax
	callq	_USB_set_host_by_voltage
	xorl	%eax, %eax
	callq	_timer_read64
	movl	%eax, %r14d
	movq	_PORT_DETECT_RETRY_INTERVAL@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	movq	_DC_PORT_DETECT_INIT_COMPLETE@GOTPCREL(%rip), %r15
	movq	_DC_PORT_DETECT_INIT_FAILED@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_USB_active
	testl	%eax, %eax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_timer_read64
	xorl	%eax, %eax
	callq	_timer_read64
	cmpl	%r14d, %eax
	jle	LBB0_1
## %bb.4:
	movq	%r12, %r15
	jmp	LBB0_5
LBB0_2:
	movl	$1, %ebx
LBB0_5:
	movl	(%r15), %edi
	callq	_DBGC
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DC_PORT_DETECT_INIT_BEGIN,4,2  ## @DC_PORT_DETECT_INIT_BEGIN
	.comm	_PORT_DETECT_RETRY_INTERVAL,4,2 ## @PORT_DETECT_RETRY_INTERVAL
	.comm	_v_con_1,8,3                    ## @v_con_1
	.comm	_v_con_2,8,3                    ## @v_con_2
	.comm	_DBG_LED_ON,4,2                 ## @DBG_LED_ON
	.comm	_DBG_LED_OFF,4,2                ## @DBG_LED_OFF
	.comm	_DC_PORT_DETECT_INIT_FAILED,4,2 ## @DC_PORT_DETECT_INIT_FAILED
	.comm	_DC_PORT_DETECT_INIT_COMPLETE,4,2 ## @DC_PORT_DETECT_INIT_COMPLETE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_USB2422_Port_Detect_Init       ; -- Begin function USB2422_Port_Detect_Init
	.p2align	2
_USB2422_Port_Detect_Init:              ; @USB2422_Port_Detect_Init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _DC_PORT_DETECT_INIT_BEGIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DC_PORT_DETECT_INIT_BEGIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_DBGC
	bl	_USB_set_host_by_voltage
	bl	_timer_read64
Lloh3:
	adrp	x8, _PORT_DETECT_RETRY_INTERVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PORT_DETECT_RETRY_INTERVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w19, w8, w0
Lloh6:
	adrp	x20, _DC_PORT_DETECT_INIT_COMPLETE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _DC_PORT_DETECT_INIT_COMPLETE@GOTPAGEOFF]
Lloh8:
	adrp	x21, _DC_PORT_DETECT_INIT_FAILED@GOTPAGE
Lloh9:
	ldr	x21, [x21, _DC_PORT_DETECT_INIT_FAILED@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_USB_active
	cbnz	w0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_timer_read64
	bl	_timer_read64
	cmp	w0, w19
	b.le	LBB0_1
; %bb.3:
	mov	w19, #0
	mov	x20, x21
	b	LBB0_5
LBB0_4:
	mov	w19, #1
LBB0_5:
	ldr	w0, [x20]
	bl	_DBGC
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DC_PORT_DETECT_INIT_BEGIN,4,2  ; @DC_PORT_DETECT_INIT_BEGIN
	.comm	_PORT_DETECT_RETRY_INTERVAL,4,2 ; @PORT_DETECT_RETRY_INTERVAL
	.comm	_v_con_1,8,3                    ; @v_con_1
	.comm	_v_con_2,8,3                    ; @v_con_2
	.comm	_DBG_LED_ON,4,2                 ; @DBG_LED_ON
	.comm	_DBG_LED_OFF,4,2                ; @DBG_LED_OFF
	.comm	_DC_PORT_DETECT_INIT_FAILED,4,2 ; @DC_PORT_DETECT_INIT_FAILED
	.comm	_DC_PORT_DETECT_INIT_COMPLETE,4,2 ; @DC_PORT_DETECT_INIT_COMPLETE
.subsections_via_symbols
