	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_synth_new_device
_snd_emu10k1_synth_new_device:          ## @snd_emu10k1_synth_new_device
	.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	%rdi, %r14
	callq	_SNDRV_SEQ_DEVICE_ARGPTR
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	xorl	%r15d, %r15d
	cmpl	$0, (%rax)
	jle	LBB0_14
## %bb.2:
	movl	4(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.3:
	movl	$64, %eax
	cmpl	$65, %ecx
	jae	LBB0_6
	jmp	LBB0_7
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_5:
	movl	$1, %eax
LBB0_6:
	movl	%eax, 4(%rbx)
LBB0_7:
	leaq	-40(%rbp), %rdi
	callq	_snd_emux_new
	testq	%rax, %rax
	js	LBB0_12
## %bb.8:
	movq	-40(%rbp), %rdi
	callq	_snd_emu10k1_ops_setup
	movq	16(%rbx), %r12
	movq	-40(%rbp), %rdi
	movq	%r12, 40(%rdi)
	movl	4(%rbx), %eax
	movl	%eax, (%rdi)
	movl	(%rbx), %eax
	movl	%eax, 4(%rdi)
	movl	$-501, 8(%rdi)                  ## imm = 0xFE0B
	movl	24(%r12), %ecx
	cmpl	$2, %eax
	movl	$2, %edx
	cmovgel	%edx, %eax
	movl	%ecx, 32(%rdi)
	movl	%eax, 12(%rdi)
	cmpq	$1, 16(%r12)
	sbbl	$0, %edx
	movl	%edx, 16(%rdi)
	movq	$0, 24(%rdi)
	movl	$2, 20(%rdi)
	movl	8(%r14), %esi
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rcx
	callq	_snd_emux_register
	testq	%rax, %rax
	js	LBB0_11
## %bb.9:
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	-40(%rbp), %rax
	movq	%rax, 8(%r12)
	movq	_snd_emu10k1_synth_get_voice@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	-40(%rbp), %rax
	movq	%rax, (%r14)
	jmp	LBB0_14
LBB0_11:
	movq	-40(%rbp), %rdi
	callq	_snd_emux_free
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Emu10k1"

	.comm	_snd_emu10k1_synth_get_voice,4,2 ## @snd_emu10k1_synth_get_voice
	.no_dead_strip	_snd_emu10k1_synth_new_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_emu10k1_synth_new_device
_snd_emu10k1_synth_new_device:          ; @snd_emu10k1_synth_new_device
	.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, x0
	bl	_SNDRV_SEQ_DEVICE_ARGPTR
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	cmp	w8, #65
	b.lo	LBB0_9
; %bb.4:
	mov	w8, #64
	b	LBB0_8
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_6:
	mov	w0, #0
	b	LBB0_15
LBB0_7:
	mov	w8, #1
LBB0_8:
	str	w8, [x20, #4]
LBB0_9:
	add	x0, sp, #8
	bl	_snd_emux_new
	tbnz	x0, #63, LBB0_13
; %bb.10:
	ldr	x0, [sp, #8]
	bl	_snd_emu10k1_ops_setup
	ldr	x21, [x20, #16]
	ldr	x0, [sp, #8]
	str	x21, [x0, #40]
	ldr	d0, [x20]
	rev64.2s	v1, v0
	str	d1, [x0]
	mov	w8, #-501
	ldr	w9, [x21, #24]
	str	w9, [x0, #32]
	fmov	w9, s0
	mov	w10, #2
	cmp	w9, #2
	csel	w9, w9, w10, lt
	stp	w8, w9, [x0, #8]
	ldr	x8, [x21, #16]
	cmp	x8, #0
	mov	w8, #1
	cinc	w8, w8, ne
	str	xzr, [x0, #24]
	stp	w8, w10, [x0, #16]
	ldr	w1, [x19, #8]
	ldr	w2, [x20, #8]
Lloh2:
	adrp	x3, l_.str@PAGE
Lloh3:
	add	x3, x3, l_.str@PAGEOFF
	bl	_snd_emux_register
	tbnz	x0, #63, LBB0_12
; %bb.11:
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [sp, #8]
	str	x8, [x21, #8]
Lloh4:
	adrp	x8, _snd_emu10k1_synth_get_voice@GOTPAGE
Lloh5:
	ldr	x8, [x8, _snd_emu10k1_synth_get_voice@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x21, #4]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	ldr	x8, [sp, #8]
	str	x8, [x19]
	b	LBB0_15
LBB0_12:
	ldr	x0, [sp, #8]
	bl	_snd_emux_free
LBB0_13:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Emu10k1"

	.comm	_snd_emu10k1_synth_get_voice,4,2 ; @snd_emu10k1_synth_get_voice
	.no_dead_strip	_snd_emu10k1_synth_new_device
.subsections_via_symbols
