	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_opl3_detect
_snd_opl3_detect:                       ## @snd_opl3_detect
	.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	%rdi, %rbx
	movq	_OPL3_LEFT@GOTPCREL(%rip), %r12
	movq	_OPL3_REG_TIMER_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	orl	(%r12), %esi
	movq	_OPL3_TIMER1_MASK@GOTPCREL(%rip), %r15
	movq	_OPL3_TIMER2_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r15), %edx
	callq	*16(%rdi)
	movl	(%r13), %esi
	orl	(%r12), %esi
	movq	_OPL3_IRQ_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	*16(%rbx)
	movl	24(%rbx), %edi
	callq	_inb
	movl	%eax, %r14d
	cmpb	$32, %al
	jae	LBB0_1
## %bb.4:
	movq	_OPL3_REG_TIMER1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$255, %edx
	callq	*16(%rbx)
	movl	(%r13), %esi
	orl	(%r12), %esi
	movq	_OPL3_TIMER1_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OPL3_TIMER2_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	*16(%rbx)
	movl	$200, %edi
	callq	_udelay
	movl	24(%rbx), %edi
	callq	_inb
	movl	(%r13), %esi
	orl	(%r12), %esi
	movq	%r15, %rcx
	movl	%eax, %r15d
	movq	_OPL3_TIMER2_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%rcx), %edx
	movq	%rbx, %rdi
	callq	*16(%rbx)
	movl	(%r13), %esi
	orl	(%r12), %esi
	movq	_OPL3_IRQ_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	*16(%rbx)
	movl	%r15d, %eax
	andb	$-32, %al
	cmpb	$-64, %al
	jne	LBB0_5
## %bb.6:
	movq	(%rbx), %rax
	movq	_OPL3_HW_AUTO@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.7:
	cmpb	$6, %r14b
	jne	LBB0_9
## %bb.8:
	movq	_OPL3_HW_OPL2@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_1:
	movzbl	%r14b, %esi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_5:
	movzbl	%r15b, %esi
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_snd_printd
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%edi, %edi
	cmpl	$0, 8(%rbx)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_3
## %bb.10:
	movq	_OPL3_HW_OPL3@GOTPCREL(%rip), %rax
LBB0_11:
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_OPL3_LEFT,4,2                  ## @OPL3_LEFT
	.comm	_OPL3_REG_TIMER_CONTROL,4,2     ## @OPL3_REG_TIMER_CONTROL
	.comm	_OPL3_TIMER1_MASK,4,2           ## @OPL3_TIMER1_MASK
	.comm	_OPL3_TIMER2_MASK,4,2           ## @OPL3_TIMER2_MASK
	.comm	_OPL3_IRQ_RESET,4,2             ## @OPL3_IRQ_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OPL3: stat1 = 0x%x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_OPL3_REG_TIMER1,4,2            ## @OPL3_REG_TIMER1
	.comm	_OPL3_TIMER1_START,4,2          ## @OPL3_TIMER1_START
L_.str.1:                               ## @.str.1
	.asciz	"OPL3: stat2 = 0x%x\n"

	.comm	_OPL3_HW_AUTO,8,3               ## @OPL3_HW_AUTO
	.comm	_OPL3_HW_OPL2,8,3               ## @OPL3_HW_OPL2
	.comm	_OPL3_HW_OPL3,8,3               ## @OPL3_HW_OPL3
	.no_dead_strip	_snd_opl3_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_opl3_detect
_snd_opl3_detect:                       ; @snd_opl3_detect
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x22, _OPL3_LEFT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _OPL3_LEFT@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh2:
	adrp	x23, _OPL3_REG_TIMER_CONTROL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _OPL3_REG_TIMER_CONTROL@GOTPAGEOFF]
	ldr	w10, [x23]
Lloh4:
	adrp	x24, _OPL3_TIMER1_MASK@GOTPAGE
Lloh5:
	ldr	x24, [x24, _OPL3_TIMER1_MASK@GOTPAGEOFF]
	orr	w1, w10, w9
	ldr	w9, [x24]
Lloh6:
	adrp	x25, _OPL3_TIMER2_MASK@GOTPAGE
Lloh7:
	ldr	x25, [x25, _OPL3_TIMER2_MASK@GOTPAGEOFF]
	ldr	w10, [x25]
	orr	w2, w10, w9
	blr	x8
	ldr	x8, [x19, #16]
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w1, w10, w9
Lloh8:
	adrp	x26, _OPL3_IRQ_RESET@GOTPAGE
Lloh9:
	ldr	x26, [x26, _OPL3_IRQ_RESET@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x19
	blr	x8
	ldr	w0, [x19, #24]
	bl	_inb
	mov	x20, x0
	cmp	w0, #32
	b.hs	LBB0_5
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	w9, [x22]
Lloh10:
	adrp	x10, _OPL3_REG_TIMER1@GOTPAGE
Lloh11:
	ldr	x10, [x10, _OPL3_REG_TIMER1@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	orr	w1, w10, w9
	mov	x0, x19
	mov	w2, #255
	blr	x8
	ldr	x8, [x19, #16]
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w1, w10, w9
	ldr	w9, [x25]
Lloh13:
	adrp	x10, _OPL3_TIMER1_START@GOTPAGE
Lloh14:
	ldr	x10, [x10, _OPL3_TIMER1_START@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w2, w10, w9
	mov	x0, x19
	blr	x8
	mov	w0, #200
	bl	_udelay
	ldr	w0, [x19, #24]
	bl	_inb
	mov	x21, x0
	ldr	x8, [x19, #16]
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w1, w10, w9
	ldr	w9, [x24]
	ldr	w10, [x25]
	orr	w2, w10, w9
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #16]
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w1, w10, w9
	ldr	w2, [x26]
	mov	x0, x19
	blr	x8
	and	w8, w21, #0xe0
	cmp	w8, #192
	b.ne	LBB0_6
; %bb.2:
	ldr	x8, [x19]
Lloh16:
	adrp	x9, _OPL3_HW_AUTO@GOTPAGE
Lloh17:
	ldr	x9, [x9, _OPL3_HW_AUTO@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.3:
	cmp	w20, #6
	b.ne	LBB0_11
; %bb.4:
Lloh19:
	adrp	x8, _OPL3_HW_OPL2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _OPL3_HW_OPL2@GOTPAGEOFF]
	b	LBB0_13
LBB0_5:
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	b	LBB0_7
LBB0_6:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
LBB0_7:
	bl	_snd_printd
LBB0_8:
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w0, #0
	b	LBB0_9
LBB0_11:
	ldr	w8, [x19, #8]
	cmp	w8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_8
; %bb.12:
Lloh28:
	adrp	x8, _OPL3_HW_OPL3@GOTPAGE
Lloh29:
	ldr	x8, [x8, _OPL3_HW_OPL3@GOTPAGEOFF]
LBB0_13:
	mov	w0, #0
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_OPL3_LEFT,4,2                  ; @OPL3_LEFT
	.comm	_OPL3_REG_TIMER_CONTROL,4,2     ; @OPL3_REG_TIMER_CONTROL
	.comm	_OPL3_TIMER1_MASK,4,2           ; @OPL3_TIMER1_MASK
	.comm	_OPL3_TIMER2_MASK,4,2           ; @OPL3_TIMER2_MASK
	.comm	_OPL3_IRQ_RESET,4,2             ; @OPL3_IRQ_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OPL3: stat1 = 0x%x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_OPL3_REG_TIMER1,4,2            ; @OPL3_REG_TIMER1
	.comm	_OPL3_TIMER1_START,4,2          ; @OPL3_TIMER1_START
l_.str.1:                               ; @.str.1
	.asciz	"OPL3: stat2 = 0x%x\n"

	.comm	_OPL3_HW_AUTO,8,3               ; @OPL3_HW_AUTO
	.comm	_OPL3_HW_OPL2,8,3               ; @OPL3_HW_OPL2
	.comm	_OPL3_HW_OPL3,8,3               ; @OPL3_HW_OPL3
	.no_dead_strip	_snd_opl3_detect
.subsections_via_symbols
