	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_usbmidi_akai_output
_snd_usbmidi_akai_output:               ## @snd_usbmidi_akai_output
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_AKAI_SYSEX_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	(,%r14,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_21
## %bb.1:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movslq	8(%rcx), %rdx
	notl	%r14d
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	addl	(%rcx), %r14d
	cmpl	%r14d, %edx
	jge	LBB0_21
## %bb.2:
	movq	%rdx, %rcx
	movq	8(%rax), %r12
	shlq	$2, %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$240, %edx
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$247, %edx
	je	LBB0_18
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
	movq	_MAX_AKAI_SYSEX_LEN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_15
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_snd_rawmidi_transmit_ack
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	%r14d, 8(%rax)
	jge	LBB0_21
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
	movq	_MAX_AKAI_SYSEX_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_snd_rawmidi_transmit_peek
	testl	%eax, %eax
	je	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	jle	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ecx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$240, (%r13,%rbx,4)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	incq	%rbx
	cmpq	%rbx, %rcx
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, %ebx
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_20
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$2, %eax
	jl	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	decq	%rcx
	movq	$-12, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	4(%r13,%rbx,4), %edx
	cmpl	$239, %edx
	jg	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	incq	%rbx
	addq	$-4, %r15
	cmpq	%rbx, %rcx
	jne	LBB0_12
	jmp	LBB0_14
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	jmp	LBB0_20
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	leal	2(%rbx), %edx
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, %eax
	orl	$16, %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	leaq	4(%rcx), %rdi
	movq	%r13, %rsi
	callq	_memcpy
	movq	%r12, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_snd_rawmidi_transmit_ack
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	8(%rcx), %eax
	addl	%ebx, %eax
	addl	$3, %eax
	movl	%eax, 8(%rcx)
	subq	%r15, -72(%rbp)                 ## 8-byte Folded Spill
	cmpl	%r14d, %eax
	jl	LBB0_3
	jmp	LBB0_21
LBB0_15:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	$0, (%rax)
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_AKAI_SYSEX_LEN,4,2         ## @MAX_AKAI_SYSEX_LEN
	.no_dead_strip	_snd_usbmidi_akai_output
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_usbmidi_akai_output
_snd_usbmidi_akai_output:               ; @snd_usbmidi_akai_output
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x24, _MAX_AKAI_SYSEX_LEN@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MAX_AKAI_SYSEX_LEN@GOTPAGEOFF]
	ldr	w12, [x24]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	x8, [x0, #8]
	ldr	x9, [x8]
	cbz	x9, LBB0_21
; %bb.1:
	ldrsw	x9, [x20, #8]
	ldr	w10, [x19]
	mvn	w11, w12
	add	w25, w10, w11
	cmp	w9, w25
	b.ge	LBB0_21
; %bb.2:
	ldr	x22, [x8, #8]
	ldr	x8, [x20]
	add	x26, x8, x9, lsl #2
	add	x27, x21, #4
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_12 Depth 2
	ldr	w2, [x24]
	mov	x0, x22
	mov	x1, x21
	bl	_snd_rawmidi_transmit_peek
	cbz	w0, LBB0_20
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w0, #1
	b.lt	LBB0_16
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, #0
	mov	w8, w0
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [x21, x1, lsl #2]
	cmp	w9, #240
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x1, x1, #1
	cmp	x8, x1
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x8
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w1, LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w0, #2
	b.lt	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x28, #0
	sub	x8, x8, #1
	mov	x23, #-12
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [x27, x28, lsl #2]
	cmp	w9, #239
	b.gt	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	add	x28, x28, #1
	sub	x23, x23, #4
	cmp	x8, x28
	b.ne	LBB0_12
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w9, #240
	b.eq	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w9, #247
	b.eq	LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24]
	mov	x1, x0
	cmp	w0, w8
	b.lt	LBB0_20
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_snd_rawmidi_transmit_ack
	ldr	w8, [x20, #8]
	cmp	w8, w25
	b.lt	LBB0_3
	b	LBB0_21
LBB0_18:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, x28, #1
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
	b	LBB0_17
LBB0_19:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w2, w28, #2
	stur	w2, [x29, #-92]                 ; 4-byte Folded Spill
	orr	w8, w2, #0x10
	mov	x0, x26
	str	w8, [x0], #4
	mov	x1, x21
	bl	_memcpy
	mov	x0, x22
	ldur	w1, [x29, #-92]                 ; 4-byte Folded Reload
	bl	_snd_rawmidi_transmit_ack
	ldr	w8, [x20, #8]
	add	w8, w8, w28
	add	w8, w8, #3
	str	w8, [x20, #8]
	sub	x26, x26, x23
	cmp	w8, w25
	b.lt	LBB0_3
	b	LBB0_21
LBB0_20:
	ldr	x8, [x19, #8]
	str	xzr, [x8]
LBB0_21:
	ldur	x8, [x29, #-88]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_AKAI_SYSEX_LEN,4,2         ; @MAX_AKAI_SYSEX_LEN
	.no_dead_strip	_snd_usbmidi_akai_output
.subsections_via_symbols
