	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_usbhs_rev1_hostconfig
_omap_usbhs_rev1_hostconfig:            ## @omap_usbhs_rev1_hostconfig
	.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
	movl	%esi, %r15d
	movq	8(%rdi), %r13
	movl	(%rdi), %edx
	testl	%edx, %edx
	jle	LBB0_18
## %bb.1:
	movq	%rdi, %r14
	movq	(%r13), %rsi
	movq	_OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	(%rsi), %ecx
	cmpl	$128, %ecx
	je	LBB0_4
## %bb.2:
	movq	_OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$129, %ecx
	jne	LBB0_5
## %bb.3:
	notl	%eax
	xorl	%ecx, %ecx
	cmpq	8(%r13), %rcx
	sbbl	%ecx, %ecx
	orl	%eax, %ecx
	andl	%r15d, %ecx
	movl	%ecx, %r15d
	cmpl	$1, %edx
	je	LBB0_16
	jmp	LBB0_7
LBB0_18:
	cmpq	$0, 8(%r13)
	je	LBB0_23
## %bb.19:
	movq	_OMAP_UHH_HOSTCONFIG_ULPI_BYPASS@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	jmp	LBB0_23
LBB0_4:
	movl	%r8d, %eax
	notl	%eax
	andl	%eax, %r15d
	cmpl	$1, %edx
	je	LBB0_16
	jmp	LBB0_7
LBB0_5:
	xorl	%ecx, %ecx
	cmpq	$0, 8(%r13)
	cmovel	%eax, %ecx
	orl	%ecx, %r15d
	cmpl	$1, %edx
	jne	LBB0_7
LBB0_16:
	cmpq	$0, 8(%r13)
	je	LBB0_23
## %bb.17:
	movq	_OMAP_UHH_HOSTCONFIG_ULPI_BYPASS@GOTPCREL(%rip), %r12
	orl	(%r12), %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_is_ehci_phy_mode
	testq	%rax, %rax
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_21 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_21
	jmp	LBB0_23
LBB0_7:
	movq	_OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	decq	%rdx
	xorl	%eax, %eax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	leal	1(%rax), %ecx
	movl	%r8d, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	notl	%ebx
	andl	%ebx, %r15d
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rax
	cmpq	%rax, %rdx
	je	LBB0_16
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rsi,%rax,4), %ecx
	cmpl	$129, %ecx
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$128, %ecx
	je	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$0, 8(%r13)
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%r9d, %edi
	movl	%eax, %ecx
	shll	%cl, %edi
	orl	%edi, %r15d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$0, 8(%r13)
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%r9d, %edi
	movl	%eax, %ecx
	shll	%cl, %edi
	notl	%edi
	andl	%edi, %r15d
	jmp	LBB0_15
LBB0_22:
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, %r15d
LBB0_23:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS,4,2 ## @OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS
	.comm	_OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS,4,2 ## @OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS
	.comm	_OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS,4,2 ## @OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS
	.comm	_OMAP_UHH_HOSTCONFIG_ULPI_BYPASS,4,2 ## @OMAP_UHH_HOSTCONFIG_ULPI_BYPASS
	.no_dead_strip	_omap_usbhs_rev1_hostconfig
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_usbhs_rev1_hostconfig
_omap_usbhs_rev1_hostconfig:            ; @omap_usbhs_rev1_hostconfig
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	ldr	x21, [x0, #8]
	ldr	w11, [x0]
	cmp	w11, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	x12, [x21]
Lloh0:
	adrp	x8, _OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w10, [x12]
	cmp	w10, #128
	b.eq	LBB0_6
; %bb.2:
Lloh3:
	adrp	x9, _OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w10, #129
	b.ne	LBB0_7
; %bb.3:
	ldr	x10, [x21, #8]
	cmp	x10, #0
	mov	w10, #-1
	csinv	w9, w10, w9, ne
	and	w19, w9, w19
	cmp	w11, #1
	b.eq	LBB0_8
	b	LBB0_12
LBB0_4:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_21
; %bb.5:
Lloh6:
	adrp	x8, _OMAP_UHH_HOSTCONFIG_ULPI_BYPASS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OMAP_UHH_HOSTCONFIG_ULPI_BYPASS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w19, w8, w19
	b	LBB0_21
LBB0_6:
	bic	w19, w19, w8
	cmp	w11, #1
	b.eq	LBB0_8
	b	LBB0_12
LBB0_7:
	ldr	x10, [x21, #8]
	cmp	x10, #0
	csel	w9, w9, wzr, eq
	orr	w19, w9, w19
	cmp	w11, #1
	b.ne	LBB0_12
LBB0_8:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_21
; %bb.9:
	mov	x22, #0
Lloh9:
	adrp	x23, _OMAP_UHH_HOSTCONFIG_ULPI_BYPASS@GOTPAGE
Lloh10:
	ldr	x23, [x23, _OMAP_UHH_HOSTCONFIG_ULPI_BYPASS@GOTPAGEOFF]
	ldr	w8, [x23]
	orr	w19, w8, w19
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w0, [x8, x22, lsl #2]
	bl	_is_ehci_phy_mode
	cbnz	x0, LBB0_20
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x20]
	cmp	x22, x8
	b.lt	LBB0_10
	b	LBB0_21
LBB0_12:
	mov	x9, #0
Lloh11:
	adrp	x10, _OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS@GOTPAGE
Lloh12:
	ldr	x10, [x10, _OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	add	x12, x12, #4
	sub	x11, x11, #1
	b	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	x13, [x21, #8]
	lsl	w14, w10, w9
	orr	w14, w14, w19
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	cmp	x13, #0
	csel	w19, w19, w14, ne
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x9, x9, #1
	cmp	x11, x9
	b.eq	LBB0_8
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x12, x9, lsl #2]
	cmp	w13, #129
	b.eq	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	cmp	w13, #128
	b.ne	LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w13, w9, #1
	lsl	w13, w8, w13
	bic	w19, w19, w13
	b	LBB0_15
LBB0_19:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	x13, [x21, #8]
	lsl	w14, w10, w9
	bic	w14, w19, w14
	b	LBB0_14
LBB0_20:
	ldr	w8, [x23]
	bic	w19, w19, w8
LBB0_21:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS,4,2 ; @OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS
	.comm	_OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS,4,2 ; @OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS
	.comm	_OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS,4,2 ; @OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS
	.comm	_OMAP_UHH_HOSTCONFIG_ULPI_BYPASS,4,2 ; @OMAP_UHH_HOSTCONFIG_ULPI_BYPASS
	.no_dead_strip	_omap_usbhs_rev1_hostconfig
.subsections_via_symbols
