	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function interact_read_packet
_interact_read_packet:                  ## @interact_read_packet
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	$0, 8(%rdx)
	movq	$0, (%rdx)
	movq	_INTERACT_MAX_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_gameport_time
	movl	%eax, %r12d
	movq	_INTERACT_MAX_STROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_gameport_time
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_local_irq_save
	movq	%r14, %rdi
	callq	_gameport_trigger
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_gameport_read
	xorl	%r13d, %r13d
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.1:
	testl	%r15d, %r15d
	jle	LBB0_8
## %bb.2:
	movl	%eax, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_gameport_read
	notb	%r14b
	andb	%al, %r14b
	testb	$64, %r14b
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%al, %ecx
	movl	%ecx, %edx
	shrl	$4, %edx
	andl	$1, %edx
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	leal	(%rdx,%rsi,2), %edx
	movl	%edx, (%rbx)
	movl	%ecx, %edx
	shrl	$5, %edx
	andl	$1, %edx
	leal	(%rdx,%rdi,2), %edx
	movl	%edx, 4(%rbx)
	movl	8(%rbx), %edx
	shrl	$7, %ecx
	leal	(%rcx,%rdx,2), %ecx
	movl	%ecx, 8(%rbx)
	incl	%r13d
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	testl	%r12d, %r12d
	jne	LBB0_7
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	decl	%r12d
	testl	%r12d, %r12d
	je	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
	cmpl	%r15d, %r13d
	jl	LBB0_3
LBB0_8:
	callq	_local_irq_restore
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTERACT_MAX_START,4,2         ## @INTERACT_MAX_START
	.comm	_INTERACT_MAX_STROBE,4,2        ## @INTERACT_MAX_STROBE
	.no_dead_strip	_interact_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function interact_read_packet
lCPI0_0:
	.long	4294967292                      ; 0xfffffffc
	.long	4294967291                      ; 0xfffffffb
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_interact_read_packet:                  ; @interact_read_packet
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-96]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	str	wzr, [x2, #8]
	str	xzr, [x2]
Lloh0:
	adrp	x8, _INTERACT_MAX_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTERACT_MAX_START@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_gameport_time
	mov	x24, x0
Lloh3:
	adrp	x8, _INTERACT_MAX_STROBE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INTERACT_MAX_STROBE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_gameport_time
	mov	x22, x0
	bl	_local_irq_save
	mov	x0, x21
	bl	_gameport_trigger
	mov	x0, x21
	bl	_gameport_read
	mov	w23, #0
	cmp	w24, #0
	ccmp	w20, #1, #8, ne
	b.lt	LBB0_6
; %bb.1:
	mov	x25, x0
	mov	w23, #0
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_gameport_read
	bic	w8, w0, w25
	tbz	w8, #6, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	d0, [x19]
	dup.2s	v1, w0
	ushl.2s	v1, v1, v8
	sli.2s	v1, v0, #1
	str	d1, [x19]
	ldr	w8, [x19, #8]
	lsr	w9, w0, #7
	bfi	w9, w8, #1, #31
	str	w9, [x19, #8]
	add	w23, w23, #1
	mov	x24, x22
	cbnz	w24, LBB0_5
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	sub	w24, w24, #1
	cbz	w24, LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	cmp	w23, w20
	b.lt	LBB0_2
LBB0_6:
	bl	_local_irq_restore
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_INTERACT_MAX_START,4,2         ; @INTERACT_MAX_START
	.comm	_INTERACT_MAX_STROBE,4,2        ; @INTERACT_MAX_STROBE
	.no_dead_strip	_interact_read_packet
.subsections_via_symbols
