	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_midi_event_new             ## -- Begin function snd_midi_event_new
	.p2align	4, 0x90
_snd_midi_event_new:                    ## @snd_midi_event_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	$0, (%rsi)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	testl	%r15d, %r15d
	jle	LBB0_5
## %bb.3:
	movl	(%r12), %esi
	movl	%r15d, %edi
	callq	_kmalloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_4
LBB0_5:
	movl	%r15d, (%rbx)
	movl	$255, 4(%rbx)
	movq	_ST_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_spin_lock_init
	movq	%rbx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ST_INVALID,4,2                 ## @ST_INVALID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_midi_event_new             ; -- Begin function snd_midi_event_new
	.p2align	2
_snd_midi_event_new:                    ; @snd_midi_event_new
	.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
	mov	x21, x0
	str	xzr, [x1]
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	cmp	w21, #1
	b.lt	LBB0_3
; %bb.2:
	ldr	w1, [x22]
	mov	x0, x21
	bl	_kmalloc
	str	x0, [x20, #16]
	cbz	x0, LBB0_4
LBB0_3:
	mov	w8, #255
	stp	w21, w8, [x20]
Lloh2:
	adrp	x8, _ST_INVALID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ST_INVALID@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	add	x0, x20, #8
	bl	_spin_lock_init
	mov	w0, #0
	str	x20, [x19]
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_kfree
LBB0_5:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ST_INVALID,4,2                 ; @ST_INVALID
.subsections_via_symbols
