	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function movement_get
_movement_get:                          ## @movement_get
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	addq	$20, %rdi
	callq	_pthread_mutex_isowned_np
	movl	%eax, %edi
	callq	_assert
	movq	_PS2M_DATA_AONE@GOTPCREL(%rip), %rax
	movq	_PS2M_DATA_LEFT_BUTTON@GOTPCREL(%rip), %rcx
	movq	_PS2M_DATA_RIGHT_BUTTON@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movq	_PS2M_DATA_MID_BUTTON@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	andl	(%rbx), %esi
	orl	(%rax), %esi
	movl	4(%rbx), %r14d
	testl	%r14d, %r14d
	js	LBB0_2
## %bb.1:
	cmpl	$256, %r14d                     ## imm = 0x100
	jb	LBB0_4
LBB0_3:
	movq	_PS2M_DATA_X_OFLOW@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$255, %r14d
LBB0_4:
	movl	$0, 4(%rbx)
	movl	8(%rbx), %r15d
	testl	%r15d, %r15d
	js	LBB0_6
## %bb.5:
	cmpl	$256, %r15d                     ## imm = 0x100
	jb	LBB0_8
LBB0_7:
	movq	_PS2M_DATA_Y_OFLOW@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$255, %r15d
LBB0_8:
	movl	$0, 8(%rbx)
	movl	16(%rbx), %eax
	addl	$-3, %eax
	cmpl	%eax, 12(%rbx)
	jge	LBB0_9
## %bb.10:
	movq	%rbx, %rdi
	callq	_fifo_put
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_fifo_put
	movq	%rbx, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fifo_put                       ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_PS2M_DATA_X_SIGN@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	cmpl	$-256, %r14d
	jbe	LBB0_3
	jmp	LBB0_4
LBB0_6:
	movq	_PS2M_DATA_Y_SIGN@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	cmpl	$-256, %r15d
	jbe	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_PS2M_DATA_AONE,4,2             ## @PS2M_DATA_AONE
	.comm	_PS2M_DATA_LEFT_BUTTON,4,2      ## @PS2M_DATA_LEFT_BUTTON
	.comm	_PS2M_DATA_RIGHT_BUTTON,4,2     ## @PS2M_DATA_RIGHT_BUTTON
	.comm	_PS2M_DATA_MID_BUTTON,4,2       ## @PS2M_DATA_MID_BUTTON
	.comm	_PS2M_DATA_X_OFLOW,4,2          ## @PS2M_DATA_X_OFLOW
	.comm	_PS2M_DATA_X_SIGN,4,2           ## @PS2M_DATA_X_SIGN
	.comm	_PS2M_DATA_Y_OFLOW,4,2          ## @PS2M_DATA_Y_OFLOW
	.comm	_PS2M_DATA_Y_SIGN,4,2           ## @PS2M_DATA_Y_SIGN
	.no_dead_strip	_movement_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function movement_get
_movement_get:                          ; @movement_get
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	add	x0, x0, #20
	bl	_pthread_mutex_isowned_np
	bl	_assert
Lloh0:
	adrp	x8, _PS2M_DATA_AONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PS2M_DATA_AONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PS2M_DATA_LEFT_BUTTON@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PS2M_DATA_LEFT_BUTTON@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _PS2M_DATA_RIGHT_BUTTON@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PS2M_DATA_RIGHT_BUTTON@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh9:
	adrp	x10, _PS2M_DATA_MID_BUTTON@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PS2M_DATA_MID_BUTTON@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w9, w10
	ldp	w10, w20, [x19]
	and	w9, w9, w10
	orr	w1, w9, w8
	tbnz	w20, #31, LBB0_9
; %bb.1:
	cmp	w20, #256
	b.lo	LBB0_3
LBB0_2:
Lloh12:
	adrp	x8, _PS2M_DATA_X_OFLOW@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PS2M_DATA_X_OFLOW@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w1, w8, w1
	mov	w20, #255
LBB0_3:
	str	wzr, [x19, #4]
	ldr	w21, [x19, #8]
	tbnz	w21, #31, LBB0_10
; %bb.4:
	cmp	w21, #256
	b.lo	LBB0_6
LBB0_5:
Lloh15:
	adrp	x8, _PS2M_DATA_Y_OFLOW@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PS2M_DATA_Y_OFLOW@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	orr	w1, w8, w1
	mov	w21, #255
LBB0_6:
	str	wzr, [x19, #8]
	ldp	w8, w9, [x19, #12]
	sub	w9, w9, #3
	cmp	w8, w9
	b.ge	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_fifo_put
	mov	x0, x19
	mov	x1, x20
	bl	_fifo_put
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_fifo_put
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh18:
	adrp	x8, _PS2M_DATA_X_SIGN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PS2M_DATA_X_SIGN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w1, w8, w1
	cmn	w20, #256
	b.ls	LBB0_2
	b	LBB0_3
LBB0_10:
Lloh21:
	adrp	x8, _PS2M_DATA_Y_SIGN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PS2M_DATA_Y_SIGN@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	orr	w1, w8, w1
	cmn	w21, #256
	b.ls	LBB0_5
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_PS2M_DATA_AONE,4,2             ; @PS2M_DATA_AONE
	.comm	_PS2M_DATA_LEFT_BUTTON,4,2      ; @PS2M_DATA_LEFT_BUTTON
	.comm	_PS2M_DATA_RIGHT_BUTTON,4,2     ; @PS2M_DATA_RIGHT_BUTTON
	.comm	_PS2M_DATA_MID_BUTTON,4,2       ; @PS2M_DATA_MID_BUTTON
	.comm	_PS2M_DATA_X_OFLOW,4,2          ; @PS2M_DATA_X_OFLOW
	.comm	_PS2M_DATA_X_SIGN,4,2           ; @PS2M_DATA_X_SIGN
	.comm	_PS2M_DATA_Y_OFLOW,4,2          ; @PS2M_DATA_Y_OFLOW
	.comm	_PS2M_DATA_Y_SIGN,4,2           ; @PS2M_DATA_Y_SIGN
	.no_dead_strip	_movement_get
.subsections_via_symbols
