	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_YM2612Write                    ## -- Begin function YM2612Write
	.p2align	4, 0x90
_YM2612Write:                           ## @YM2612Write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%esi, %eax
	movzbl	%al, %esi
	cmpl	$2, %edi
	je	LBB0_3
## %bb.1:
	testl	%edi, %edi
	je	LBB0_2
## %bb.4:
	movq	_ym2612@GOTPCREL(%rip), %rcx
	movl	8(%rcx), %edi
	movl	%edi, %edx
	andl	$496, %edx                      ## imm = 0x1F0
	cmpl	$32, %edx
	jne	LBB0_9
## %bb.5:
	cmpl	$43, %edi
	je	LBB0_10
## %bb.6:
	cmpl	$42, %edi
	jne	LBB0_8
## %bb.7:
	shll	$6, %esi
	addl	$-8192, %esi                    ## imm = 0xE000
	movl	%esi, (%rcx)
	popq	%rbp
	retq
LBB0_3:
	orl	$256, %esi                      ## imm = 0x100
LBB0_2:
	movq	_ym2612@GOTPCREL(%rip), %rax
	movl	%esi, 8(%rax)
	popq	%rbp
	retq
LBB0_9:
	popq	%rbp
	jmp	_OPNWriteReg                    ## TAILCALL
LBB0_10:
	andl	$128, %eax
	movl	%eax, 4(%rcx)
	popq	%rbp
	retq
LBB0_8:
	popq	%rbp
	jmp	_OPNWriteMode                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ym2612,12,2                    ## @ym2612
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_YM2612Write                    ; -- Begin function YM2612Write
	.p2align	2
_YM2612Write:                           ; @YM2612Write
	.cfi_startproc
; %bb.0:
	mov	x8, x1
	and	w1, w1, #0xff
	cmp	w0, #2
	b.eq	LBB0_3
; %bb.1:
	cbnz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _ym2612@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ym2612@GOTPAGEOFF]
Lloh2:
	str	w1, [x8, #8]
	ret
LBB0_3:
	orr	w8, w1, #0x100
Lloh3:
	adrp	x9, _ym2612@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ym2612@GOTPAGEOFF]
Lloh5:
	str	w8, [x9, #8]
	ret
LBB0_4:
Lloh6:
	adrp	x9, _ym2612@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ym2612@GOTPAGEOFF]
	ldr	w0, [x9, #8]
	and	w10, w0, #0x1f0
	cmp	w10, #32
	b.ne	LBB0_8
; %bb.5:
	cmp	w0, #43
	b.eq	LBB0_9
; %bb.6:
	cmp	w0, #42
	b.ne	LBB0_10
; %bb.7:
	lsl	w8, w1, #6
	sub	w8, w8, #2, lsl #12             ; =8192
	str	w8, [x9]
	ret
LBB0_8:
	b	_OPNWriteReg
LBB0_9:
	and	w8, w8, #0x80
	str	w8, [x9, #4]
	ret
LBB0_10:
	b	_OPNWriteMode
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ym2612,12,2                    ; @ym2612
.subsections_via_symbols
