	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_msndmidi_new               ## -- Begin function snd_msndmidi_new
	.p2align	4, 0x90
_snd_msndmidi_new:                      ## @snd_msndmidi_new
	.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
	movl	%esi, %edx
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	leaq	L_.str(%rip), %rsi
	leaq	-24(%rbp), %r9
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_snd_rawmidi_new
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %edi
	movl	$16, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%r14, 8(%rax)
	movq	%rax, (%r14)
	movq	-24(%rbp), %rcx
	movq	%rax, 16(%rcx)
	movq	_snd_msndmidi_free@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 8(%rcx)
	movq	%rax, %rdi
	callq	_spin_lock_init
	movq	-24(%rbp), %rax
	movl	4(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcpy
	movq	-24(%rbp), %rdi
	movq	_SNDRV_RAWMIDI_STREAM_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_msndmidi_input@GOTPCREL(%rip), %rdx
	callq	_snd_rawmidi_set_ops
	movq	_SNDRV_RAWMIDI_INFO_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-24(%rbp), %rcx
	orl	%eax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_snd_device_free
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MSND-MIDI"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_snd_msndmidi_free,4,2          ## @snd_msndmidi_free
L_.str.1:                               ## @.str.1
	.asciz	"MSND MIDI"

	.comm	_SNDRV_RAWMIDI_STREAM_INPUT,4,2 ## @SNDRV_RAWMIDI_STREAM_INPUT
	.comm	_snd_msndmidi_input,4,2         ## @snd_msndmidi_input
	.comm	_SNDRV_RAWMIDI_INFO_INPUT,4,2   ## @SNDRV_RAWMIDI_INFO_INPUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_msndmidi_new               ; -- Begin function snd_msndmidi_new
	.p2align	2
_snd_msndmidi_new:                      ; @snd_msndmidi_new
	.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	x2, x1
	mov	x19, x0
	ldr	x20, [x0]
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_4
; %bb.1:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w0, #1
	mov	w1, #16
	bl	_kcalloc
	cbz	x0, LBB0_3
; %bb.2:
	str	x20, [x0, #8]
	str	x0, [x20]
	ldr	x8, [sp, #8]
	str	x0, [x8, #16]
Lloh5:
	adrp	x9, _snd_msndmidi_free@GOTPAGE
Lloh6:
	ldr	x9, [x9, _snd_msndmidi_free@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	str	w9, [x8, #8]
	bl	_spin_lock_init
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #4]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcpy
	ldr	x0, [sp, #8]
Lloh10:
	adrp	x8, _SNDRV_RAWMIDI_STREAM_INPUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SNDRV_RAWMIDI_STREAM_INPUT@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x2, _snd_msndmidi_input@GOTPAGE
Lloh14:
	ldr	x2, [x2, _snd_msndmidi_input@GOTPAGEOFF]
	bl	_snd_rawmidi_set_ops
	mov	w0, #0
Lloh15:
	adrp	x8, _SNDRV_RAWMIDI_INFO_INPUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SNDRV_RAWMIDI_INFO_INPUT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	b	LBB0_4
LBB0_3:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_snd_device_free
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MSND-MIDI"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_snd_msndmidi_free,4,2          ; @snd_msndmidi_free
l_.str.1:                               ; @.str.1
	.asciz	"MSND MIDI"

	.comm	_SNDRV_RAWMIDI_STREAM_INPUT,4,2 ; @SNDRV_RAWMIDI_STREAM_INPUT
	.comm	_snd_msndmidi_input,4,2         ; @snd_msndmidi_input
	.comm	_SNDRV_RAWMIDI_INFO_INPUT,4,2   ; @SNDRV_RAWMIDI_INFO_INPUT
.subsections_via_symbols
