	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar_write_regs
_ar_write_regs:                         ## @ar_write_regs
	.cfi_startproc
## %bb.0:
	movl	%edi, %eax
	shrl	%eax
	andl	$32767, %eax                    ## imm = 0x7FFF
	cmpl	$13, %eax
	jb	LBB0_1
## %bb.6:
	jmp	_m68k_unused_16_w               ## TAILCALL
LBB0_1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_action_replay@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movl	%eax, %eax
	movl	%esi, (%rdx,%rax,4)
	cmpl	$65535, 12(%rdx)                ## imm = 0xFFFF
	jne	LBB0_5
## %bb.2:
	movq	8(%rcx), %rax
	movq	_AR_SWITCH_ON@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_AR_SWITCH_OFF@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_areplay_set_status
	movq	(%rbx), %rdi
	callq	_areplay_set_status
LBB0_4:
	movq	_cart@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_m68k@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_action_replay,16,3             ## @action_replay
	.comm	_AR_SWITCH_ON,8,3               ## @AR_SWITCH_ON
	.comm	_AR_SWITCH_OFF,8,3              ## @AR_SWITCH_OFF
	.comm	_cart,4,2                       ## @cart
	.comm	_m68k,8,3                       ## @m68k
	.no_dead_strip	_ar_write_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar_write_regs
_ar_write_regs:                         ; @ar_write_regs
	.cfi_startproc
; %bb.0:
	ubfx	w9, w0, #1, #15
	cmp	w9, #13
	b.lo	LBB0_2
; %bb.1:
	b	_m68k_unused_16_w
LBB0_2:
	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, _action_replay@GOTPAGE
Lloh1:
	ldr	x8, [x8, _action_replay@GOTPAGEOFF]
	ldr	x10, [x8]
	str	w1, [x10, w9, uxtw #2]
	ldr	w9, [x10, #12]
	mov	w10, #65535
	cmp	w9, w10
	b.ne	LBB0_6
; %bb.3:
	ldr	x8, [x8, #8]
Lloh2:
	adrp	x19, _AR_SWITCH_ON@GOTPAGE
Lloh3:
	ldr	x19, [x19, _AR_SWITCH_ON@GOTPAGEOFF]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
Lloh4:
	adrp	x8, _AR_SWITCH_OFF@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AR_SWITCH_OFF@GOTPAGEOFF]
Lloh6:
	ldr	x0, [x8]
	bl	_areplay_set_status
	ldr	x0, [x19]
	bl	_areplay_set_status
LBB0_5:
Lloh7:
	adrp	x8, _cart@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cart@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _m68k@GOTPAGE
Lloh11:
	ldr	x9, [x9, _m68k@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	str	w8, [x9]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_action_replay,16,3             ; @action_replay
	.comm	_AR_SWITCH_ON,8,3               ; @AR_SWITCH_ON
	.comm	_AR_SWITCH_OFF,8,3              ; @AR_SWITCH_OFF
	.comm	_cart,4,2                       ; @cart
	.comm	_m68k,8,3                       ; @m68k
	.no_dead_strip	_ar_write_regs
.subsections_via_symbols
