	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z80_gg_port_w                  ## -- Begin function z80_gg_port_w
	.p2align	4, 0x90
_z80_gg_port_w:                         ## @z80_gg_port_w
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edi, %eax
	andb	$-63, %al
	cmpb	$63, %al
	jg	LBB0_11
## %bb.1:
	cmpb	$2, %al
	jb	LBB0_5
## %bb.2:
	cmpb	$-128, %al
	je	LBB0_10
## %bb.3:
	cmpb	$-127, %al
	jne	LBB0_12
## %bb.4:
	movzbl	%sil, %edi
	popq	%rbp
	jmp	_vdp_sms_ctrl_w                 ## TAILCALL
LBB0_11:
	addb	$-64, %al
	cmpb	$2, %al
	jae	LBB0_12
## %bb.9:
	movq	_Z80@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movzbl	%sil, %esi
	popq	%rbp
	jmp	_SN76489_Write                  ## TAILCALL
LBB0_5:
	movzbl	%dil, %eax
	cmpl	$6, %eax
	ja	LBB0_8
## %bb.6:
	movq	_system_hw@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_SYSTEM_GG@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_7
## %bb.13:
	movzbl	%sil, %esi
	movl	%eax, %edi
	popq	%rbp
	jmp	_io_gg_write                    ## TAILCALL
LBB0_12:
	movzbl	%dil, %edi
	movzbl	%sil, %esi
	popq	%rbp
	jmp	_z80_unused_port_w              ## TAILCALL
LBB0_10:
	movzbl	%sil, %edi
	popq	%rbp
	jmp	_vdp_z80_data_w                 ## TAILCALL
LBB0_8:
	andl	$1, %edi
	movq	_Z80@GOTPCREL(%rip), %rax
	movq	_SMS_CYCLE_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	addq	(%rax), %rdx
	movzbl	%sil, %esi
	popq	%rbp
	jmp	_io_z80_write                   ## TAILCALL
LBB0_7:
	movzbl	%sil, %esi
	movl	%eax, %edi
	popq	%rbp
	jmp	_z80_unused_port_w              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_system_hw,4,2                  ## @system_hw
	.comm	_SYSTEM_GG,4,2                  ## @SYSTEM_GG
	.comm	_Z80,8,3                        ## @Z80
	.comm	_SMS_CYCLE_OFFSET,8,3           ## @SMS_CYCLE_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z80_gg_port_w                  ; -- Begin function z80_gg_port_w
	.p2align	2
_z80_gg_port_w:                         ; @z80_gg_port_w
	.cfi_startproc
; %bb.0:
	mov	w8, #193
	and	w8, w0, w8
	cmp	w8, #127
	b.gt	LBB0_4
; %bb.1:
	cmp	w8, #2
	b.lo	LBB0_7
; %bb.2:
	sub	w8, w8, #64
	cmp	w8, #2
	b.hs	LBB0_11
; %bb.3:
Lloh0:
	adrp	x8, _Z80@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Z80@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	b	_SN76489_Write
LBB0_4:
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.5:
	cmp	w8, #129
	b.ne	LBB0_11
; %bb.6:
	mov	x0, x1
	b	_vdp_sms_ctrl_w
LBB0_7:
	and	w8, w0, #0xff
	cmp	w8, #6
	b.hi	LBB0_12
; %bb.8:
Lloh3:
	adrp	x9, _system_hw@GOTPAGE
Lloh4:
	ldr	x9, [x9, _system_hw@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _SYSTEM_GG@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SYSTEM_GG@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	mov	x0, x8
	cmp	w9, w10
	b.ne	LBB0_13
; %bb.9:
	b	_io_gg_write
LBB0_10:
	mov	x0, x1
	b	_vdp_z80_data_w
LBB0_11:
	and	w0, w0, #0xff
	b	_z80_unused_port_w
LBB0_12:
	and	w0, w0, #0x1
Lloh9:
	adrp	x8, _Z80@GOTPAGE
Lloh10:
	ldr	x8, [x8, _Z80@GOTPAGEOFF]
Lloh11:
	adrp	x9, _SMS_CYCLE_OFFSET@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SMS_CYCLE_OFFSET@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	ldr	x9, [x9]
	add	x2, x9, x8
	b	_io_z80_write
LBB0_13:
	b	_z80_unused_port_w
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_system_hw,4,2                  ; @system_hw
	.comm	_SYSTEM_GG,4,2                  ; @SYSTEM_GG
	.comm	_Z80,8,3                        ; @Z80
	.comm	_SMS_CYCLE_OFFSET,8,3           ; @SMS_CYCLE_OFFSET
.subsections_via_symbols
