	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sysex_encode                   ## -- Begin function sysex_encode
	.p2align	4, 0x90
_sysex_encode:                          ## @sysex_encode
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movslq	%edx, %rcx
	imulq	$-1840700269, %rcx, %r10        ## imm = 0x92492493
	shrq	$32, %r10
	addl	%ecx, %r10d
	movl	%r10d, %eax
	shrl	$31, %eax
	sarl	$2, %r10d
	addl	%eax, %r10d
	leal	(,%r10,8), %eax
	movl	%r10d, %r8d
	subl	%eax, %r8d
	addl	%ecx, %r8d
	cmpl	$7, %ecx
	jl	LBB0_3
## %bb.1:
	movl	%r10d, %r9d
	leaq	24(%rsi), %r11
	movq	%rdi, %rdx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rdx)
	movl	-24(%r11), %ecx
	movl	%ecx, %ebx
	shrl	%ebx
	andl	$64, %ebx
	movl	%ebx, (%rdx)
	andl	$127, %ecx
	movl	%ecx, 4(%rdx)
	movl	-20(%r11), %r14d
	movl	%r14d, %ecx
	shrl	$2, %ecx
	andl	$32, %ecx
	orl	%ebx, %ecx
	movl	%ecx, (%rdx)
	andl	$127, %r14d
	movl	%r14d, 8(%rdx)
	movl	-16(%r11), %r14d
	movl	%r14d, %ebx
	shrl	$3, %ebx
	andl	$16, %ebx
	orl	%ecx, %ebx
	movl	%ebx, (%rdx)
	andl	$127, %r14d
	movl	%r14d, 12(%rdx)
	movl	-12(%r11), %r14d
	movl	%r14d, %ecx
	shrl	$4, %ecx
	andl	$8, %ecx
	orl	%ebx, %ecx
	movl	%ecx, (%rdx)
	andl	$127, %r14d
	movl	%r14d, 16(%rdx)
	movl	-8(%r11), %r14d
	movl	%r14d, %ebx
	shrl	$5, %ebx
	andl	$4, %ebx
	orl	%ecx, %ebx
	movl	%ebx, (%rdx)
	andl	$127, %r14d
	movl	%r14d, 20(%rdx)
	movl	-4(%r11), %r14d
	movl	%r14d, %ecx
	shrl	$6, %ecx
	andl	$2, %ecx
	orl	%ebx, %ecx
	movl	%ecx, (%rdx)
	andl	$127, %r14d
	movl	%r14d, 24(%rdx)
	movl	(%r11), %r14d
	movl	%r14d, %ebx
	shrl	$7, %ebx
	andl	$1, %ebx
	orl	%ecx, %ebx
	movl	%ebx, (%rdx)
	andl	$127, %r14d
	movl	%r14d, 28(%rdx)
	addq	$28, %r11
	addq	$32, %rdx
	decq	%r9
	jne	LBB0_2
LBB0_3:
	testl	%r8d, %r8d
	je	LBB0_12
## %bb.4:
	movslq	%eax, %r9
	movl	$0, (%rdi,%r9,4)
	jle	LBB0_11
## %bb.5:
	movl	%eax, %ecx
	subl	%r10d, %ecx
	movl	%eax, %edx
	orl	$1, %edx
	movslq	%ecx, %r11
	movslq	%edx, %rbx
	movl	(%rsi,%r11,4), %ecx
	movl	%ecx, %edx
	shrl	%edx
	andl	$64, %edx
	movl	%edx, (%rdi,%r9,4)
	andl	$127, %ecx
	movl	%ecx, (%rdi,%rbx,4)
	cmpl	$1, %r8d
	je	LBB0_11
## %bb.6:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	%r8d, %r14d
	decq	%r14
	movl	$1, %r10d
	cmpl	$2, %r8d
	je	LBB0_9
## %bb.7:
	leaq	(%rdi,%r9,4), %r15
	addq	$8, %r15
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r11,4), %r13
	addq	$4, %r13
	movq	%r14, %r12
	andq	$-2, %r12
	negq	%r12
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	-4(%r13,%rdx,4), %r10d
	movl	%r10d, %ebx
	andl	$128, %ebx
	leal	1(%rdx), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %ebx
	orl	%ebx, (%rdi,%r9,4)
	andl	$127, %r10d
	movl	%r10d, -4(%r15,%rdx,4)
	movl	(%r13,%rdx,4), %ebx
	movl	%ebx, %esi
	andl	$128, %esi
	leaq	2(%rdx), %r10
	movl	%r10d, %ecx
	shrl	%cl, %esi
	orl	%esi, (%rdi,%r9,4)
	andl	$127, %ebx
	movl	%ebx, (%r15,%rdx,4)
	leaq	(%r12,%rdx), %rcx
	addq	$2, %rcx
	movq	%r10, %rdx
	cmpq	$1, %rcx
	jne	LBB0_8
LBB0_9:
	testb	$1, %r14b
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_11
## %bb.10:
	addq	%r10, %r11
	movl	(%rcx,%r11,4), %edx
	movl	%edx, %esi
	andl	$128, %esi
	leal	1(%r10), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %esi
	orl	%esi, (%rdi,%r9,4)
	andl	$127, %edx
	addq	%r10, %rbx
	movl	%edx, (%rdi,%rbx,4)
LBB0_11:
	addl	%r8d, %eax
	incl	%eax
LBB0_12:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sysex_encode                   ; -- Begin function sysex_encode
	.p2align	2
_sysex_encode:                          ; @sysex_encode
	.cfi_startproc
; %bb.0:
	mov	w8, #9363
	movk	w8, #37449, lsl #16
	smull	x8, w2, w8
	lsr	x8, x8, #32
	add	w8, w8, w2
	asr	w9, w8, #2
	add	w9, w9, w8, lsr #31
	cmp	w2, #7
	b.lt	LBB0_3
; %bb.1:
	add	x8, x1, #12
	mov	x10, x0
	mov	x11, x9
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x10]
	ldur	w12, [x8, #-12]
	lsr	w13, w12, #1
	and	w13, w13, #0x40
	and	w12, w12, #0x7f
	stp	w13, w12, [x10]
	ldur	w12, [x8, #-8]
	lsr	w14, w12, #2
	and	w14, w14, #0x20
	orr	w13, w14, w13
	str	w13, [x10]
	and	w12, w12, #0x7f
	str	w12, [x10, #8]
	ldur	w12, [x8, #-4]
	lsr	w14, w12, #3
	and	w14, w14, #0x10
	orr	w13, w14, w13
	str	w13, [x10]
	and	w12, w12, #0x7f
	str	w12, [x10, #12]
	ldr	w12, [x8]
	lsr	w14, w12, #4
	and	w14, w14, #0x8
	orr	w13, w14, w13
	str	w13, [x10]
	and	w12, w12, #0x7f
	str	w12, [x10, #16]
	ldr	w12, [x8, #4]
	lsr	w14, w12, #5
	and	w14, w14, #0x4
	orr	w13, w14, w13
	str	w13, [x10]
	and	w12, w12, #0x7f
	str	w12, [x10, #20]
	ldr	w12, [x8, #8]
	lsr	w14, w12, #6
	and	w14, w14, #0x2
	orr	w13, w14, w13
	str	w13, [x10]
	and	w12, w12, #0x7f
	str	w12, [x10, #24]
	ldr	w12, [x8, #12]
	bfxil	w13, w12, #7, #1
	str	w13, [x10]
	and	w12, w12, #0x7f
	str	w12, [x10, #28]
	add	x10, x10, #32
	add	x8, x8, #28
	subs	x11, x11, #1
	b.ne	LBB0_2
LBB0_3:
	lsl	w8, w9, #3
	sub	w10, w9, w8
	adds	w10, w2, w10
	b.eq	LBB0_9
; %bb.4:
	str	wzr, [x0, w8, sxtw #2]
	cmp	w10, #1
	b.lt	LBB0_8
; %bb.5:
	sxtw	x11, w8
	sub	w12, w8, w9
	lsl	x9, x11, #2
	ldr	w11, [x1, w12, sxtw #2]
	lsr	w13, w11, #1
	and	w13, w13, #0x40
	str	w13, [x0, x9]
	and	w11, w11, #0x7f
	orr	x13, x9, #0x4
	str	w11, [x0, x13]
	cmp	w10, #1
	b.eq	LBB0_8
; %bb.6:
	mov	x11, #0
	sxtw	x13, w12
	sub	x12, x10, #1
	add	x13, x1, x13, lsl #2
	add	x13, x13, #4
	add	x14, x0, w8, sxtw #2
	add	x14, x14, #8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w15, [x0, x9]
	lsl	x16, x11, #2
	ldr	w17, [x13, x16]
	and	w1, w17, #0x80
	add	w2, w11, #2
	lsr	w1, w1, w2
	orr	w15, w1, w15
	str	w15, [x0, x9]
	and	w15, w17, #0x7f
	str	w15, [x14, x16]
	add	x11, x11, #1
	cmp	x12, x11
	b.ne	LBB0_7
LBB0_8:
	add	w8, w10, w8
	add	w8, w8, #1
LBB0_9:
	mov	x0, x8
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
