	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fjes_hw_wait_epstop            ## -- Begin function fjes_hw_wait_epstop
	.p2align	4, 0x90
_fjes_hw_wait_epstop:                   ## @fjes_hw_wait_epstop
	.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, %r15
	leaq	8(%rdi), %r14
	xorl	%r12d, %r12d
	cmpl	$0, 8(%rdi)
	movq	_FJES_COMMAND_EPSTOP_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	je	LBB0_12
## %bb.1:
	testl	%eax, %eax
	jle	LBB0_12
## %bb.2:
	xorl	%r12d, %r12d
	movq	_FJES_RX_STOP_REQ_DONE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	cmpl	$0, (%r15)
	jle	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_11
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	4(%r15), %eax
	cmpq	%rax, %rbx
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	12(%r15), %edi
	movl	%ebx, %esi
	callq	_fjes_hw_epid_is_shared
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	16(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%r13), %ecx
	testl	%ecx, (%rax)
	je	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_clear_bit
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	$100, %edi
	callq	_msleep
	addl	$100, %r12d
	movq	_FJES_COMMAND_EPSTOP_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$0, (%r14)
	je	LBB0_12
## %bb.20:                              ##   in Loop: Header=BB0_3 Depth=1
	imull	$1000, %eax, %ecx               ## imm = 0x3E8
	cmpl	%ecx, %r12d
	jl	LBB0_3
LBB0_12:
	cmpl	$0, (%r15)
	jle	LBB0_19
## %bb.13:
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jge	LBB0_18
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpl	4(%r15), %ebx
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_clear_bit
	jmp	LBB0_17
LBB0_18:
	movq	_FJES_COMMAND_EPSTOP_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_19:
	imull	$1000, %eax, %ecx               ## imm = 0x3E8
	movq	_EBUSY@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	xorl	%edx, %edx
	cmpl	%ecx, %r12d
	cmovll	%edx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FJES_COMMAND_EPSTOP_WAIT_TIMEOUT,4,2 ## @FJES_COMMAND_EPSTOP_WAIT_TIMEOUT
	.comm	_FJES_RX_STOP_REQ_DONE,4,2      ## @FJES_RX_STOP_REQ_DONE
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fjes_hw_wait_epstop            ; -- Begin function fjes_hw_wait_epstop
	.p2align	2
_fjes_hw_wait_epstop:                   ; @fjes_hw_wait_epstop
	.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
	mov	x20, x0
	ldr	w9, [x20, #8]!
Lloh0:
	adrp	x22, _FJES_COMMAND_EPSTOP_WAIT_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FJES_COMMAND_EPSTOP_WAIT_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w9, #0
	mov	w23, #0
	ccmp	w8, #1, #8, ne
	b.ge	LBB0_9
LBB0_1:
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.2:
	mov	w21, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w21, w21, #1
	ldr	w8, [x19]
	cmp	w21, w8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #4]
	cmp	w21, w8
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_clear_bit
	b	LBB0_3
LBB0_7:
	ldr	w8, [x22]
LBB0_8:
	mov	w9, #1000
	mul	w8, w8, w9
Lloh2:
	adrp	x9, _EBUSY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w23, w8
	csneg	w0, wzr, w9, lt
	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
LBB0_9:
Lloh5:
	adrp	x24, _FJES_RX_STOP_REQ_DONE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _FJES_RX_STOP_REQ_DONE@GOTPAGEOFF]
	mov	w25, #1000
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #100
	bl	_msleep
	add	w23, w23, #100
	ldr	w9, [x20]
	ldr	w8, [x22]
	mul	w10, w8, w25
	cmp	w9, #0
	ccmp	w23, w10, #0, ne
	b.ge	LBB0_1
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x21, #0
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.ge	LBB0_10
LBB0_14:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x19, #4]
	cmp	x21, x8
	b.eq	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	w0, [x19, #12]
	mov	x1, x21
	bl	_fjes_hw_epid_is_shared
	cbz	w0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w8, [x8]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_13
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=2
	mov	x0, x21
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=2
	mov	x0, x21
	mov	x1, x20
	bl	_clear_bit
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_FJES_COMMAND_EPSTOP_WAIT_TIMEOUT,4,2 ; @FJES_COMMAND_EPSTOP_WAIT_TIMEOUT
	.comm	_FJES_RX_STOP_REQ_DONE,4,2      ; @FJES_RX_STOP_REQ_DONE
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
