	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_get_descriptor_by_endpoint ## -- Begin function usb_get_descriptor_by_endpoint
	.p2align	4, 0x90
_usb_get_descriptor_by_endpoint:        ## @usb_get_descriptor_by_endpoint
	.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	%r9d, %r13d
	movq	%r8, %r14
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	%r8, %rdi
	xorl	%esi, %esi
	movl	%r9d, %edx
	callq	_memset
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	cmpl	$65535, %r13d                   ## imm = 0xFFFF
	movl	$65535, %eax                    ## imm = 0xFFFF
	cmovll	%r13d, %eax
	movq	_USB_ENDPOINT_IN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r15d
	movq	_USB_REQ_GET_DESCRIPTOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	shll	$8, %ebx
	addl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	movq	%r14, %r9
	pushq	$1000                           ## imm = 0x3E8
	pushq	%rax
	callq	_usb_control_msg
	addq	$24, %rsp
	jmp	LBB0_3
LBB0_2:
	movl	$-1, %eax
	addq	$8, %rsp
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_ENDPOINT_IN,4,2            ## @USB_ENDPOINT_IN
	.comm	_USB_REQ_GET_DESCRIPTOR,4,2     ## @USB_REQ_GET_DESCRIPTOR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_get_descriptor_by_endpoint ; -- Begin function usb_get_descriptor_by_endpoint
	.p2align	2
_usb_get_descriptor_by_endpoint:        ; @usb_get_descriptor_by_endpoint
	.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	x23, x5
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x24, x1
	mov	x20, x0
	mov	x0, x4
	mov	w1, #0
	mov	x2, x5
	bl	_memset
	cbz	x20, LBB0_2
; %bb.1:
	mov	w8, #65535
	cmp	w23, w8
	csel	w6, w23, w8, lt
Lloh0:
	adrp	x8, _USB_ENDPOINT_IN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USB_ENDPOINT_IN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w1, w8, w24
Lloh3:
	adrp	x8, _USB_REQ_GET_DESCRIPTOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_REQ_GET_DESCRIPTOR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	w3, w21, w22, lsl #8
	mov	x0, x20
	mov	w4, #0
	mov	x5, x19
	mov	w7, #1000
	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
	b	_usb_control_msg
LBB0_2:
	mov	w0, #-1
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_ENDPOINT_IN,4,2            ; @USB_ENDPOINT_IN
	.comm	_USB_REQ_GET_DESCRIPTOR,4,2     ; @USB_REQ_GET_DESCRIPTOR
.subsections_via_symbols
