	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sound_init                     ## -- Begin function sound_init
	.p2align	4, 0x90
_sound_init:                            ## @sound_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_system_hw@GOTPCREL(%rip), %rax
	movq	_SYSTEM_PBC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	movq	_SYSTEM_MD@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_YM2612Init
	movq	_config@GOTPCREL(%rip), %rax
	movl	8(%rax), %edi
	callq	_YM2612Config
	movl	$1008, %eax                     ## imm = 0x3F0
	movq	_YM2612Write@GOTPCREL(%rip), %rcx
	movq	_YM2612Update@GOTPCREL(%rip), %rdx
	movq	_YM2612ResetChip@GOTPCREL(%rip), %rsi
	jmp	LBB0_3
LBB0_2:
	xorl	%eax, %eax
	callq	_YM2413Init
	movl	$1080, %eax                     ## imm = 0x438
	movq	_YM2413Write@GOTPCREL(%rip), %rcx
	movq	_YM2413Update@GOTPCREL(%rip), %rdx
	movq	_YM2413ResetChip@GOTPCREL(%rip), %rsi
LBB0_3:
	movl	(%rsi), %esi
	movq	_YM_Reset@GOTPCREL(%rip), %rdi
	movl	%esi, (%rdi)
	movl	(%rdx), %edx
	movq	_YM_Update@GOTPCREL(%rip), %rsi
	movl	%edx, (%rsi)
	movl	(%rcx), %ecx
	movq	_YM_Write@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movq	_fm_cycles_ratio@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_config@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	xorl	%edi, %edi
	movl	$255, %ecx
	popq	%rbp
	jmp	_SN76489_Config                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_system_hw,4,2                  ## @system_hw
	.comm	_SYSTEM_PBC,4,2                 ## @SYSTEM_PBC
	.comm	_SYSTEM_MD,4,2                  ## @SYSTEM_MD
	.comm	_config,12,2                    ## @config
	.comm	_YM2612ResetChip,4,2            ## @YM2612ResetChip
	.comm	_YM_Reset,4,2                   ## @YM_Reset
	.comm	_YM2612Update,4,2               ## @YM2612Update
	.comm	_YM_Update,4,2                  ## @YM_Update
	.comm	_YM2612Write,4,2                ## @YM2612Write
	.comm	_YM_Write,4,2                   ## @YM_Write
	.comm	_fm_cycles_ratio,4,2            ## @fm_cycles_ratio
	.comm	_YM2413ResetChip,4,2            ## @YM2413ResetChip
	.comm	_YM2413Update,4,2               ## @YM2413Update
	.comm	_YM2413Write,4,2                ## @YM2413Write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sound_init                     ; -- Begin function sound_init
	.p2align	2
_sound_init:                            ; @sound_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _system_hw@GOTPAGE
Lloh1:
	ldr	x8, [x8, _system_hw@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SYSTEM_PBC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SYSTEM_PBC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh6:
	adrp	x9, _SYSTEM_MD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SYSTEM_MD@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x19, _config@GOTPAGE
Lloh10:
	ldr	x19, [x19, _config@GOTPAGEOFF]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	bl	_YM2612Init
	ldr	w0, [x19, #8]
	bl	_YM2612Config
	mov	w8, #1008
Lloh11:
	adrp	x9, _YM2612Write@GOTPAGE
Lloh12:
	ldr	x9, [x9, _YM2612Write@GOTPAGEOFF]
Lloh13:
	adrp	x10, _YM2612Update@GOTPAGE
Lloh14:
	ldr	x10, [x10, _YM2612Update@GOTPAGEOFF]
Lloh15:
	adrp	x11, _YM2612ResetChip@GOTPAGE
Lloh16:
	ldr	x11, [x11, _YM2612ResetChip@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	bl	_YM2413Init
	mov	w8, #1080
Lloh17:
	adrp	x9, _YM2413Write@GOTPAGE
Lloh18:
	ldr	x9, [x9, _YM2413Write@GOTPAGEOFF]
Lloh19:
	adrp	x10, _YM2413Update@GOTPAGE
Lloh20:
	ldr	x10, [x10, _YM2413Update@GOTPAGEOFF]
Lloh21:
	adrp	x11, _YM2413ResetChip@GOTPAGE
Lloh22:
	ldr	x11, [x11, _YM2413ResetChip@GOTPAGEOFF]
LBB0_3:
	ldr	w11, [x11]
Lloh23:
	adrp	x12, _YM_Reset@GOTPAGE
Lloh24:
	ldr	x12, [x12, _YM_Reset@GOTPAGEOFF]
Lloh25:
	str	w11, [x12]
	ldr	w10, [x10]
Lloh26:
	adrp	x11, _YM_Update@GOTPAGE
Lloh27:
	ldr	x11, [x11, _YM_Update@GOTPAGEOFF]
Lloh28:
	str	w10, [x11]
	ldr	w9, [x9]
Lloh29:
	adrp	x10, _YM_Write@GOTPAGE
Lloh30:
	ldr	x10, [x10, _YM_Write@GOTPAGEOFF]
Lloh31:
	str	w9, [x10]
Lloh32:
	adrp	x9, _fm_cycles_ratio@GOTPAGE
Lloh33:
	ldr	x9, [x9, _fm_cycles_ratio@GOTPAGEOFF]
Lloh34:
	str	w8, [x9]
	ldp	w2, w1, [x19]
	mov	w0, #0
	mov	w3, #255
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_SN76489_Config
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_system_hw,4,2                  ; @system_hw
	.comm	_SYSTEM_PBC,4,2                 ; @SYSTEM_PBC
	.comm	_SYSTEM_MD,4,2                  ; @SYSTEM_MD
	.comm	_config,12,2                    ; @config
	.comm	_YM2612ResetChip,4,2            ; @YM2612ResetChip
	.comm	_YM_Reset,4,2                   ; @YM_Reset
	.comm	_YM2612Update,4,2               ; @YM2612Update
	.comm	_YM_Update,4,2                  ; @YM_Update
	.comm	_YM2612Write,4,2                ; @YM2612Write
	.comm	_YM_Write,4,2                   ; @YM_Write
	.comm	_fm_cycles_ratio,4,2            ; @fm_cycles_ratio
	.comm	_YM2413ResetChip,4,2            ; @YM2413ResetChip
	.comm	_YM2413Update,4,2               ; @YM2413Update
	.comm	_YM2413Write,4,2                ; @YM2413Write
.subsections_via_symbols
