	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_virmidi_new                ## -- Begin function snd_virmidi_new
	.p2align	4, 0x90
_snd_virmidi_new:                       ## @snd_virmidi_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	%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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	$0, (%rdx)
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %r9
	movl	%r15d, %edx
	movl	$16, %ecx
	movl	$16, %r8d
	callq	_snd_rawmidi_new
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	-40(%rbp), %rax
	movl	32(%rax), %esi
	movl	36(%rax), %edi
	callq	_strcpy
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%r12, 32(%rax)
	movq	-40(%rbp), %rax
	movq	%rax, 24(%rbx)
	movl	%r15d, (%rbx)
	movl	$-1, 4(%rbx)
	leaq	16(%rbx), %rdi
	callq	_rwlock_init
	movq	%rbx, %rdi
	addq	$12, %rdi
	callq	_INIT_LIST_HEAD
	movq	_SNDRV_VIRMIDI_SEQ_DISPATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	-40(%rbp), %rdi
	movq	%rbx, 24(%rdi)
	movq	_snd_virmidi_free@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movq	_snd_virmidi_global_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rdi)
	movq	_SNDRV_RAWMIDI_STREAM_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_virmidi_input_ops@GOTPCREL(%rip), %rdx
	callq	_snd_rawmidi_set_ops
	movq	-40(%rbp), %rdi
	movq	_SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_snd_virmidi_output_ops@GOTPCREL(%rip), %rdx
	callq	_snd_rawmidi_set_ops
	movq	_SNDRV_RAWMIDI_INFO_INPUT@GOTPCREL(%rip), %rax
	movq	_SNDRV_RAWMIDI_INFO_OUTPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SNDRV_RAWMIDI_INFO_DUPLEX@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	-40(%rbp), %rax
	movl	%ecx, (%rax)
	movq	%rax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	-40(%rbp), %rsi
	movq	%r12, %rdi
	callq	_snd_device_free
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VirMidi"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SNDRV_VIRMIDI_SEQ_DISPATCH,4,2 ## @SNDRV_VIRMIDI_SEQ_DISPATCH
	.comm	_snd_virmidi_free,4,2           ## @snd_virmidi_free
	.comm	_snd_virmidi_global_ops,4,2     ## @snd_virmidi_global_ops
	.comm	_SNDRV_RAWMIDI_STREAM_INPUT,4,2 ## @SNDRV_RAWMIDI_STREAM_INPUT
	.comm	_snd_virmidi_input_ops,4,2      ## @snd_virmidi_input_ops
	.comm	_SNDRV_RAWMIDI_STREAM_OUTPUT,4,2 ## @SNDRV_RAWMIDI_STREAM_OUTPUT
	.comm	_snd_virmidi_output_ops,4,2     ## @snd_virmidi_output_ops
	.comm	_SNDRV_RAWMIDI_INFO_INPUT,4,2   ## @SNDRV_RAWMIDI_INFO_INPUT
	.comm	_SNDRV_RAWMIDI_INFO_OUTPUT,4,2  ## @SNDRV_RAWMIDI_INFO_OUTPUT
	.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_virmidi_new                ; -- Begin function snd_virmidi_new
	.p2align	2
_snd_virmidi_new:                       ; @snd_virmidi_new
	.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, x2
	mov	x20, x1
	mov	x21, x0
	str	xzr, [x2]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x5, sp, #8
	mov	x2, x20
	mov	w3, #16
	mov	w4, #16
	bl	_snd_rawmidi_new
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	x8, [sp, #8]
	ldp	w1, w0, [x8, #32]
	bl	_strcpy
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.2:
	mov	x22, x0
	ldr	x8, [sp, #8]
	stp	x8, x21, [x0, #24]
	mov	w8, #-1
	stp	w20, w8, [x0], #16
	bl	_rwlock_init
	add	x0, x22, #12
	bl	_INIT_LIST_HEAD
Lloh5:
	adrp	x8, _SNDRV_VIRMIDI_SEQ_DISPATCH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SNDRV_VIRMIDI_SEQ_DISPATCH@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x22, #8]
	ldr	x0, [sp, #8]
	str	x22, [x0, #24]
Lloh8:
	adrp	x8, _snd_virmidi_free@GOTPAGE
Lloh9:
	ldr	x8, [x8, _snd_virmidi_free@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x0, #16]
Lloh11:
	adrp	x8, _snd_virmidi_global_ops@GOTPAGE
Lloh12:
	ldr	x8, [x8, _snd_virmidi_global_ops@GOTPAGEOFF]
	str	x8, [x0, #8]
Lloh13:
	adrp	x8, _SNDRV_RAWMIDI_STREAM_INPUT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SNDRV_RAWMIDI_STREAM_INPUT@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, _snd_virmidi_input_ops@GOTPAGE
Lloh17:
	ldr	x2, [x2, _snd_virmidi_input_ops@GOTPAGEOFF]
	bl	_snd_rawmidi_set_ops
	ldr	x0, [sp, #8]
Lloh18:
	adrp	x8, _SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, _snd_virmidi_output_ops@GOTPAGE
Lloh22:
	ldr	x2, [x2, _snd_virmidi_output_ops@GOTPAGEOFF]
	bl	_snd_rawmidi_set_ops
	mov	w0, #0
Lloh23:
	adrp	x8, _SNDRV_RAWMIDI_INFO_INPUT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SNDRV_RAWMIDI_INFO_INPUT@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _SNDRV_RAWMIDI_INFO_OUTPUT@GOTPAGE
Lloh27:
	ldr	x9, [x9, _SNDRV_RAWMIDI_INFO_OUTPUT@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
Lloh29:
	adrp	x10, _SNDRV_RAWMIDI_INFO_DUPLEX@GOTPAGE
Lloh30:
	ldr	x10, [x10, _SNDRV_RAWMIDI_INFO_DUPLEX@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh31:
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	x9, [sp, #8]
	str	w8, [x9]
	str	x9, [x19]
	b	LBB0_4
LBB0_3:
	ldr	x1, [sp, #8]
	mov	x0, x21
	bl	_snd_device_free
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VirMidi"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SNDRV_VIRMIDI_SEQ_DISPATCH,4,2 ; @SNDRV_VIRMIDI_SEQ_DISPATCH
	.comm	_snd_virmidi_free,4,2           ; @snd_virmidi_free
	.comm	_snd_virmidi_global_ops,4,2     ; @snd_virmidi_global_ops
	.comm	_SNDRV_RAWMIDI_STREAM_INPUT,4,2 ; @SNDRV_RAWMIDI_STREAM_INPUT
	.comm	_snd_virmidi_input_ops,4,2      ; @snd_virmidi_input_ops
	.comm	_SNDRV_RAWMIDI_STREAM_OUTPUT,4,2 ; @SNDRV_RAWMIDI_STREAM_OUTPUT
	.comm	_snd_virmidi_output_ops,4,2     ; @snd_virmidi_output_ops
	.comm	_SNDRV_RAWMIDI_INFO_INPUT,4,2   ; @SNDRV_RAWMIDI_INFO_INPUT
	.comm	_SNDRV_RAWMIDI_INFO_OUTPUT,4,2  ; @SNDRV_RAWMIDI_INFO_OUTPUT
	.comm	_SNDRV_RAWMIDI_INFO_DUPLEX,4,2  ; @SNDRV_RAWMIDI_INFO_DUPLEX
.subsections_via_symbols
