	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_opl3_hwdep_new             ## -- Begin function snd_opl3_hwdep_new
	.p2align	4, 0x90
_snd_opl3_hwdep_new:                    ## @snd_opl3_hwdep_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	%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	%rcx, %r14
	movl	%edx, %r15d
	movl	%esi, %edx
	movq	%rdi, %r12
	movq	24(%rdi), %r13
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movq	$0, (%r14)
LBB0_2:
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rcx
	movq	%r13, %rdi
	callq	_snd_hwdep_new
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	-48(%rbp), %rax
	movq	%r12, 56(%rax)
	movl	$1, (%rax)
	movq	8(%rax), %rdi
	movq	16(%rax), %rsi
	callq	_strcpy
	movq	_OPL3_HW_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r12), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.5:
	cmpl	$129, %eax
	je	LBB0_9
## %bb.6:
	cmpl	$130, %eax
	jne	LBB0_7
## %bb.8:
	movq	-48(%rbp), %rax
	movq	8(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcpy
	movq	_SNDRV_HWDEP_IFACE_OPL2@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_3:
	movl	%eax, %ebx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_snd_device_free
	jmp	LBB0_14
LBB0_10:
	movq	-48(%rbp), %rax
	movq	8(%rax), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcpy
	movq	_SNDRV_HWDEP_IFACE_OPL4@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	-48(%rbp), %rax
	movq	8(%rax), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcpy
	movq	_SNDRV_HWDEP_IFACE_OPL3@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %ecx
	movq	-48(%rbp), %rax
	movl	%ecx, 40(%rax)
	jmp	LBB0_12
LBB0_7:
	movq	-48(%rbp), %rax
LBB0_12:
	xorl	%ebx, %ebx
	movq	_snd_opl3_open@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rax)
	movq	_snd_opl3_ioctl@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rax)
	movq	_snd_opl3_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rax)
	movq	_snd_opl3_release@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rax)
	movq	%rax, 16(%r12)
	movl	%r15d, 4(%r12)
	testq	%r14, %r14
	je	LBB0_14
## %bb.13:
	movq	%rax, (%r14)
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OPL2/OPL3"

	.comm	_OPL3_HW_MASK,4,2               ## @OPL3_HW_MASK
L_.str.1:                               ## @.str.1
	.asciz	"OPL2 FM"

	.comm	_SNDRV_HWDEP_IFACE_OPL2,4,2     ## @SNDRV_HWDEP_IFACE_OPL2
L_.str.2:                               ## @.str.2
	.asciz	"OPL3 FM"

	.comm	_SNDRV_HWDEP_IFACE_OPL3,4,2     ## @SNDRV_HWDEP_IFACE_OPL3
L_.str.3:                               ## @.str.3
	.asciz	"OPL4 FM"

	.comm	_SNDRV_HWDEP_IFACE_OPL4,4,2     ## @SNDRV_HWDEP_IFACE_OPL4
	.comm	_snd_opl3_open,4,2              ## @snd_opl3_open
	.comm	_snd_opl3_ioctl,4,2             ## @snd_opl3_ioctl
	.comm	_snd_opl3_write,4,2             ## @snd_opl3_write
	.comm	_snd_opl3_release,4,2           ## @snd_opl3_release
	.comm	_SNDRV_OSS_DEVICE_TYPE_DMFM,4,2 ## @SNDRV_OSS_DEVICE_TYPE_DMFM
	.comm	_SNDRV_SEQ_DEV_ID_OPL3,4,2      ## @SNDRV_SEQ_DEV_ID_OPL3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_opl3_hwdep_new             ; -- Begin function snd_opl3_hwdep_new
	.p2align	2
_snd_opl3_hwdep_new:                    ; @snd_opl3_hwdep_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x3
	mov	x21, x2
	mov	x2, x1
	mov	x20, x0
	ldr	x22, [x0, #24]
	cbz	x3, LBB0_2
; %bb.1:
	str	xzr, [x19]
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x3, sp, #8
	mov	x0, x22
	bl	_snd_hwdep_new
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	x8, [sp, #8]
	str	x20, [x8, #56]
	mov	w9, #1
	str	w9, [x8]
	ldp	x0, x1, [x8, #8]
	bl	_strcpy
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _OPL3_HW_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _OPL3_HW_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.4:
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.5:
	cmp	w8, #130
	b.ne	LBB0_11
; %bb.6:
	ldr	x8, [sp, #8]
	ldr	x0, [x8, #8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcpy
Lloh7:
	adrp	x8, _SNDRV_HWDEP_IFACE_OPL2@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SNDRV_HWDEP_IFACE_OPL2@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	mov	x23, x0
	mov	x0, x22
	mov	x1, x20
	bl	_snd_device_free
	b	LBB0_14
LBB0_8:
	ldr	x8, [sp, #8]
	ldr	x0, [x8, #8]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcpy
Lloh11:
	adrp	x8, _SNDRV_HWDEP_IFACE_OPL4@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SNDRV_HWDEP_IFACE_OPL4@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
	ldr	x8, [sp, #8]
	ldr	x0, [x8, #8]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcpy
Lloh15:
	adrp	x8, _SNDRV_HWDEP_IFACE_OPL3@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SNDRV_HWDEP_IFACE_OPL3@GOTPAGEOFF]
LBB0_10:
	ldr	w9, [x8]
	ldr	x8, [sp, #8]
	str	w9, [x8, #40]
	b	LBB0_12
LBB0_11:
	ldr	x8, [sp, #8]
LBB0_12:
Lloh17:
	adrp	x9, _snd_opl3_open@GOTPAGE
Lloh18:
	ldr	x9, [x9, _snd_opl3_open@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _snd_opl3_ioctl@GOTPAGE
Lloh21:
	ldr	x10, [x10, _snd_opl3_ioctl@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	stp	w10, w9, [x8, #32]
Lloh23:
	adrp	x9, _snd_opl3_write@GOTPAGE
Lloh24:
	ldr	x9, [x9, _snd_opl3_write@GOTPAGEOFF]
Lloh25:
	adrp	x10, _snd_opl3_release@GOTPAGE
Lloh26:
	ldr	x10, [x10, _snd_opl3_release@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
Lloh28:
	ldr	w10, [x10]
	stp	w10, w9, [x8, #24]
	str	x8, [x20, #16]
	str	w21, [x20, #4]
	mov	w23, #0
	cbz	x19, LBB0_14
; %bb.13:
	str	x8, [x19]
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OPL2/OPL3"

	.comm	_OPL3_HW_MASK,4,2               ; @OPL3_HW_MASK
l_.str.1:                               ; @.str.1
	.asciz	"OPL2 FM"

	.comm	_SNDRV_HWDEP_IFACE_OPL2,4,2     ; @SNDRV_HWDEP_IFACE_OPL2
l_.str.2:                               ; @.str.2
	.asciz	"OPL3 FM"

	.comm	_SNDRV_HWDEP_IFACE_OPL3,4,2     ; @SNDRV_HWDEP_IFACE_OPL3
l_.str.3:                               ; @.str.3
	.asciz	"OPL4 FM"

	.comm	_SNDRV_HWDEP_IFACE_OPL4,4,2     ; @SNDRV_HWDEP_IFACE_OPL4
	.comm	_snd_opl3_open,4,2              ; @snd_opl3_open
	.comm	_snd_opl3_ioctl,4,2             ; @snd_opl3_ioctl
	.comm	_snd_opl3_write,4,2             ; @snd_opl3_write
	.comm	_snd_opl3_release,4,2           ; @snd_opl3_release
	.comm	_SNDRV_OSS_DEVICE_TYPE_DMFM,4,2 ; @SNDRV_OSS_DEVICE_TYPE_DMFM
	.comm	_SNDRV_SEQ_DEV_ID_OPL3,4,2      ; @SNDRV_SEQ_DEV_ID_OPL3
.subsections_via_symbols
