	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_sb8dsp_midi                ## -- Begin function snd_sb8dsp_midi
	.p2align	4, 0x90
_snd_sb8dsp_midi:                       ## @snd_sb8dsp_midi
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movl	%esi, %edx
	movq	%rdi, %rbx
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	$0, (%r14)
LBB0_2:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-24(%rbp), %r9
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_snd_rawmidi_new
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:
	movq	-24(%rbp), %rax
	movl	16(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	-24(%rbp), %rdi
	movq	_SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_sb8dsp_midi_output@GOTPCREL(%rip), %rdx
	callq	_snd_rawmidi_set_ops
	movq	-24(%rbp), %rdi
	movq	_SNDRV_RAWMIDI_STREAM_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_sb8dsp_midi_input@GOTPCREL(%rip), %rdx
	callq	_snd_rawmidi_set_ops
	movq	_SNDRV_RAWMIDI_INFO_OUTPUT@GOTPCREL(%rip), %rcx
	movq	_SNDRV_RAWMIDI_INFO_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	-24(%rbp), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rcx)
	movq	(%rbx), %rdx
	movq	_SB_HW_20@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jl	LBB0_5
## %bb.4:
	movq	_SNDRV_RAWMIDI_INFO_DUPLEX@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, (%rcx)
LBB0_5:
	xorl	%eax, %eax
	movq	%rbx, 8(%rcx)
	movq	%rcx, 8(%rbx)
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:
	movq	%rcx, (%r14)
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SB8 MIDI"

	.comm	_SNDRV_RAWMIDI_STREAM_OUTPUT,4,2 ## @SNDRV_RAWMIDI_STREAM_OUTPUT
	.comm	_snd_sb8dsp_midi_output,4,2     ## @snd_sb8dsp_midi_output
	.comm	_SNDRV_RAWMIDI_STREAM_INPUT,4,2 ## @SNDRV_RAWMIDI_STREAM_INPUT
	.comm	_snd_sb8dsp_midi_input,4,2      ## @snd_sb8dsp_midi_input
	.comm	_SNDRV_RAWMIDI_INFO_OUTPUT,4,2  ## @SNDRV_RAWMIDI_INFO_OUTPUT
	.comm	_SNDRV_RAWMIDI_INFO_INPUT,4,2   ## @SNDRV_RAWMIDI_INFO_INPUT
	.comm	_SB_HW_20,8,3                   ## @SB_HW_20
	.comm	_SNDRV_RAWMIDI_INFO_DUPLEX,4,2  ## @SNDRV_RAWMIDI_INFO_DUPLEX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_sb8dsp_midi                ; -- Begin function snd_sb8dsp_midi
	.p2align	2
_snd_sb8dsp_midi:                       ; @snd_sb8dsp_midi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	mov	x2, x1
	mov	x20, x0
	cbz	x19, LBB0_2
; %bb.1:
	str	xzr, [x19]
LBB0_2:
	ldr	w0, [x20, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x5, sp, #8
	mov	w3, #1
	mov	w4, #1
	bl	_snd_rawmidi_new
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #16]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	ldr	x0, [sp, #8]
Lloh4:
	adrp	x8, _SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, _snd_sb8dsp_midi_output@GOTPAGE
Lloh8:
	ldr	x2, [x2, _snd_sb8dsp_midi_output@GOTPAGEOFF]
	bl	_snd_rawmidi_set_ops
	ldr	x0, [sp, #8]
Lloh9:
	adrp	x8, _SNDRV_RAWMIDI_STREAM_INPUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SNDRV_RAWMIDI_STREAM_INPUT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, _snd_sb8dsp_midi_input@GOTPAGE
Lloh13:
	ldr	x2, [x2, _snd_sb8dsp_midi_input@GOTPAGEOFF]
	bl	_snd_rawmidi_set_ops
Lloh14:
	adrp	x8, _SNDRV_RAWMIDI_INFO_OUTPUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SNDRV_RAWMIDI_INFO_OUTPUT@GOTPAGEOFF]
Lloh16:
	adrp	x9, _SNDRV_RAWMIDI_INFO_INPUT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SNDRV_RAWMIDI_INFO_INPUT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	ldr	w9, [x9]
	orr	w9, w9, w8
	ldr	x8, [sp, #8]
	ldr	w10, [x8]
	orr	w9, w9, w10
	str	w9, [x8]
	ldr	x10, [x20]
Lloh20:
	adrp	x11, _SB_HW_20@GOTPAGE
Lloh21:
	ldr	x11, [x11, _SB_HW_20@GOTPAGEOFF]
Lloh22:
	ldr	x11, [x11]
	cmp	x10, x11
	b.lt	LBB0_5
; %bb.4:
Lloh23:
	adrp	x10, _SNDRV_RAWMIDI_INFO_DUPLEX@GOTPAGE
Lloh24:
	ldr	x10, [x10, _SNDRV_RAWMIDI_INFO_DUPLEX@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8]
LBB0_5:
	str	x20, [x8, #8]
	str	x8, [x20, #8]
	mov	w0, #0
	cbz	x19, LBB0_7
; %bb.6:
	str	x8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SB8 MIDI"

	.comm	_SNDRV_RAWMIDI_STREAM_OUTPUT,4,2 ; @SNDRV_RAWMIDI_STREAM_OUTPUT
	.comm	_snd_sb8dsp_midi_output,4,2     ; @snd_sb8dsp_midi_output
	.comm	_SNDRV_RAWMIDI_STREAM_INPUT,4,2 ; @SNDRV_RAWMIDI_STREAM_INPUT
	.comm	_snd_sb8dsp_midi_input,4,2      ; @snd_sb8dsp_midi_input
	.comm	_SNDRV_RAWMIDI_INFO_OUTPUT,4,2  ; @SNDRV_RAWMIDI_INFO_OUTPUT
	.comm	_SNDRV_RAWMIDI_INFO_INPUT,4,2   ; @SNDRV_RAWMIDI_INFO_INPUT
	.comm	_SB_HW_20,8,3                   ; @SB_HW_20
	.comm	_SNDRV_RAWMIDI_INFO_DUPLEX,4,2  ; @SNDRV_RAWMIDI_INFO_DUPLEX
.subsections_via_symbols
