	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_usbmidi_emagic_input
_snd_usbmidi_emagic_input:              ## @snd_usbmidi_emagic_input
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	%edx, %r12d
	testl	%edx, %edx
	jle	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$255, (%r15,%rax,4)
	je	LBB0_17
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	cmpq	%rax, %r12
	jne	LBB0_2
LBB0_4:
	cmpl	$0, (%r14)
	je	LBB0_5
LBB0_12:
	testl	%r12d, %r12d
	jg	LBB0_13
	jmp	LBB0_16
LBB0_17:
	movl	%eax, %r12d
	cmpl	$0, (%r14)
	jne	LBB0_12
LBB0_5:
	testl	%r12d, %r12d
	jle	LBB0_16
## %bb.6:
	movl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$245, (%r15,%rbx,4)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_7
## %bb.9:
	movl	%r12d, %ebx
LBB0_10:
	movl	4(%r14), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	callq	_snd_usbmidi_input_data
	subl	%ebx, %r12d
	jle	LBB0_16
## %bb.11:
	movl	%ebx, %eax
	movl	$1, (%r14)
	leaq	(%r15,%rax,4), %r15
	addq	$4, %r15
	decl	%r12d
	testl	%r12d, %r12d
	jle	LBB0_16
LBB0_13:
	movl	(%r15), %eax
	cmpl	$127, %eax
	jg	LBB0_15
## %bb.14:
	decl	%eax
	andl	$15, %eax
	movl	%eax, 4(%r14)
	addq	$4, %r15
	decl	%r12d
LBB0_15:
	movl	$0, (%r14)
	jmp	LBB0_5
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_snd_usbmidi_emagic_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_usbmidi_emagic_input
_snd_usbmidi_emagic_input:              ; @snd_usbmidi_emagic_input
	.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	x20, x1
	mov	x19, x0
	mov	w8, w2
	cmp	w2, #0
	b.le	LBB0_4
; %bb.1:
	mov	x9, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x20, x9, lsl #2]
	cmp	w10, #255
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_4:
	ldr	w9, [x19]
	cbz	w9, LBB0_7
LBB0_5:
	subs	w9, w8, #1
	b.ge	LBB0_14
	b	LBB0_17
LBB0_6:
	mov	x8, x9
	ldr	w9, [x19]
	cbnz	w9, LBB0_5
LBB0_7:
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.8:
	mov	x21, #0
	mov	w22, w8
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20, x21, lsl #2]
	cmp	w8, #245
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x21, x21, #1
	cmp	x22, x21
	b.ne	LBB0_9
; %bb.11:
	mov	x21, x22
LBB0_12:
	ldr	w1, [x19, #4]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_snd_usbmidi_input_data
	sub	w8, w22, w21
	subs	w8, w8, #1
	b.lt	LBB0_17
; %bb.13:
	add	x9, x20, w21, uxtw #2
	mov	w10, #1
	str	w10, [x19]
	add	x20, x9, #4
	subs	w9, w8, #1
	b.lt	LBB0_17
LBB0_14:
	ldr	w10, [x20]
	cmp	w10, #127
	b.gt	LBB0_16
; %bb.15:
	sub	w8, w10, #1
	and	w8, w8, #0xf
	str	w8, [x19, #4]
	add	x20, x20, #4
	mov	x8, x9
LBB0_16:
	str	wzr, [x19]
	b	LBB0_7
LBB0_17:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_snd_usbmidi_emagic_input
.subsections_via_symbols
