	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z80_gg_port_r                  ## -- Begin function z80_gg_port_r
	.p2align	4, 0x90
_z80_gg_port_r:                         ## @z80_gg_port_r
	.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
	movl	%edi, %ecx
	andb	$-63, %cl
	js	LBB0_1
## %bb.4:
	cmpb	$2, %cl
	jb	LBB0_8
## %bb.5:
	cmpb	$64, %cl
	je	LBB0_15
## %bb.6:
	cmpb	$65, %cl
	jne	LBB0_12
## %bb.7:
	movq	_Z80@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_vdp_hvc_r
	jmp	LBB0_16
LBB0_1:
	cmpb	$-128, %cl
	je	LBB0_11
## %bb.2:
	cmpb	$-127, %cl
	jne	LBB0_12
## %bb.3:
	movq	_Z80@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbp
	jmp	_vdp_z80_ctrl_r                 ## TAILCALL
LBB0_8:
	movzbl	%dil, %edi
	cmpl	$6, %edi
	ja	LBB0_10
## %bb.9:
	movq	_system_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SYSTEM_GG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.17:
	popq	%rbp
	jmp	_io_gg_read                     ## TAILCALL
LBB0_10:
	popq	%rbp
	jmp	_z80_unused_port_r              ## TAILCALL
LBB0_11:
	xorl	%eax, %eax
	popq	%rbp
	jmp	_vdp_z80_data_r                 ## TAILCALL
LBB0_12:
	andb	$-2, %al
	cmpb	$-36, %al
	je	LBB0_18
## %bb.13:
	cmpb	$-64, %al
	jne	LBB0_14
LBB0_18:
	andl	$1, %edi
	popq	%rbp
	jmp	_io_z80_read                    ## TAILCALL
LBB0_15:
	movq	_Z80@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_vdp_hvc_r
	shrl	$8, %eax
LBB0_16:
	movzbl	%al, %eax
	popq	%rbp
	retq
LBB0_14:
	movzbl	%dil, %edi
	popq	%rbp
	jmp	_z80_unused_port_r              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_system_hw,4,2                  ## @system_hw
	.comm	_SYSTEM_GG,4,2                  ## @SYSTEM_GG
	.comm	_Z80,4,2                        ## @Z80
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z80_gg_port_r                  ; -- Begin function z80_gg_port_r
	.p2align	2
_z80_gg_port_r:                         ; @z80_gg_port_r
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	w8, #193
	and	w8, w0, w8
	cmp	w8, #64
	b.gt	LBB0_5
; %bb.1:
	cmp	w8, #2
	b.hs	LBB0_9
; %bb.2:
	and	w0, w0, #0xff
	cmp	w0, #6
	b.hi	LBB0_11
; %bb.3:
Lloh0:
	adrp	x8, _system_hw@GOTPAGE
Lloh1:
	ldr	x8, [x8, _system_hw@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SYSTEM_GG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SYSTEM_GG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.4:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_io_gg_read
LBB0_5:
	cmp	w8, #65
	b.eq	LBB0_12
; %bb.6:
	cmp	w8, #128
	b.eq	LBB0_14
; %bb.7:
	cmp	w8, #129
	b.ne	LBB0_15
; %bb.8:
Lloh6:
	adrp	x8, _Z80@GOTPAGE
Lloh7:
	ldr	x8, [x8, _Z80@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_vdp_z80_ctrl_r
LBB0_9:
	cmp	w8, #64
	b.ne	LBB0_15
; %bb.10:
Lloh9:
	adrp	x8, _Z80@GOTPAGE
Lloh10:
	ldr	x8, [x8, _Z80@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_vdp_hvc_r
	lsr	w0, w0, #8
	b	LBB0_13
LBB0_11:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_z80_unused_port_r
LBB0_12:
Lloh12:
	adrp	x8, _Z80@GOTPAGE
Lloh13:
	ldr	x8, [x8, _Z80@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_vdp_hvc_r
LBB0_13:
	and	w0, w0, #0xff
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_14:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_vdp_z80_data_r
LBB0_15:
	and	w8, w0, #0xfe
	cmp	w8, #220
	b.eq	LBB0_17
; %bb.16:
	cmp	w8, #192
	b.ne	LBB0_18
LBB0_17:
	and	w0, w0, #0x1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_io_z80_read
LBB0_18:
	and	w0, w0, #0xff
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_z80_unused_port_r
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_system_hw,4,2                  ; @system_hw
	.comm	_SYSTEM_GG,4,2                  ; @SYSTEM_GG
	.comm	_Z80,4,2                        ; @Z80
.subsections_via_symbols
