	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_opl3_seq_new_device
_snd_opl3_seq_new_device:               ## @snd_opl3_seq_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_SNDRV_SEQ_DEVICE_ARGPTR
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	leaq	48(%rbx), %rdi
	callq	_spin_lock_init
	movl	$-1, (%rbx)
	movq	_OPL3_HW_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	4(%rbx), %edx
	sarl	$8, %edx
	leaq	L_.str(%rip), %rsi
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	callq	_sprintf
	movl	40(%rbx), %esi
	movl	44(%rbx), %edi
	movq	%r14, %rdx
	callq	_snd_seq_create_kernel_client
	movl	%eax, %r14d
	movl	%eax, (%rbx)
	testl	%eax, %eax
	js	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_snd_opl3_synth_create_port
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	leaq	24(%rbx), %rdi
	callq	_init_timer
	movq	_snd_opl3_timer_func@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	%rbx, 24(%rbx)
	leaq	16(%rbx), %rdi
	callq	_spin_lock_init
	movq	$0, 8(%rbx)
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_4:
	movl	%eax, %r15d
	movl	%r14d, %edi
	callq	_snd_seq_delete_kernel_client
	movl	$-1, (%rbx)
	movl	%r15d, %r14d
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_OPL3_HW_MASK,4,2               ## @OPL3_HW_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OPL%i FM synth"

	.comm	_snd_opl3_timer_func,4,2        ## @snd_opl3_timer_func
	.no_dead_strip	_snd_opl3_seq_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_opl3_seq_new_device
_snd_opl3_seq_new_device:               ; @snd_opl3_seq_new_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	bl	_SNDRV_SEQ_DEVICE_ARGPTR
	ldr	x19, [x0]
	cbz	x19, LBB0_4
; %bb.1:
	add	x0, x19, #48
	bl	_spin_lock_init
	mov	w8, #-1
	str	w8, [x19]
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _OPL3_HW_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OPL3_HW_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
	asr	w2, w8, #8
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	bl	_sprintf
	ldp	w1, w0, [x19, #40]
	add	x2, sp, #8
	bl	_snd_seq_create_kernel_client
	mov	x20, x0
	str	w0, [x19]
	tbnz	w0, #31, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_snd_opl3_synth_create_port
	tbnz	w0, #31, LBB0_5
; %bb.3:
	add	x0, x19, #24
	bl	_init_timer
Lloh8:
	adrp	x8, _snd_opl3_timer_func@GOTPAGE
Lloh9:
	ldr	x8, [x8, _snd_opl3_timer_func@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	str	x19, [x19, #24]
	add	x0, x19, #16
	bl	_spin_lock_init
	mov	w20, #0
	str	xzr, [x19, #8]
	b	LBB0_6
LBB0_4:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_5:
	mov	x21, x0
	mov	x0, x20
	bl	_snd_seq_delete_kernel_client
	mov	w8, #-1
	str	w8, [x19]
	mov	x20, x21
LBB0_6:
	ldr	x8, [sp, #40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_OPL3_HW_MASK,4,2               ; @OPL3_HW_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OPL%i FM synth"

	.comm	_snd_opl3_timer_func,4,2        ; @snd_opl3_timer_func
	.no_dead_strip	_snd_opl3_seq_new_device
.subsections_via_symbols
