	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsi_find_bulk_in_and_out_endpoints
_rsi_find_bulk_in_and_out_endpoints:    ## @rsi_find_bulk_in_and_out_endpoints
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %r15
	movq	(%rdi), %r14
	cmpl	$0, 8(%r14)
	jle	LBB0_13
## %bb.1:
	xorl	%edx, %edx
	movl	$8, %esi
	movq	_USB_DIR_IN@GOTPCREL(%rip), %r10
	movq	_USB_ENDPOINT_XFERTYPE_MASK@GOTPCREL(%rip), %r8
	movq	_MAX_BULK_EP@GOTPCREL(%rip), %r11
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	(%r15), %rdi
	movslq	%r13d, %rcx
	cmpl	$0, (%rdi,%rcx,4)
	je	LBB0_4
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rdi
	movslq	%r12d, %rcx
	cmpl	$0, (%rdi,%rcx,4)
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-8(%rax,%rsi), %ebx
	testl	%ebx, (%r10)
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r8, %r9
	movl	(%r8), %r8d
	andl	-4(%rax,%rsi), %r8d
	movq	%r10, %r11
	movq	_USB_ENDPOINT_XFER_BULK@GOTPCREL(%rip), %r10
	cmpl	(%r10), %r8d
	movq	%r11, %r10
	movq	_MAX_BULK_EP@GOTPCREL(%rip), %r11
	movq	%r9, %r8
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rax,%rsi), %rax
	movl	%ebx, (%rdi,%rcx,4)
	movq	16(%r15), %rdi
	movq	%rax, (%rdi,%rcx,8)
	incl	%ecx
	movl	%ecx, %r12d
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r11), %eax
	cmpl	%eax, %r13d
	jge	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%eax, %r12d
	jge	LBB0_13
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	movslq	8(%r14), %rax
	addq	$16, %rsi
	cmpq	%rax, %rdx
	jl	LBB0_3
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-8(%rax,%rsi), %r9d
	testl	%r9d, (%r10)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r8), %ebx
	andl	-4(%rax,%rsi), %ebx
	movq	_USB_ENDPOINT_XFER_BULK@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %ebx
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rax,%rsi), %r13
	movq	24(%r15), %rbx
	movq	%r13, (%rbx,%rcx,8)
	movq	(%r15), %rbx
	movl	%r9d, (%rbx,%rcx,4)
	incl	%ecx
	movl	%ecx, %r13d
	jmp	LBB0_7
LBB0_13:
	movq	(%r15), %rcx
	xorl	%eax, %eax
	cmpl	$0, (%rcx)
	jne	LBB0_16
## %bb.14:
	movq	8(%r15), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_16
## %bb.15:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_USB_ENDPOINT_XFERTYPE_MASK,4,2 ## @USB_ENDPOINT_XFERTYPE_MASK
	.comm	_USB_ENDPOINT_XFER_BULK,4,2     ## @USB_ENDPOINT_XFER_BULK
	.comm	_MAX_BULK_EP,4,2                ## @MAX_BULK_EP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_rsi_find_bulk_in_and_out_endpoints
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsi_find_bulk_in_and_out_endpoints
_rsi_find_bulk_in_and_out_endpoints:    ; @rsi_find_bulk_in_and_out_endpoints
	.cfi_startproc
; %bb.0:
	ldr	x8, [x1]
	ldr	x9, [x0]
	ldr	w10, [x9, #8]
	cmp	w10, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x10, #0
	mov	x11, #0
	mov	w12, #0
	mov	w13, #0
Lloh0:
	adrp	x14, _USB_DIR_IN@GOTPAGE
Lloh1:
	ldr	x14, [x14, _USB_DIR_IN@GOTPAGEOFF]
Lloh2:
	adrp	x15, _USB_ENDPOINT_XFERTYPE_MASK@GOTPAGE
Lloh3:
	ldr	x15, [x15, _USB_ENDPOINT_XFERTYPE_MASK@GOTPAGEOFF]
Lloh4:
	adrp	x16, _USB_ENDPOINT_XFER_BULK@GOTPAGE
Lloh5:
	ldr	x16, [x16, _USB_ENDPOINT_XFER_BULK@GOTPAGEOFF]
Lloh6:
	adrp	x17, _MAX_BULK_EP@GOTPAGE
Lloh7:
	ldr	x17, [x17, _MAX_BULK_EP@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x9]
	ldr	x1, [x8]
	ldr	w1, [x1, w13, sxtw #2]
	cbz	w1, LBB0_9
LBB0_3:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x1, [x8, #8]
	ldr	w2, [x1, w12, sxtw #2]
	cbnz	w2, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x0, x10]
	ldr	w3, [x14]
	tst	w3, w2
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x0, x10
	ldr	w3, [x0, #4]
	ldr	w4, [x15]
	and	w3, w4, w3
	ldr	w4, [x16]
	cmp	w3, w4
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	sxtw	x3, w12
	ldr	x0, [x0, #8]
	str	w2, [x1, x3, lsl #2]
	ldr	x1, [x8, #16]
	str	x0, [x1, x3, lsl #3]
	add	w12, w12, #1
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x17]
	cmp	w13, w0
	ccmp	w12, w0, #0, lt
	b.ge	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x11, x11, #1
	ldrsw	x0, [x9, #8]
	add	x10, x10, #16
	cmp	x11, x0
	b.lt	LBB0_2
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x0, x10]
	ldr	w2, [x14]
	tst	w2, w1
	b.eq	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	add	x2, x0, x10
	ldr	w3, [x2, #4]
	ldr	w4, [x15]
	and	w3, w4, w3
	ldr	w4, [x16]
	cmp	w3, w4
	b.ne	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	sxtw	x3, w13
	ldr	x2, [x2, #8]
	ldr	x4, [x8, #24]
	str	x2, [x4, x3, lsl #3]
	ldr	x2, [x8]
	str	w1, [x2, x3, lsl #2]
	add	w13, w13, #1
	b	LBB0_3
LBB0_12:
	ldr	x9, [x8]
	ldr	w9, [x9]
	cbz	w9, LBB0_14
LBB0_13:
	mov	w0, #0
	ret
LBB0_14:
	ldr	x8, [x8, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_13
; %bb.15:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_USB_ENDPOINT_XFERTYPE_MASK,4,2 ; @USB_ENDPOINT_XFERTYPE_MASK
	.comm	_USB_ENDPOINT_XFER_BULK,4,2     ; @USB_ENDPOINT_XFER_BULK
	.comm	_MAX_BULK_EP,4,2                ; @MAX_BULK_EP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_rsi_find_bulk_in_and_out_endpoints
.subsections_via_symbols
