	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usbBuildTxBlock
_usbBuildTxBlock:                       ## @usbBuildTxBlock
	.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	_usbMsgLen@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	cmpl	$8, %eax
	movl	$8, %esi
	cmovll	%eax, %esi
	subl	%esi, %eax
	movl	%eax, (%r14)
	movq	_USBPID_DATA0@GOTPCREL(%rip), %rax
	movq	_USBPID_DATA1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	(%rax), %ecx
	movq	_usbTxBuf@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	xorl	%ecx, (%rdi)
	addq	$4, %rdi
	callq	_usbDeviceRead
	cmpl	$8, %eax
	jg	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	addq	$4, %rdi
	movl	%eax, %esi
	callq	_usbCrc16Append
	movl	$12, %edx
	cmpl	$8, %ebx
	je	LBB0_5
## %bb.2:
	addl	$4, %ebx
	movl	%ebx, %edx
	jmp	LBB0_4
LBB0_3:
	movq	_USBPID_STALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_4:
	movq	_USB_NO_MSG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_5:
	movq	_usbTxLen@GOTPCREL(%rip), %rax
	movl	%edx, (%rax)
	movq	(%r15), %rsi
	decl	%edx
	movl	$32, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DBG2                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_usbMsgLen,4,2                  ## @usbMsgLen
	.comm	_USBPID_DATA0,4,2               ## @USBPID_DATA0
	.comm	_USBPID_DATA1,4,2               ## @USBPID_DATA1
	.comm	_usbTxBuf,8,3                   ## @usbTxBuf
	.comm	_USB_NO_MSG,4,2                 ## @USB_NO_MSG
	.comm	_USBPID_STALL,4,2               ## @USBPID_STALL
	.comm	_usbTxLen,4,2                   ## @usbTxLen
	.no_dead_strip	_usbBuildTxBlock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usbBuildTxBlock
_usbBuildTxBlock:                       ; @usbBuildTxBlock
	.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
Lloh0:
	adrp	x20, _usbMsgLen@GOTPAGE
Lloh1:
	ldr	x20, [x20, _usbMsgLen@GOTPAGEOFF]
	ldr	w8, [x20]
	mov	w9, #8
	cmp	w8, #8
	csel	w1, w8, w9, lt
	sub	w8, w8, w1
	str	w8, [x20]
Lloh2:
	adrp	x8, _USBPID_DATA0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USBPID_DATA0@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _USBPID_DATA1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _USBPID_DATA1@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x21, _usbTxBuf@GOTPAGE
Lloh9:
	ldr	x21, [x21, _usbTxBuf@GOTPAGEOFF]
	eor	w8, w9, w8
	ldr	x0, [x21]
	ldr	w9, [x0]
	eor	w8, w8, w9
	str	w8, [x0], #4
	bl	_usbDeviceRead
	cmp	w0, #8
	b.gt	LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x21]
	add	x0, x8, #4
	mov	x1, x19
	bl	_usbCrc16Append
	cmp	w19, #8
	b.ne	LBB0_4
; %bb.2:
	mov	w8, #12
	b	LBB0_6
LBB0_3:
Lloh10:
	adrp	x8, _USBPID_STALL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _USBPID_STALL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	b	LBB0_5
LBB0_4:
	add	w8, w19, #4
LBB0_5:
Lloh13:
	adrp	x9, _USB_NO_MSG@GOTPAGE
Lloh14:
	ldr	x9, [x9, _USB_NO_MSG@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	str	w9, [x20]
LBB0_6:
Lloh16:
	adrp	x9, _usbTxLen@GOTPAGE
Lloh17:
	ldr	x9, [x9, _usbTxLen@GOTPAGEOFF]
Lloh18:
	str	w8, [x9]
	ldr	x1, [x21]
	sub	w2, w8, #1
	mov	w0, #32
	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
	b	_DBG2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_usbMsgLen,4,2                  ; @usbMsgLen
	.comm	_USBPID_DATA0,4,2               ; @USBPID_DATA0
	.comm	_USBPID_DATA1,4,2               ; @USBPID_DATA1
	.comm	_usbTxBuf,8,3                   ; @usbTxBuf
	.comm	_USB_NO_MSG,4,2                 ; @USB_NO_MSG
	.comm	_USBPID_STALL,4,2               ; @USBPID_STALL
	.comm	_usbTxLen,4,2                   ; @usbTxLen
	.no_dead_strip	_usbBuildTxBlock
.subsections_via_symbols
