	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_usb_caiaq_midi_send
_snd_usb_caiaq_midi_send:               ## @snd_usb_caiaq_midi_send
	.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, %r14
	movq	%rdi, %r15
	movq	_EP1_CMD_MIDI_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rdi), %rsi
	movl	%eax, (%rsi)
	movl	$0, 4(%rsi)
	addq	$12, %rsi
	movq	_EP1_BUFSIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	$-3, %rdx
	movq	%r14, %rdi
	callq	_snd_rawmidi_transmit
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	movq	(%r15), %rax
	movl	%ebx, 8(%rax)
	movl	%ebx, %eax
	addl	$3, %eax
	leaq	12(%r15), %rdi
	movl	%eax, 12(%r15)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_submit_urb
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movl	$1, 8(%r15)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	movl	%ebx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EP1_CMD_MIDI_WRITE,4,2         ## @EP1_CMD_MIDI_WRITE
	.comm	_EP1_BUFSIZE,8,3                ## @EP1_BUFSIZE
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,ret=%d, len=%d\n"

	.no_dead_strip	_snd_usb_caiaq_midi_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_usb_caiaq_midi_send
_snd_usb_caiaq_midi_send:               ; @snd_usb_caiaq_midi_send
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _EP1_CMD_MIDI_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EP1_CMD_MIDI_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0]
	stp	w8, wzr, [x9]
	add	x1, x9, #12
Lloh3:
	adrp	x8, _EP1_BUFSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EP1_BUFSIZE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	sub	x2, x8, #3
	mov	x0, x19
	bl	_snd_rawmidi_transmit
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	x8, [x20]
	str	w0, [x8, #8]
	add	w8, w0, #3
	mov	x0, x20
	str	w8, [x0, #12]!
Lloh6:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_usb_submit_urb
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_3:
	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
LBB0_4:
	mov	x2, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x3, x21
	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	_log
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EP1_CMD_MIDI_WRITE,4,2         ; @EP1_CMD_MIDI_WRITE
	.comm	_EP1_BUFSIZE,8,3                ; @EP1_BUFSIZE
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"snd_usb_caiaq_midi_send(%p): usb_submit_urb() failed,ret=%d, len=%d\n"

	.no_dead_strip	_snd_usb_caiaq_midi_send
.subsections_via_symbols
