	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a3d_poll
_a3d_poll:                              ## @a3d_poll
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	callq	_gameport_get_drvdata
	movq	%rax, %rbx
	movq	_A3D_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	incl	20(%rbx)
	movl	16(%rbx), %edi
	movq	(%rbx), %rsi
	movq	%r14, %rdx
	callq	_a3d_read_packet
	cmpq	(%rbx), %rax
	jne	LBB0_3
## %bb.1:
	movb	(%r14), %cl
	cmpb	8(%rbx), %cl
	jne	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_a3d_csum
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	incl	12(%rbx)
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	leaq	-16(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_a3d_read
	jmp	LBB0_5
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_A3D_MAX_LENGTH,4,2             ## @A3D_MAX_LENGTH
	.no_dead_strip	_a3d_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a3d_poll
_a3d_poll:                              ; @a3d_poll
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	bl	_gameport_get_drvdata
	mov	x19, x0
Lloh3:
	adrp	x8, _A3D_MAX_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _A3D_MAX_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldp	w0, w8, [x0, #16]
	add	w8, w8, #1
	str	w8, [x19, #20]
	ldr	x1, [x19]
	mov	x2, x20
	bl	_a3d_read_packet
	ldr	x8, [x19]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
	ldrb	w8, [x20]
	ldrb	w9, [x19, #8]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
	mov	x1, x0
	mov	x0, x20
	bl	_a3d_csum
	cbz	x0, LBB0_6
LBB0_3:
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
LBB0_4:
	ldur	x8, [x29, #-24]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.5:
	sub	sp, x29, #16
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_a3d_read
	b	LBB0_4
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_A3D_MAX_LENGTH,4,2             ; @A3D_MAX_LENGTH
	.no_dead_strip	_a3d_poll
.subsections_via_symbols
