	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_hdsp_create_midi
_snd_hdsp_create_midi:                  ## @snd_hdsp_create_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rsi), %rax
	movslq	%edx, %r14
	movq	%r14, %rbx
	shlq	$6, %rbx
	movl	%r14d, (%rax,%rbx)
	movq	$0, 8(%rax,%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rax,%rbx)
	movq	%rsi, 40(%rax,%rbx)
	leaq	(%rax,%rbx), %rdi
	addq	$16, %rdi
	movups	%xmm0, 24(%rax,%rbx)
	callq	_spin_lock_init
	movq	(%r15), %rdx
	leal	1(%r14), %r12d
	leaq	L_.str(%rip), %rsi
	leaq	-80(%rbp), %rdi
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_sprintf
	movq	(%r13), %rax
	leaq	(%rax,%rbx), %r9
	addq	$8, %r9
	movq	%r15, %rdi
	leaq	-80(%rbp), %rsi
	movl	%r14d, %edx
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_snd_rawmidi_new
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	(%r13), %rax
	movq	8(%rax,%rbx), %rax
	movslq	16(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_sprintf
	movq	(%r13), %rax
	movq	8(%rax,%rbx), %rdi
	addq	%rbx, %rax
	movq	%rax, 8(%rdi)
	movq	_SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_hdsp_midi_output@GOTPCREL(%rip), %rdx
	callq	_snd_rawmidi_set_ops
	movq	(%r13), %rax
	movq	8(%rax,%rbx), %rdi
	movq	_SNDRV_RAWMIDI_STREAM_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_hdsp_midi_input@GOTPCREL(%rip), %rdx
	callq	_snd_rawmidi_set_ops
	movq	_SNDRV_RAWMIDI_INFO_OUTPUT@GOTPCREL(%rip), %rax
	movq	_SNDRV_RAWMIDI_INFO_INPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SNDRV_RAWMIDI_INFO_DUPLEX@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	(%r13), %rax
	movq	8(%rax,%rbx), %rax
	orl	%ecx, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s MIDI %d"

L_.str.1:                               ## @.str.1
	.asciz	"HDSP MIDI %d"

	.comm	_SNDRV_RAWMIDI_STREAM_OUTPUT,4,2 ## @SNDRV_RAWMIDI_STREAM_OUTPUT
	.comm	_snd_hdsp_midi_output,4,2       ## @snd_hdsp_midi_output
	.comm	_SNDRV_RAWMIDI_STREAM_INPUT,4,2 ## @SNDRV_RAWMIDI_STREAM_INPUT
	.comm	_snd_hdsp_midi_input,4,2        ## @snd_hdsp_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	_SNDRV_RAWMIDI_INFO_DUPLEX,4,2  ## @SNDRV_RAWMIDI_INFO_DUPLEX
	.no_dead_strip	_snd_hdsp_create_midi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_hdsp_create_midi
_snd_hdsp_create_midi:                  ; @snd_hdsp_create_midi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x8, [x1]
	sbfiz	x23, x20, #6, #32
	add	x8, x8, x23
	str	w2, [x8]
	str	xzr, [x8, #8]
	stp	xzr, xzr, [x8, #48]
	stp	xzr, x1, [x8, #32]
	add	x0, x8, #16
	str	xzr, [x8, #24]
	bl	_spin_lock_init
	ldr	x8, [x21]
	add	w22, w20, #1
	stp	x8, x22, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #24
	bl	_sprintf
	ldr	x8, [x19]
	add	x8, x8, x23
	add	x5, x8, #8
	add	x1, sp, #24
	mov	x0, x21
	mov	x2, x20
	mov	w3, #1
	mov	w4, #1
	bl	_snd_rawmidi_new
	tbnz	x0, #63, LBB0_2
; %bb.1:
	sxtw	x8, w20
	ldr	x9, [x19]
	lsl	x20, x8, #6
	add	x8, x9, x20
	ldr	x8, [x8, #8]
	ldrsw	x0, [x8, #16]
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	str	x22, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_sprintf
	ldr	x8, [x19]
	add	x8, x8, x20
	ldr	x0, [x8, #8]
	str	x8, [x0, #8]
Lloh7:
	adrp	x8, _SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, _snd_hdsp_midi_output@GOTPAGE
Lloh11:
	ldr	x2, [x2, _snd_hdsp_midi_output@GOTPAGEOFF]
	bl	_snd_rawmidi_set_ops
	ldr	x8, [x19]
	add	x8, x8, x20
	ldr	x0, [x8, #8]
Lloh12:
	adrp	x8, _SNDRV_RAWMIDI_STREAM_INPUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SNDRV_RAWMIDI_STREAM_INPUT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, _snd_hdsp_midi_input@GOTPAGE
Lloh16:
	ldr	x2, [x2, _snd_hdsp_midi_input@GOTPAGEOFF]
	bl	_snd_rawmidi_set_ops
	mov	w0, #0
Lloh17:
	adrp	x8, _SNDRV_RAWMIDI_INFO_OUTPUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SNDRV_RAWMIDI_INFO_OUTPUT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _SNDRV_RAWMIDI_INFO_INPUT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SNDRV_RAWMIDI_INFO_INPUT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _SNDRV_RAWMIDI_INFO_DUPLEX@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SNDRV_RAWMIDI_INFO_DUPLEX@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	x9, [x19]
	add	x9, x9, x20
	ldr	x9, [x9, #8]
	ldr	w10, [x9]
	orr	w8, w8, w10
	str	w8, [x9]
	b	LBB0_3
LBB0_2:
	mov	w0, #-1
LBB0_3:
	ldr	x8, [sp, #56]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s MIDI %d"

l_.str.1:                               ; @.str.1
	.asciz	"HDSP MIDI %d"

	.comm	_SNDRV_RAWMIDI_STREAM_OUTPUT,4,2 ; @SNDRV_RAWMIDI_STREAM_OUTPUT
	.comm	_snd_hdsp_midi_output,4,2       ; @snd_hdsp_midi_output
	.comm	_SNDRV_RAWMIDI_STREAM_INPUT,4,2 ; @SNDRV_RAWMIDI_STREAM_INPUT
	.comm	_snd_hdsp_midi_input,4,2        ; @snd_hdsp_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	_SNDRV_RAWMIDI_INFO_DUPLEX,4,2  ; @SNDRV_RAWMIDI_INFO_DUPLEX
	.no_dead_strip	_snd_hdsp_create_midi
.subsections_via_symbols
