	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan78xx_get_endpoints
_lan78xx_get_endpoints:                 ## @lan78xx_get_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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rsi)
	jle	LBB0_23
## %bb.1:
	xorl	%ecx, %ecx
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%edx, %edx
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	movslq	(%rsi), %rax
	cmpq	%rax, %rcx
	jge	LBB0_21
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	8(%rsi), %r14
	movq	%rcx, %rax
	shlq	$4, %rax
	cmpl	$0, 8(%r14,%rax)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%rax), %rcx
	addq	$8, %rcx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	addq	%rax, %r14
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	cmoveq	%rbx, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	-72(%rbp), %r14                 ## 8-byte Reload
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=2
	incq	%r12
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %eax
	addq	$8, %r13
	cmpq	%rax, %r12
	jae	LBB0_18
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14), %rbx
	movl	(%rbx,%r13), %eax
	addq	%r13, %rbx
	cmpl	$129, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	cmpl	$128, %eax
	jne	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%rbx, %rdi
	callq	_usb_endpoint_dir_in
	testq	%rax, %rax
	je	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=2
	movb	$1, %r14b
	xorl	%r15d, %r15d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=2
	movb	$1, %r15b
	xorl	%r14d, %r14d
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%rbx, %rdi
	callq	_usb_endpoint_dir_in
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=2
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	setne	%al
	orb	%al, %r14b
	cmpb	$1, %r14b
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	cmovneq	%rax, %rbx
	testb	%r15b, %r15b
	cmoveq	%rbx, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_2
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_2
LBB0_21:
	testq	%rdx, %rdx
	je	LBB0_23
## %bb.22:
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.24:
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movl	8(%r15), %edi
	movq	_USB_ENDPOINT_NUMBER_MASK@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	andl	4(%rdx), %esi
	callq	_usb_rcvbulkpipe
	movl	%eax, 16(%r15)
	movl	8(%r15), %edi
	movl	(%r14), %esi
	andl	4(%rbx), %esi
	callq	_usb_sndbulkpipe
	movl	%eax, 12(%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_23:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_25:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_USB_ENDPOINT_NUMBER_MASK,4,2   ## @USB_ENDPOINT_NUMBER_MASK
	.no_dead_strip	_lan78xx_get_endpoints
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan78xx_get_endpoints
_lan78xx_get_endpoints:                 ; @lan78xx_get_endpoints
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.1:
	stp	x0, x1, [sp, #8]                ; 16-byte Folded Spill
	mov	x9, #0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, #0
	mov	x23, #0
	mov	x25, #0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	ldrsw	x8, [x1]
	cmp	x9, x8
	b.ge	LBB0_16
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x1, #8]
	add	x26, x8, x9, lsl #4
	mov	x27, x26
	ldr	w8, [x27, #8]!
	cbz	w8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	mov	x28, #0
	mov	x19, #0
	mov	x22, #0
	mov	x23, #0
	mov	x25, #0
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_9 Depth=2
	mov	w24, #0
	mov	w20, #1
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x21
	bl	_usb_endpoint_dir_in
	cmp	x23, #0
	csel	x8, x21, x23, eq
	cmp	x25, #0
	cset	w9, ne
	orr	w9, w24, w9
	cmp	x22, #0
	cset	w10, ne
	orr	w10, w20, w10
	cmp	w10, #0
	csel	x10, x22, x21, ne
	cmp	w9, #1
	csel	x9, x21, x25, ne
	csel	x10, x22, x10, ne
	cmp	x0, #0
	csel	x25, x25, x9, eq
	csel	x23, x8, x23, eq
	csel	x22, x22, x10, eq
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x19, x19, #1
	ldr	w8, [x27]
	add	x28, x28, #8
	cmp	x19, x8
	b.hs	LBB0_13
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	add	x21, x8, x28
	ldr	w8, [x21]
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x21
	bl	_usb_endpoint_dir_in
	cbz	x0, LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	w20, #0
	mov	w24, #1
	b	LBB0_7
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x25, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	ldp	x1, x9, [sp, #16]               ; 16-byte Folded Reload
	cbz	x23, LBB0_3
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x1, x9, [sp, #16]               ; 16-byte Folded Reload
	b	LBB0_3
LBB0_16:
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	cbz	x25, LBB0_19
; %bb.17:
	cbz	x23, LBB0_19
; %bb.18:
	ldr	w0, [x20, #8]
	ldr	w8, [x25, #4]
Lloh0:
	adrp	x19, _USB_ENDPOINT_NUMBER_MASK@GOTPAGE
Lloh1:
	ldr	x19, [x19, _USB_ENDPOINT_NUMBER_MASK@GOTPAGEOFF]
	ldr	w9, [x19]
	and	w1, w9, w8
	bl	_usb_rcvbulkpipe
	str	w0, [x20, #16]
	ldr	w0, [x20, #8]
	ldr	w8, [x23, #4]
	ldr	w9, [x19]
	and	w1, w9, w8
	bl	_usb_sndbulkpipe
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20, #12]
	str	x22, [x20]
	b	LBB0_20
LBB0_19:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_USB_ENDPOINT_NUMBER_MASK,4,2   ; @USB_ENDPOINT_NUMBER_MASK
	.no_dead_strip	_lan78xx_get_endpoints
.subsections_via_symbols
