	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_midi_synth_open                ## -- Begin function midi_synth_open
	.p2align	4, 0x90
_midi_synth_open:                       ## @midi_synth_open
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_synth_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movslq	%edi, %rax
	movq	(%rcx,%rax,8), %rcx
	movl	(%rcx), %ebx
	testl	%ebx, %ebx
	js	LBB0_3
## %bb.1:
	movq	_num_midis@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jg	LBB0_3
## %bb.2:
	movq	_midi_devs@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	(%rcx,%rbx,8), %r8
	testq	%r8, %r8
	je	LBB0_3
## %bb.4:
	movq	_midi2synth@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movq	_sysex_state@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	$0, (%rcx,%rax,8)
	movq	_prev_out_status@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$0, (%rax,%rbx,8)
	movq	_midi_synth_input@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_midi_synth_output@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %edi
	callq	*(%r8)
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movq	$0, 40(%rax)
	movq	_MST_INIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rax)
	movl	$0, 8(%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax)
	movl	$1, %eax
	jmp	LBB0_6
LBB0_3:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_synth_devs,8,3                 ## @synth_devs
	.comm	_num_midis,4,2                  ## @num_midis
	.comm	_midi_devs,8,3                  ## @midi_devs
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_midi2synth,8,3                 ## @midi2synth
	.comm	_sysex_state,8,3                ## @sysex_state
	.comm	_prev_out_status,8,3            ## @prev_out_status
	.comm	_midi_synth_input,4,2           ## @midi_synth_input
	.comm	_midi_synth_output,4,2          ## @midi_synth_output
	.comm	_MST_INIT,4,2                   ## @MST_INIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_midi_synth_open                ; -- Begin function midi_synth_open
	.p2align	2
_midi_synth_open:                       ; @midi_synth_open
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _synth_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _synth_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
	ldr	w19, [x8]
	tbnz	w19, #31, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _num_midis@GOTPAGE
Lloh4:
	ldr	x8, [x8, _num_midis@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w19, w8
	b.gt	LBB0_5
; %bb.2:
Lloh6:
	adrp	x20, _midi_devs@GOTPAGE
Lloh7:
	ldr	x20, [x20, _midi_devs@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x8, [x8, x19, lsl #3]
	cbz	x8, LBB0_5
; %bb.3:
Lloh8:
	adrp	x9, _midi2synth@GOTPAGE
Lloh9:
	ldr	x9, [x9, _midi2synth@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	str	w0, [x9, x19, lsl #2]
	sxtw	x9, w0
Lloh11:
	adrp	x10, _sysex_state@GOTPAGE
Lloh12:
	ldr	x10, [x10, _sysex_state@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	str	xzr, [x10, x9, lsl #3]
Lloh14:
	adrp	x9, _prev_out_status@GOTPAGE
Lloh15:
	ldr	x9, [x9, _prev_out_status@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	str	xzr, [x9, x19, lsl #3]
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _midi_synth_input@GOTPAGE
Lloh18:
	ldr	x9, [x9, _midi_synth_input@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x9]
Lloh20:
	adrp	x9, _midi_synth_output@GOTPAGE
Lloh21:
	ldr	x9, [x9, _midi_synth_output@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x9]
	mov	x0, x19
	blr	x8
	tbnz	w0, #31, LBB0_6
; %bb.4:
	ldr	x8, [x20]
	ldr	x8, [x8, x19, lsl #3]
	str	xzr, [x8, #40]
Lloh23:
	adrp	x9, _MST_INIT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MST_INIT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	str	w9, [x8, #32]
	str	wzr, [x8, #8]
	stp	xzr, xzr, [x8, #16]
	mov	w0, #1
	b	LBB0_6
LBB0_5:
Lloh26:
	adrp	x8, _ENXIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_synth_devs,8,3                 ; @synth_devs
	.comm	_num_midis,4,2                  ; @num_midis
	.comm	_midi_devs,8,3                  ; @midi_devs
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_midi2synth,8,3                 ; @midi2synth
	.comm	_sysex_state,8,3                ; @sysex_state
	.comm	_prev_out_status,8,3            ; @prev_out_status
	.comm	_midi_synth_input,4,2           ; @midi_synth_input
	.comm	_midi_synth_output,4,2          ; @midi_synth_output
	.comm	_MST_INIT,4,2                   ; @MST_INIT
.subsections_via_symbols
