	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cobra_poll
_cobra_poll:                            ## @cobra_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	%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	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_gameport_get_drvdata
	movq	%rax, %r14
	incl	20(%rax)
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_cobra_read_packet
	cmpl	(%r14), %eax
	jne	LBB0_13
## %bb.1:
	movl	%eax, %r15d
	testb	$1, %r15b
	je	LBB0_6
## %bb.2:
	movq	8(%r14), %rax
	movq	(%rax), %r12
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-56(%rbp), %eax
	movl	%eax, %edx
	shll	$28, %edx
	sarl	$31, %edx
	btl	$4, %eax
	adcl	$0, %edx
	movq	%r12, %rdi
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-56(%rbp), %eax
	movl	%eax, %edx
	shll	$30, %edx
	sarl	$31, %edx
	btl	$2, %eax
	adcl	$0, %edx
	movq	%r12, %rdi
	callq	_input_report_abs
	movq	_cobra_btn@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$32, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	andl	-56(%rbp), %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	(%r13), %rax
	movq	8(%rax,%rbx,8), %rsi
	incq	%rbx
	testq	%rsi, %rsi
	jne	LBB0_4
LBB0_5:
	movq	%r12, %rdi
	callq	_input_sync
	movl	(%r14), %eax
LBB0_6:
	andl	%eax, %r15d
	testb	$2, %r15b
	je	LBB0_11
## %bb.7:
	movq	8(%r14), %rax
	movq	8(%rax), %r14
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %eax
	movl	%eax, %edx
	shll	$28, %edx
	sarl	$31, %edx
	btl	$4, %eax
	adcl	$0, %edx
	movq	%r14, %rdi
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %eax
	movl	%eax, %edx
	shll	$30, %edx
	sarl	$31, %edx
	btl	$2, %eax
	adcl	$0, %edx
	movq	%r14, %rdi
	callq	_input_report_abs
	movq	_cobra_btn@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$32, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	andl	-52(%rbp), %edx
	movq	%r14, %rdi
	callq	_input_report_key
	movq	(%r15), %rax
	movq	8(%rax,%rbx,8), %rsi
	incq	%rbx
	testq	%rsi, %rsi
	jne	LBB0_9
LBB0_10:
	movq	%r14, %rdi
	callq	_input_sync
	jmp	LBB0_11
LBB0_13:
	incl	16(%r14)
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_cobra_btn,8,3                  ## @cobra_btn
	.no_dead_strip	_cobra_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cobra_poll
_cobra_poll:                            ; @cobra_poll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_gameport_get_drvdata
	mov	x19, x0
	ldr	w8, [x0, #20]
	add	w8, w8, #1
	str	w8, [x0, #20]
	mov	x1, sp
	mov	x0, x20
	bl	_cobra_read_packet
	ldr	w8, [x19]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x24, _ABS_X@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ABS_X@GOTPAGEOFF]
Lloh5:
	adrp	x23, _ABS_Y@GOTPAGE
Lloh6:
	ldr	x23, [x23, _ABS_Y@GOTPAGEOFF]
	mov	x8, x0
Lloh7:
	adrp	x22, _cobra_btn@GOTPAGE
Lloh8:
	ldr	x22, [x22, _cobra_btn@GOTPAGEOFF]
	tbz	w0, #0, LBB0_6
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	x21, [x8]
	ldr	w1, [x24]
	ldr	w8, [sp]
	ubfx	w9, w8, #4, #1
	lsl	w8, w8, #28
	add	w2, w9, w8, asr #31
	mov	x0, x21
	bl	_input_report_abs
	ldr	w1, [x23]
	ldr	w8, [sp]
	ubfx	w9, w8, #2, #1
	lsl	w8, w8, #30
	add	w2, w9, w8, asr #31
	mov	x0, x21
	bl	_input_report_abs
	ldr	x8, [x22]
	ldr	x1, [x8]
	cbz	x1, LBB0_5
; %bb.3:
	mov	x25, #0
	mov	w26, #32
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp]
	lsl	w9, w26, w25
	and	w2, w8, w9
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x22]
	add	x8, x8, x25, lsl #3
	add	x25, x25, #1
	ldr	x1, [x8, #8]
	cbnz	x1, LBB0_4
LBB0_5:
	mov	x0, x21
	bl	_input_sync
	ldr	w8, [x19]
LBB0_6:
	and	w8, w20, w8
	tbz	w8, #1, LBB0_12
; %bb.7:
	ldr	x8, [x19, #8]
	ldr	x19, [x8, #8]
	ldr	w1, [x24]
	ldr	w8, [sp, #4]
	ubfx	w9, w8, #4, #1
	lsl	w8, w8, #28
	add	w2, w9, w8, asr #31
	mov	x0, x19
	bl	_input_report_abs
	ldr	w1, [x23]
	ldr	w8, [sp, #4]
	ubfx	w9, w8, #2, #1
	lsl	w8, w8, #30
	add	w2, w9, w8, asr #31
	mov	x0, x19
	bl	_input_report_abs
	ldr	x8, [x22]
	ldr	x1, [x8]
	cbz	x1, LBB0_10
; %bb.8:
	mov	x20, #0
	mov	w21, #32
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #4]
	lsl	w9, w21, w20
	and	w2, w8, w9
	mov	x0, x19
	bl	_input_report_key
	ldr	x8, [x22]
	add	x8, x8, x20, lsl #3
	add	x20, x20, #1
	ldr	x1, [x8, #8]
	cbnz	x1, LBB0_9
LBB0_10:
	mov	x0, x19
	bl	_input_sync
	b	LBB0_12
LBB0_11:
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
LBB0_12:
	ldr	x8, [sp, #8]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	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
	add	sp, sp, #96
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_cobra_btn,8,3                  ; @cobra_btn
	.no_dead_strip	_cobra_poll
.subsections_via_symbols
