	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_rawmidi_kernel_open        ## -- Begin function snd_rawmidi_kernel_open
	.p2align	4, 0x90
_snd_rawmidi_kernel_open:               ## @snd_rawmidi_kernel_open
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%r8, %r8
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_snd_rawmidi_search
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_try_module_get
	movl	%eax, %ebx
	movq	_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.7:
	movl	%r14d, %ebx
	movq	%r12, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movq	%r13, %rcx
	callq	_rawmidi_open_priv
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jns	LBB0_9
## %bb.8:
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_module_put
	jmp	LBB0_9
LBB0_4:
	movq	_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_register_mutex,4,2             ## @register_mutex
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENXIO,4,2                      ## @ENXIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_rawmidi_kernel_open        ; -- Begin function snd_rawmidi_kernel_open
	.p2align	2
_snd_rawmidi_kernel_open:               ; @snd_rawmidi_kernel_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	cmp	x4, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_3:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh2:
	adrp	x0, _register_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _register_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x23
	mov	x1, x22
	bl	_snd_rawmidi_search
	cbz	x0, LBB0_8
; %bb.5:
	mov	x22, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_try_module_get
	mov	x23, x0
Lloh4:
	adrp	x0, _register_mutex@GOTPAGE
Lloh5:
	ldr	x0, [x0, _register_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	cbz	w23, LBB0_9
; %bb.6:
	add	x23, x22, #8
	mov	x0, x23
	bl	_mutex_lock
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_rawmidi_open_priv
	mov	x19, x0
	mov	x0, x23
	bl	_mutex_unlock
	tbz	w19, #31, LBB0_3
; %bb.7:
	ldr	x8, [x22]
	ldr	w0, [x8]
	bl	_module_put
	b	LBB0_3
LBB0_8:
Lloh6:
	adrp	x0, _register_mutex@GOTPAGE
Lloh7:
	ldr	x0, [x0, _register_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_2
LBB0_9:
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_register_mutex,4,2             ; @register_mutex
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENXIO,4,2                      ; @ENXIO
.subsections_via_symbols
