	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_ep
_get_ep:                                ## @get_ep
	.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, %r14
	movl	8(%rdi), %esi
	movl	12(%rdi), %edi
	callq	_usb_ifnum_to_if
	movq	%rax, %r15
	cmpq	$0, 24(%r14)
	jne	LBB0_1
## %bb.2:
	movq	_USB_ENDPOINT_XFER_ISOC@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_USB_ENDPOINT_XFER_BULK@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	movslq	(%r14), %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, 16(%r14)
	je	LBB0_10
## %bb.4:
	leaq	4(,%rbx,4), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movslq	4(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rdi
	addq	%r14, %rdi
	movl	%r13d, %esi
	callq	_alt_xfer
	addq	$4, %r14
	testq	%rax, %rax
	je	LBB0_5
	jmp	LBB0_7
LBB0_10:
	movl	%ebx, %ebx
	leaq	-4(,%rbx,4), %r14
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	decq	%rbx
	movq	(%r15), %rdi
	addq	%r14, %rdi
	movl	%r13d, %esi
	callq	_alt_xfer
	addq	$-4, %r14
	testq	%rax, %rax
	je	LBB0_11
LBB0_7:
	movq	%rax, %r12
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_PDEBUG
	movl	%ebx, (%r14)
	cmpl	$2, 4(%r14)
	jl	LBB0_14
## %bb.8:
	movl	8(%r14), %esi
	movl	12(%r14), %edi
	movl	%ebx, %edx
	callq	_usb_set_interface
	testl	%eax, %eax
	jns	LBB0_14
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_err
LBB0_14:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_ENDPOINT_XFER_BULK,4,2     ## @USB_ENDPOINT_XFER_BULK
	.comm	_USB_ENDPOINT_XFER_ISOC,4,2     ## @USB_ENDPOINT_XFER_ISOC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no transfer endpoint found"

	.comm	_D_STREAM,4,2                   ## @D_STREAM
L_.str.1:                               ## @.str.1
	.asciz	"use alt %d ep 0x%02x"

L_.str.2:                               ## @.str.2
	.asciz	"set alt %d err %d"

	.no_dead_strip	_get_ep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_ep
_get_ep:                                ; @get_ep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	w0, [x0, #12]
	ldr	w1, [x19, #8]
	bl	_usb_ifnum_to_if
	mov	x21, x0
Lloh0:
	adrp	x8, _USB_ENDPOINT_XFER_BULK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USB_ENDPOINT_XFER_BULK@GOTPAGEOFF]
Lloh2:
	adrp	x9, _USB_ENDPOINT_XFER_ISOC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _USB_ENDPOINT_XFER_ISOC@GOTPAGEOFF]
	ldp	x11, x10, [x19, #16]
	cmp	x10, #0
	csel	x8, x9, x8, eq
	ldr	w22, [x8]
	ldrsw	x20, [x19]
	cbz	x11, LBB0_4
; %bb.1:
	lsl	x8, x20, #2
	add	x24, x8, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x19, #4]
	cmp	x20, x8
	b.ge	LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x21]
	add	x0, x8, x24
	mov	x1, x22
	bl	_alt_xfer
	add	x24, x24, #4
	cbz	x0, LBB0_2
	b	LBB0_7
LBB0_4:
	and	x20, x20, #0xffffffff
	lsl	x8, x20, #2
	sub	x24, x8, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w20, #1
	b.lt	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x20, x20, #1
	ldr	x8, [x21]
	add	x0, x8, x24
	mov	x1, x22
	bl	_alt_xfer
	sub	x24, x24, #4
	cbz	x0, LBB0_5
LBB0_7:
	mov	x23, x0
Lloh4:
	adrp	x8, _D_STREAM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _D_STREAM@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	w3, [x23]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_PDEBUG
	str	w20, [x19]
	ldr	w8, [x19, #4]
	cmp	w8, #2
	b.lt	LBB0_12
; %bb.8:
	ldp	w1, w0, [x19, #8]
	mov	x2, x20
	bl	_usb_set_interface
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_12
; %bb.9:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	stp	x20, x0, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
LBB0_11:
	bl	_err
	mov	x23, #0
LBB0_12:
	mov	x0, x23
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_ENDPOINT_XFER_BULK,4,2     ; @USB_ENDPOINT_XFER_BULK
	.comm	_USB_ENDPOINT_XFER_ISOC,4,2     ; @USB_ENDPOINT_XFER_ISOC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no transfer endpoint found"

	.comm	_D_STREAM,4,2                   ; @D_STREAM
l_.str.1:                               ; @.str.1
	.asciz	"use alt %d ep 0x%02x"

l_.str.2:                               ; @.str.2
	.asciz	"set alt %d err %d"

	.no_dead_strip	_get_ep
.subsections_via_symbols
