	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_midi_synth_send_sysex          ## -- Begin function midi_synth_send_sysex
	.p2align	4, 0x90
_midi_synth_send_sysex:                 ## @midi_synth_send_sysex
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edx, %edx
	jle	LBB0_17
## %bb.1:
	movq	%rsi, %r14
	movq	_synth_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %r15
	movq	(%rax,%r15,8), %rax
	movslq	(%rax), %rbx
	movl	%edx, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	_midi_devs@GOTPCREL(%rip), %r12
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movb	(%r14,%r13), %al
	cmpb	$-9, %al
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$-16, %al
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	movl	$240, %esi
	callq	_prefix_cmd
	testl	%eax, %eax
	je	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_sysex_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$1, (%rax,%r15,4)
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_sysex_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax,%r15,4)
	jne	LBB0_10
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_sysex_state@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, (%rcx,%r15,4)
	je	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	testb	%al, %al
	jns	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	$-9, (%r14,%r13)
	movq	_sysex_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, (%rax,%r15,4)
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movzbl	(%r14,%r13), %esi
	movl	%ebx, %edi
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movb	$-9, (%r14,%r13)
	movq	_sysex_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$0, (%rax,%rcx,4)
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movzbl	(%r14,%r13), %esi
	movl	%ebx, %edi
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	leal	1(%r15), %eax
	cmpl	$1000, %r15d                    ## imm = 0x3E8
	movl	%eax, %r15d
	jb	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_sysex_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	cmpl	$0, (%rax,%r15,4)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	cmpq	-56(%rbp), %r13                 ## 8-byte Folded Reload
	jne	LBB0_2
LBB0_17:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_synth_devs,8,3                 ## @synth_devs
	.comm	_sysex_state,8,3                ## @sysex_state
	.comm	_midi_devs,8,3                  ## @midi_devs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_midi_synth_send_sysex          ; -- Begin function midi_synth_send_sysex
	.p2align	2
_midi_synth_send_sysex:                 ; @midi_synth_send_sysex
	.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
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w2, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x19, x1
	mov	x21, #0
Lloh0:
	adrp	x8, _synth_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _synth_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sxtw	x22, w0
	ldr	x8, [x8, w0, sxtw #3]
	ldrsw	x20, [x8]
	mov	w23, w2
Lloh3:
	adrp	x24, _sysex_state@GOTPAGE
Lloh4:
	ldr	x24, [x24, _sysex_state@GOTPAGEOFF]
Lloh5:
	adrp	x25, _midi_devs@GOTPAGE
Lloh6:
	ldr	x25, [x25, _midi_devs@GOTPAGEOFF]
	mov	w26, #247
	mov	w27, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24]
	ldr	w8, [x8, x22, lsl #2]
	add	x21, x21, #1
	cmp	w8, #0
	ccmp	x21, x23, #4, ne
	b.eq	LBB0_16
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldrb	w8, [x19, x21]
	cmp	w8, #247
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #240
	b.ne	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	w1, #240
	bl	_prefix_cmd
	cbz	w0, LBB0_16
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24]
	str	w27, [x8, x22, lsl #2]
	b	LBB0_12
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24]
	ldr	w9, [x8, x22, lsl #2]
	cbnz	w9, LBB0_11
	b	LBB0_16
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x24]
	ldr	w9, [x9, x22, lsl #2]
	cbz	w9, LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtb	w8, w8
	tbz	w8, #31, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	strb	w26, [x19, x21]
	ldr	x8, [x24]
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x8, x22, lsl #2]
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25]
	ldr	x8, [x8, x20, lsl #3]
	ldr	x8, [x8]
	ldrb	w1, [x19, x21]
	mov	x0, x20
	blr	x8
	cbnz	w0, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w28, #0
	strb	w26, [x19, x21]
	ldr	x8, [x24]
	str	wzr, [x8, x22, lsl #2]
LBB0_14:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x25]
	ldr	x8, [x8, x20, lsl #3]
	ldr	x8, [x8]
	ldrb	w1, [x19, x21]
	mov	x0, x20
	blr	x8
	cbnz	w0, LBB0_2
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	add	w8, w28, #1
	cmp	w28, #1000
	mov	x28, x8
	b.lo	LBB0_14
	b	LBB0_2
LBB0_16:
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_synth_devs,8,3                 ; @synth_devs
	.comm	_sysex_state,8,3                ; @sysex_state
	.comm	_midi_devs,8,3                  ; @midi_devs
.subsections_via_symbols
