	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scsp_midi_in_send              ## -- Begin function scsp_midi_in_send
	.p2align	4, 0x90
_scsp_midi_in_send:                     ## @scsp_midi_in_send
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_scsp@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movq	_SCSP_MIDI_IN_EMP@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%ecx, %eax
	je	LBB0_2
## %bb.1:
	movl	$8, %edi
	callq	_scsp_sound_interrupt
	movl	$8, %edi
	callq	_scsp_main_interrupt
	movl	(%r15), %eax
	movl	(%rbx), %ecx
LBB0_2:
	notl	%eax
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	movslq	4(%rbx), %rcx
	cmpq	$4, %rcx
	jl	LBB0_4
## %bb.3:
	movq	_SCSP_MIDI_IN_OVF@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	8(%rbx), %rax
	leal	1(%rcx), %edx
	movl	%edx, 4(%rbx)
	movl	%r14d, (%rax,%rcx,4)
	cmpl	$4, 4(%rbx)
	jl	LBB0_7
## %bb.5:
	movq	_SCSP_MIDI_IN_FUL@GOTPCREL(%rip), %rcx
	movl	(%rbx), %eax
LBB0_6:
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_scsp,16,3                      ## @scsp
	.comm	_SCSP_MIDI_IN_EMP,4,2           ## @SCSP_MIDI_IN_EMP
	.comm	_SCSP_MIDI_IN_OVF,4,2           ## @SCSP_MIDI_IN_OVF
	.comm	_SCSP_MIDI_IN_FUL,4,2           ## @SCSP_MIDI_IN_FUL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scsp_midi_in_send              ; -- Begin function scsp_midi_in_send
	.p2align	2
_scsp_midi_in_send:                     ; @scsp_midi_in_send
	.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	x19, x0
Lloh0:
	adrp	x20, _scsp@GOTPAGE
Lloh1:
	ldr	x20, [x20, _scsp@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh2:
	adrp	x21, _SCSP_MIDI_IN_EMP@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SCSP_MIDI_IN_EMP@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w0, #8
	bl	_scsp_sound_interrupt
	mov	w0, #8
	bl	_scsp_main_interrupt
	ldr	w9, [x21]
	ldr	w8, [x20]
LBB0_2:
	bic	w9, w8, w9
	str	w9, [x20]
	ldrsw	x8, [x20, #4]
	cmp	w8, #4
	b.lt	LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _SCSP_MIDI_IN_OVF@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SCSP_MIDI_IN_OVF@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	orr	w8, w8, w9
	b	LBB0_6
LBB0_4:
	ldr	x9, [x20, #8]
	add	w10, w8, #1
	str	w10, [x20, #4]
	str	w19, [x9, x8, lsl #2]
	ldr	w8, [x20, #4]
	cmp	w8, #4
	b.lt	LBB0_7
; %bb.5:
Lloh7:
	adrp	x8, _SCSP_MIDI_IN_FUL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SCSP_MIDI_IN_FUL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
LBB0_6:
	str	w8, [x20]
LBB0_7:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_scsp,16,3                      ; @scsp
	.comm	_SCSP_MIDI_IN_EMP,4,2           ; @SCSP_MIDI_IN_EMP
	.comm	_SCSP_MIDI_IN_OVF,4,2           ; @SCSP_MIDI_IN_OVF
	.comm	_SCSP_MIDI_IN_FUL,4,2           ; @SCSP_MIDI_IN_FUL
.subsections_via_symbols
