	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function midisynth_subscribe
_midisynth_subscribe:                   ## @midisynth_subscribe
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	20(%rdi), %edi
	movl	12(%rbx), %edx
	movl	16(%rbx), %esi
	movq	_SNDRV_RAWMIDI_LFLG_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %r8
	callq	_snd_rawmidi_kernel_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	movq	(%rax), %r12
	leaq	-40(%rbp), %r15
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	$1, -40(%rbp)
	movq	_input_buffer_size@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	(%rbx), %rdi
	movq	%r15, %rsi
	callq	_snd_rawmidi_input_params
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	8(%rbx), %edi
	callq	_snd_midi_event_reset_encode
	movq	_snd_midi_input_event@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	%rbx, (%r12)
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_snd_rawmidi_kernel_read
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	callq	_snd_printd
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_snd_rawmidi_kernel_release
	movl	%r15d, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_RAWMIDI_LFLG_INPUT,4,2   ## @SNDRV_RAWMIDI_LFLG_INPUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"midi input open failed!!!\n"

	.comm	_input_buffer_size,4,2          ## @input_buffer_size
	.comm	_snd_midi_input_event,4,2       ## @snd_midi_input_event
	.no_dead_strip	_midisynth_subscribe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function midisynth_subscribe
_midisynth_subscribe:                   ; @midisynth_subscribe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w0, [x0, #20]
	ldp	w2, w1, [x19, #12]
Lloh0:
	adrp	x8, _SNDRV_RAWMIDI_LFLG_INPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNDRV_RAWMIDI_LFLG_INPUT@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x4, x19
	bl	_snd_rawmidi_kernel_open
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x8, [x19]
	ldr	x21, [x8]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	w8, #1
Lloh3:
	adrp	x9, _input_buffer_size@GOTPAGE
Lloh4:
	ldr	x9, [x9, _input_buffer_size@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #8]
	ldr	x0, [x19]
	add	x1, sp, #8
	bl	_snd_rawmidi_input_params
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	w0, [x19, #8]
	bl	_snd_midi_event_reset_encode
Lloh6:
	adrp	x8, _snd_midi_input_event@GOTPAGE
Lloh7:
	ldr	x8, [x8, _snd_midi_input_event@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x21, #8]
	str	x19, [x21]
	ldr	x0, [x19]
	mov	x1, #0
	mov	w2, #0
	bl	_snd_rawmidi_kernel_read
	mov	w20, #0
	b	LBB0_5
LBB0_3:
	mov	x20, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printd
	b	LBB0_5
LBB0_4:
	mov	x20, x0
	mov	x0, x19
	bl	_snd_rawmidi_kernel_release
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_RAWMIDI_LFLG_INPUT,4,2   ; @SNDRV_RAWMIDI_LFLG_INPUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"midi input open failed!!!\n"

	.comm	_input_buffer_size,4,2          ; @input_buffer_size
	.comm	_snd_midi_input_event,4,2       ; @snd_midi_input_event
	.no_dead_strip	_midisynth_subscribe
.subsections_via_symbols
