	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2x00usb_assign_endpoint
_rt2x00usb_assign_endpoint:             ## @rt2x00usb_assign_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_usb_device_intf
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_usb_endpoint_num
	movl	%eax, 12(%rbx)
	movq	(%rbx), %rcx
	movq	_QID_RX@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_usb_rcvbulkpipe
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_usb_sndbulkpipe
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$1, %edx
LBB0_3:
	callq	_usb_maxpacket
	testl	%eax, %eax
	movl	$1, %ecx
	cmovnel	%eax, %ecx
	movl	%ecx, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QID_RX,8,3                     ## @QID_RX
	.no_dead_strip	_rt2x00usb_assign_endpoint
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2x00usb_assign_endpoint
_rt2x00usb_assign_endpoint:             ; @rt2x00usb_assign_endpoint
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w0, [x8]
	bl	_to_usb_device_intf
	mov	x20, x0
	mov	x0, x21
	bl	_usb_endpoint_num
	mov	x1, x0
	str	w0, [x19, #12]
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _QID_RX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QID_RX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	mov	x0, x20
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	_usb_rcvbulkpipe
	mov	x1, x0
	mov	x0, x20
	mov	w2, #0
	b	LBB0_3
LBB0_2:
	bl	_usb_sndbulkpipe
	mov	x1, x0
	mov	x0, x20
	mov	w2, #1
LBB0_3:
	bl	_usb_maxpacket
	cmp	w0, #0
	csinc	w8, w0, wzr, ne
	str	w8, [x19, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_QID_RX,8,3                     ; @QID_RX
	.no_dead_strip	_rt2x00usb_assign_endpoint
.subsections_via_symbols
