	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen_zreset_w                   ## -- Begin function gen_zreset_w
	.p2align	4, 0x90
_gen_zreset_w:                          ## @gen_zreset_w
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	_zstate@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%edi, %edi
	je	LBB0_7
## %bb.1:
	cmpl	$2, %eax
	je	LBB0_4
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_Z80@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	jmp	LBB0_5
LBB0_7:
	cmpl	$3, %eax
	je	LBB0_10
## %bb.8:
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.9:
	movl	%ebx, %edi
	callq	_z80_run
	jmp	LBB0_11
LBB0_4:
	movq	_z80_read_byte@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_m68k@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, 2572(%rcx)
	movq	_z80_read_word@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 2568(%rcx)
	movq	_z80_write_byte@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 2564(%rcx)
	movq	_z80_write_word@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 2560(%rcx)
LBB0_5:
	xorl	%eax, %eax
	callq	_z80_reset
	movl	%ebx, %edi
	callq	_fm_reset
LBB0_6:
	movl	(%r14), %eax
	orl	$1, %eax
	jmp	LBB0_12
LBB0_10:
	movq	_m68k_read_bus_8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_m68k@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, 2572(%rcx)
	movq	_m68k_read_bus_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 2568(%rcx)
	movq	_m68k_unused_8_w@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 2564(%rcx)
	movq	_m68k_unused_16_w@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 2560(%rcx)
LBB0_11:
	movl	%ebx, %edi
	callq	_fm_reset
	movl	(%r14), %eax
	andl	$2, %eax
LBB0_12:
	movl	%eax, (%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_zstate,4,2                     ## @zstate
	.comm	_Z80,4,2                        ## @Z80
	.comm	_z80_read_byte,4,2              ## @z80_read_byte
	.comm	_m68k,8,3                       ## @m68k
	.comm	_z80_read_word,4,2              ## @z80_read_word
	.comm	_z80_write_byte,4,2             ## @z80_write_byte
	.comm	_z80_write_word,4,2             ## @z80_write_word
	.comm	_m68k_read_bus_8,4,2            ## @m68k_read_bus_8
	.comm	_m68k_read_bus_16,4,2           ## @m68k_read_bus_16
	.comm	_m68k_unused_8_w,4,2            ## @m68k_unused_8_w
	.comm	_m68k_unused_16_w,4,2           ## @m68k_unused_16_w
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen_zreset_w                   ; -- Begin function gen_zreset_w
	.p2align	2
_gen_zreset_w:                          ; @gen_zreset_w
	.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
	mov	x19, x1
Lloh0:
	adrp	x20, _zstate@GOTPAGE
Lloh1:
	ldr	x20, [x20, _zstate@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w0, LBB0_4
; %bb.1:
	cmp	w8, #2
	b.eq	LBB0_7
; %bb.2:
	cbnz	w8, LBB0_9
; %bb.3:
Lloh2:
	adrp	x8, _Z80@GOTPAGE
Lloh3:
	ldr	x8, [x8, _Z80@GOTPAGEOFF]
Lloh4:
	str	w19, [x8]
	b	LBB0_8
LBB0_4:
	cmp	w8, #3
	b.eq	LBB0_10
; %bb.5:
	cmp	w8, #1
	b.ne	LBB0_11
; %bb.6:
	mov	x0, x19
	bl	_z80_run
	b	LBB0_11
LBB0_7:
Lloh5:
	adrp	x8, _z80_read_byte@GOTPAGE
Lloh6:
	ldr	x8, [x8, _z80_read_byte@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _m68k@GOTPAGE
Lloh9:
	ldr	x9, [x9, _m68k@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	str	w8, [x9, #2572]
Lloh11:
	adrp	x8, _z80_read_word@GOTPAGE
Lloh12:
	ldr	x8, [x8, _z80_read_word@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x9, #2568]
Lloh14:
	adrp	x8, _z80_write_byte@GOTPAGE
Lloh15:
	ldr	x8, [x8, _z80_write_byte@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x9, #2564]
Lloh17:
	adrp	x8, _z80_write_word@GOTPAGE
Lloh18:
	ldr	x8, [x8, _z80_write_word@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x9, #2560]
LBB0_8:
	bl	_z80_reset
	mov	x0, x19
	bl	_fm_reset
LBB0_9:
	ldr	w8, [x20]
	orr	w8, w8, #0x1
	b	LBB0_12
LBB0_10:
Lloh20:
	adrp	x8, _m68k_read_bus_8@GOTPAGE
Lloh21:
	ldr	x8, [x8, _m68k_read_bus_8@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _m68k@GOTPAGE
Lloh24:
	ldr	x9, [x9, _m68k@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	str	w8, [x9, #2572]
Lloh26:
	adrp	x8, _m68k_read_bus_16@GOTPAGE
Lloh27:
	ldr	x8, [x8, _m68k_read_bus_16@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [x9, #2568]
Lloh29:
	adrp	x8, _m68k_unused_8_w@GOTPAGE
Lloh30:
	ldr	x8, [x8, _m68k_unused_8_w@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [x9, #2564]
Lloh32:
	adrp	x8, _m68k_unused_16_w@GOTPAGE
Lloh33:
	ldr	x8, [x8, _m68k_unused_16_w@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	w8, [x9, #2560]
LBB0_11:
	mov	x0, x19
	bl	_fm_reset
	ldr	w8, [x20]
	and	w8, w8, #0x2
LBB0_12:
	str	w8, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_zstate,4,2                     ; @zstate
	.comm	_Z80,4,2                        ; @Z80
	.comm	_z80_read_byte,4,2              ; @z80_read_byte
	.comm	_m68k,8,3                       ; @m68k
	.comm	_z80_read_word,4,2              ; @z80_read_word
	.comm	_z80_write_byte,4,2             ; @z80_write_byte
	.comm	_z80_write_word,4,2             ; @z80_write_word
	.comm	_m68k_read_bus_8,4,2            ; @m68k_read_bus_8
	.comm	_m68k_read_bus_16,4,2           ; @m68k_read_bus_16
	.comm	_m68k_unused_8_w,4,2            ; @m68k_unused_8_w
	.comm	_m68k_unused_16_w,4,2           ; @m68k_unused_16_w
.subsections_via_symbols
