	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_substream
_open_substream:                        ## @open_substream
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_1
LBB0_8:
	incq	%rax
	movq	%rax, (%r12)
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%edx, %r15d
	movq	%rdi, %r14
	movq	%r12, %rdi
	callq	_snd_rawmidi_runtime_create
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	32(%r12), %rax
	movq	%r12, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	$1, 8(%r12)
	movq	$0, 24(%r12)
	movq	_SNDRV_RAWMIDI_LFLG_APPEND@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.6:
	movl	$1, 12(%r12)
LBB0_7:
	movq	(%r14), %rax
	movq	16(%r12), %rcx
	incl	(%rax,%rcx,4)
	movq	(%r12), %rax
	jmp	LBB0_8
LBB0_2:
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_4:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_snd_rawmidi_runtime_free
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_RAWMIDI_LFLG_APPEND,4,2  ## @SNDRV_RAWMIDI_LFLG_APPEND
	.no_dead_strip	_open_substream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_substream
_open_substream:                        ; @open_substream
	.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, x1
	ldr	x8, [x1]
	cbz	x8, LBB0_3
LBB0_1:
	mov	w22, #0
	add	x8, x8, #1
	str	x8, [x19]
LBB0_2:
	mov	x0, x22
	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
LBB0_3:
	mov	x21, x2
	mov	x20, x0
	mov	x0, x19
	bl	_snd_rawmidi_runtime_create
	tbnz	w0, #31, LBB0_8
; %bb.4:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	tbnz	w0, #31, LBB0_9
; %bb.5:
	mov	w8, #1
	str	w8, [x19, #8]
	str	xzr, [x19, #24]
Lloh0:
	adrp	x9, _SNDRV_RAWMIDI_LFLG_APPEND@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SNDRV_RAWMIDI_LFLG_APPEND@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_7
; %bb.6:
	str	w8, [x19, #12]
LBB0_7:
	ldr	x8, [x20]
	ldr	x9, [x19, #16]
	lsl	x9, x9, #2
	ldr	w10, [x8, x9]
	add	w10, w10, #1
	str	w10, [x8, x9]
	ldr	x8, [x19]
	b	LBB0_1
LBB0_8:
	mov	x22, x0
	b	LBB0_2
LBB0_9:
	mov	x22, x0
	mov	x0, x19
	bl	_snd_rawmidi_runtime_free
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_RAWMIDI_LFLG_APPEND,4,2  ; @SNDRV_RAWMIDI_LFLG_APPEND
	.no_dead_strip	_open_substream
.subsections_via_symbols
