	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function joydev_correct
_joydev_correct:                        ## @joydev_correct
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.2:
	movq	8(%rsi), %rcx
	movl	(%rcx), %esi
	movl	$2, %edx
	cmpl	%edi, %esi
	jge	LBB0_4
## %bb.3:
	movl	4(%rcx), %esi
	movl	$3, %edx
	xorl	%eax, %eax
	cmpl	%edi, %esi
	jg	LBB0_6
LBB0_4:
	subl	%esi, %edi
	imull	(%rcx,%rdx,4), %edi
	sarl	$14, %edi
LBB0_5:
	movl	%edi, %eax
LBB0_6:
	movl	%eax, %edi
	movl	$-32767, %esi                   ## imm = 0x8001
	movl	$32767, %edx                    ## imm = 0x7FFF
	popq	%rbp
	jmp	_clamp                          ## TAILCALL
LBB0_7:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_joydev_correct
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function joydev_correct
_joydev_correct:                        ; @joydev_correct
	.cfi_startproc
; %bb.0:
	ldr	w8, [x1]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_5
; %bb.2:
	ldr	x8, [x1, #8]
	ldr	w9, [x8]
	cmp	w9, w0
	b.ge	LBB0_6
; %bb.3:
	ldr	w9, [x8, #4]
	cmp	w9, w0
	b.le	LBB0_7
; %bb.4:
	mov	w0, #0
	b	LBB0_9
LBB0_5:
	mov	w0, #0
	ret
LBB0_6:
	mov	w10, #2
	b	LBB0_8
LBB0_7:
	mov	w10, #3
LBB0_8:
	ldr	w8, [x8, x10, lsl #2]
	sub	w9, w0, w9
	mul	w8, w8, w9
	asr	w0, w8, #14
LBB0_9:
	mov	w1, #-32767
	mov	w2, #32767
	b	_clamp
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_joydev_correct
.subsections_via_symbols
