	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_usb_caiaq_send_command     ## -- Begin function snd_usb_caiaq_send_command
	.p2align	4, 0x90
_snd_usb_caiaq_send_command:            ## @snd_usb_caiaq_send_command
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_EP1_BUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	-1(%rax), %ebx
	cmpl	%ecx, %eax
	cmovgl	%ecx, %ebx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.3:
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.4:
	movl	(%r15), %edi
	incl	%edi
	movq	%rdx, %rsi
	movl	%ebx, %edx
	callq	_memcpy
LBB0_5:
	movq	(%r15), %rax
	movb	%r12b, (%rax)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_usb_sndbulkpipe
	movq	(%r15), %rdx
	incl	%ebx
	leaq	-36(%rbp), %r8
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %ecx
	movl	$200, %r9d
	callq	_usb_bulk_msg
	jmp	LBB0_6
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EP1_BUFSIZE,4,2                ## @EP1_BUFSIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_usb_caiaq_send_command     ; -- Begin function snd_usb_caiaq_send_command
	.p2align	2
_snd_usb_caiaq_send_command:            ; @snd_usb_caiaq_send_command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x19, [x0, #8]
	cbz	x19, LBB0_5
; %bb.1:
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _EP1_BUFSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EP1_BUFSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w9, w8, #1
	cmp	w8, w3
	csel	w22, w3, w9, gt
	cbz	x2, LBB0_4
; %bb.2:
	cmp	w22, #1
	b.lt	LBB0_4
; %bb.3:
	ldr	w8, [x20]
	add	w0, w8, #1
	mov	x1, x2
	mov	x2, x22
	bl	_memcpy
LBB0_4:
	ldr	x8, [x20]
	strb	w21, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_usb_sndbulkpipe
	mov	x1, x0
	ldr	x2, [x20]
	add	w3, w22, #1
	add	x4, sp, #12
	mov	x0, x19
	mov	w5, #200
	bl	_usb_bulk_msg
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EP1_BUFSIZE,4,2                ; @EP1_BUFSIZE
.subsections_via_symbols
