	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Atari800_UpdateKeyboardDetached ## -- Begin function Atari800_UpdateKeyboardDetached
	.p2align	4, 0x90
_Atari800_UpdateKeyboardDetached:       ## @Atari800_UpdateKeyboardDetached
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_Atari800_machine_type@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_Atari800_MACHINE_XLXE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	_Atari800_keyboard_detached@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpq	$0, (%rax)
	sete	%cl
	movq	_GTIA_TRIG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ecx, 8(%rax)
	je	LBB0_4
## %bb.2:
	movq	_GTIA_GRACTL@GOTPCREL(%rip), %rax
	testb	$4, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_GTIA_TRIG_latch@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$0, 16(%rax)
LBB0_4:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Atari800_machine_type,8,3      ## @Atari800_machine_type
	.comm	_Atari800_MACHINE_XLXE,8,3      ## @Atari800_MACHINE_XLXE
	.comm	_Atari800_keyboard_detached,8,3 ## @Atari800_keyboard_detached
	.comm	_GTIA_TRIG,8,3                  ## @GTIA_TRIG
	.comm	_GTIA_GRACTL,4,2                ## @GTIA_GRACTL
	.comm	_GTIA_TRIG_latch,8,3            ## @GTIA_TRIG_latch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Atari800_UpdateKeyboardDetached ; -- Begin function Atari800_UpdateKeyboardDetached
	.p2align	2
_Atari800_UpdateKeyboardDetached:       ; @Atari800_UpdateKeyboardDetached
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _Atari800_machine_type@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Atari800_machine_type@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _Atari800_MACHINE_XLXE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _Atari800_MACHINE_XLXE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _Atari800_keyboard_detached@GOTPAGE
Lloh7:
	ldr	x8, [x8, _Atari800_keyboard_detached@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w9, eq
Lloh9:
	adrp	x10, _GTIA_TRIG@GOTPAGE
Lloh10:
	ldr	x10, [x10, _GTIA_TRIG@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	str	w9, [x10, #8]
	cbz	x8, LBB0_4
; %bb.2:
Lloh12:
	adrp	x8, _GTIA_GRACTL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GTIA_GRACTL@GOTPAGEOFF]
	ldrb	w8, [x8]
	tbz	w8, #2, LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _GTIA_TRIG_latch@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GTIA_TRIG_latch@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	xzr, [x8, #16]
LBB0_4:
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_Atari800_machine_type,8,3      ; @Atari800_machine_type
	.comm	_Atari800_MACHINE_XLXE,8,3      ; @Atari800_MACHINE_XLXE
	.comm	_Atari800_keyboard_detached,8,3 ; @Atari800_keyboard_detached
	.comm	_GTIA_TRIG,8,3                  ; @GTIA_TRIG
	.comm	_GTIA_GRACTL,4,2                ; @GTIA_GRACTL
	.comm	_GTIA_TRIG_latch,8,3            ; @GTIA_TRIG_latch
.subsections_via_symbols
