	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usb_get_midi
_usb_get_midi:                          ## @usb_get_midi
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-88(%rbp), %rdi
	callq	_recv_midi_packet
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	_UNDEFINED@GOTPCREL(%rip), %r15
	leaq	-88(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_recv_midi_packet
	testq	%rax, %rax
	je	LBB0_11
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-72(%rbp), %edi
	callq	_midi_packet_length
	movl	%eax, %r13d
	movl	-72(%rbp), %eax
	movq	-80(%rbp), %rcx
	rolq	$32, %rcx
	movl	%eax, -60(%rbp)
	movq	%rcx, -56(%rbp)
	cmpl	(%r15), %r13d
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %r14
	movq	_SYSEX_START_OR_CONT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_MIDI_EVENT
	movl	$3, %ebx
	cmpq	%rax, %r14
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %r14
	movq	_SYSEX_ENDS_IN_3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_MIDI_EVENT
	cmpq	%rax, %r14
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %r14
	movq	_SYSEX_ENDS_IN_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_MIDI_EVENT
	movl	$2, %ebx
	cmpq	%rax, %r14
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %r14
	movq	_SYSEX_ENDS_IN_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_MIDI_EVENT
	movl	$1, %ebx
	cmpq	%rax, %r14
	je	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %ebx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	(%r15), %ebx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	leaq	-60(%rbp), %rdx
	callq	_midi_device_input
	jmp	LBB0_10
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_UNDEFINED,4,2                  ## @UNDEFINED
	.comm	_SYSEX_START_OR_CONT,4,2        ## @SYSEX_START_OR_CONT
	.comm	_SYSEX_ENDS_IN_3,4,2            ## @SYSEX_ENDS_IN_3
	.comm	_SYSEX_ENDS_IN_2,4,2            ## @SYSEX_ENDS_IN_2
	.comm	_SYSEX_ENDS_IN_1,4,2            ## @SYSEX_ENDS_IN_1
	.no_dead_strip	_usb_get_midi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usb_get_midi
_usb_get_midi:                          ; @usb_get_midi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	x0, sp
	bl	_recv_midi_packet
	cbz	x0, LBB0_12
; %bb.1:
Lloh3:
	adrp	x21, _UNDEFINED@GOTPAGE
Lloh4:
	ldr	x21, [x21, _UNDEFINED@GOTPAGEOFF]
Lloh5:
	adrp	x22, _SYSEX_START_OR_CONT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SYSEX_START_OR_CONT@GOTPAGEOFF]
Lloh7:
	adrp	x23, _SYSEX_ENDS_IN_3@GOTPAGE
Lloh8:
	ldr	x23, [x23, _SYSEX_ENDS_IN_3@GOTPAGEOFF]
Lloh9:
	adrp	x24, _SYSEX_ENDS_IN_2@GOTPAGE
Lloh10:
	ldr	x24, [x24, _SYSEX_ENDS_IN_2@GOTPAGEOFF]
Lloh11:
	adrp	x25, _SYSEX_ENDS_IN_1@GOTPAGE
Lloh12:
	ldr	x25, [x25, _SYSEX_ENDS_IN_1@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, sp
	bl	_recv_midi_packet
	cbz	x0, LBB0_12
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #16]
	bl	_midi_packet_length
	mov	x20, x0
	ldur	d0, [sp, #12]
	rev64.2s	v0, v0
	str	d0, [sp, #24]
	ldr	w8, [sp, #8]
	str	w8, [sp, #32]
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x26, [sp]
	ldr	w1, [x22]
	mov	w0, #0
	bl	_MIDI_EVENT
	cmp	x26, x0
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x26, [sp]
	ldr	w1, [x23]
	mov	w0, #0
	bl	_MIDI_EVENT
	cmp	x26, x0
	b.ne	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w20, #3
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	cmp	w20, w8
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x2, sp, #24
	mov	x0, x19
	mov	x1, x20
	bl	_midi_device_input
	b	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x26, [sp]
	ldr	w1, [x24]
	mov	w0, #0
	bl	_MIDI_EVENT
	cmp	x26, x0
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w20, #2
	b	LBB0_7
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x26, [sp]
	ldr	w1, [x25]
	mov	w0, #0
	bl	_MIDI_EVENT
	cmp	x26, x0
	csinc	w20, w20, wzr, ne
	b	LBB0_7
LBB0_12:
	ldr	x8, [sp, #40]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_UNDEFINED,4,2                  ; @UNDEFINED
	.comm	_SYSEX_START_OR_CONT,4,2        ; @SYSEX_START_OR_CONT
	.comm	_SYSEX_ENDS_IN_3,4,2            ; @SYSEX_ENDS_IN_3
	.comm	_SYSEX_ENDS_IN_2,4,2            ; @SYSEX_ENDS_IN_2
	.comm	_SYSEX_ENDS_IN_1,4,2            ; @SYSEX_ENDS_IN_1
	.no_dead_strip	_usb_get_midi
.subsections_via_symbols
