	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isp1704_test_ulpi
_isp1704_test_ulpi:                     ## @isp1704_test_ulpi
	.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	%rdi, %r14
	movq	_ULPI_SCRATCH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$170, %edx
	callq	_isp1704_write
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_isp1704_read
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_12
## %bb.3:
	cmpl	$170, %r12d
	jne	LBB0_11
## %bb.4:
	movq	_ULPI_VENDOR_ID_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_isp1704_read
	movl	%eax, %ebx
	movq	_ULPI_VENDOR_ID_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_isp1704_read
	shll	$8, %eax
	orl	%ebx, %eax
	movq	_NXP_VENDOR_ID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.5:
	movq	_ULPI_PRODUCT_ID_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_isp1704_read
	movl	%eax, %r15d
	movq	_ULPI_PRODUCT_ID_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_isp1704_read
	movl	%eax, %r12d
	shll	$8, %r12d
	orl	%r15d, %r12d
	movq	_isp170x_id@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_10
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpl	(%rdi,%rbx,4), %r12d
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_10:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_err
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_12
LBB0_1:
	movl	%eax, %r12d
LBB0_12:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_sprintf
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_ULPI_SCRATCH,4,2               ## @ULPI_SCRATCH
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ULPI_VENDOR_ID_LOW,4,2         ## @ULPI_VENDOR_ID_LOW
	.comm	_ULPI_VENDOR_ID_HIGH,4,2        ## @ULPI_VENDOR_ID_HIGH
	.comm	_NXP_VENDOR_ID,4,2              ## @NXP_VENDOR_ID
	.comm	_ULPI_PRODUCT_ID_LOW,4,2        ## @ULPI_PRODUCT_ID_LOW
	.comm	_ULPI_PRODUCT_ID_HIGH,4,2       ## @ULPI_PRODUCT_ID_HIGH
	.comm	_isp170x_id,8,3                 ## @isp170x_id
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"isp%x"

L_.str.1:                               ## @.str.1
	.asciz	"product id %x not matching known ids"

	.no_dead_strip	_isp1704_test_ulpi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isp1704_test_ulpi
_isp1704_test_ulpi:                     ; @isp1704_test_ulpi
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _ULPI_SCRATCH@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ULPI_SCRATCH@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #170
	bl	_isp1704_write
	tbnz	w0, #31, LBB0_10
; %bb.1:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_isp1704_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_11
; %bb.2:
	cmp	w20, #170
	b.ne	LBB0_9
; %bb.3:
Lloh2:
	adrp	x8, _ULPI_VENDOR_ID_LOW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ULPI_VENDOR_ID_LOW@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_isp1704_read
	mov	x20, x0
Lloh5:
	adrp	x8, _ULPI_VENDOR_ID_HIGH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ULPI_VENDOR_ID_HIGH@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_isp1704_read
	orr	w8, w20, w0, lsl #8
Lloh8:
	adrp	x9, _NXP_VENDOR_ID@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NXP_VENDOR_ID@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.4:
Lloh11:
	adrp	x8, _ULPI_PRODUCT_ID_LOW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ULPI_PRODUCT_ID_LOW@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_isp1704_read
	mov	x20, x0
Lloh14:
	adrp	x8, _ULPI_PRODUCT_ID_HIGH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ULPI_PRODUCT_ID_HIGH@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_isp1704_read
	orr	w20, w20, w0, lsl #8
Lloh17:
	adrp	x21, _isp170x_id@GOTPAGE
Lloh18:
	ldr	x21, [x21, _isp170x_id@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	ldr	w8, [x0, x22, lsl #2]
	cmp	w20, w8
	b.eq	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_6
LBB0_8:
	ldr	w0, [x19]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_9:
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_10:
	mov	x20, x0
LBB0_11:
	mov	x0, x20
	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
LBB0_12:
	ldr	w0, [x19, #4]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_sprintf
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ULPI_SCRATCH,4,2               ; @ULPI_SCRATCH
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ULPI_VENDOR_ID_LOW,4,2         ; @ULPI_VENDOR_ID_LOW
	.comm	_ULPI_VENDOR_ID_HIGH,4,2        ; @ULPI_VENDOR_ID_HIGH
	.comm	_NXP_VENDOR_ID,4,2              ; @NXP_VENDOR_ID
	.comm	_ULPI_PRODUCT_ID_LOW,4,2        ; @ULPI_PRODUCT_ID_LOW
	.comm	_ULPI_PRODUCT_ID_HIGH,4,2       ; @ULPI_PRODUCT_ID_HIGH
	.comm	_isp170x_id,8,3                 ; @isp170x_id
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"isp%x"

l_.str.1:                               ; @.str.1
	.asciz	"product id %x not matching known ids"

	.no_dead_strip	_isp1704_test_ulpi
.subsections_via_symbols
