	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rwebpad_joypad_axis
_rwebpad_joypad_axis:                   ## @rwebpad_joypad_axis
	.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
	xorl	%r14d, %r14d
	cmpl	$-1, %esi
	je	LBB0_6
## %bb.1:
	movl	%esi, %ebx
	leaq	-32(%rbp), %rsi
	callq	_emscripten_get_gamepad_status
	movq	_EMSCRIPTEN_RESULT_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	movl	%ebx, %edi
	callq	_AXIS_NEG_GET
	cmpq	-32(%rbp), %rax
	jae	LBB0_4
## %bb.3:
	movq	-24(%rbp), %r14
	movl	%ebx, %edi
	callq	_AXIS_NEG_GET
	movl	(%r14,%rax,4), %edi
	callq	_CLAMPDOUBLE
	movl	%eax, %ecx
	shll	$15, %ecx
	subl	%eax, %ecx
	movl	%ecx, %r14d
	sarl	$31, %r14d
	andl	%ecx, %r14d
	jmp	LBB0_6
LBB0_4:
	movl	%ebx, %edi
	callq	_AXIS_POS_GET
	cmpq	-32(%rbp), %rax
	jae	LBB0_6
## %bb.5:
	movq	-24(%rbp), %r14
	movl	%ebx, %edi
	callq	_AXIS_POS_GET
	movl	(%r14,%rax,4), %edi
	callq	_CLAMPDOUBLE
	movl	%eax, %ecx
	shll	$15, %ecx
	subl	%eax, %ecx
	xorl	%r14d, %r14d
	testl	%ecx, %ecx
	cmovgl	%ecx, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMSCRIPTEN_RESULT_SUCCESS,8,3  ## @EMSCRIPTEN_RESULT_SUCCESS
	.no_dead_strip	_rwebpad_joypad_axis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rwebpad_joypad_axis
_rwebpad_joypad_axis:                   ; @rwebpad_joypad_axis
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	cmn	w1, #1
	b.eq	LBB0_6
; %bb.1:
	mov	x19, x1
	mov	x1, sp
	bl	_emscripten_get_gamepad_status
Lloh0:
	adrp	x8, _EMSCRIPTEN_RESULT_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EMSCRIPTEN_RESULT_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_AXIS_NEG_GET
	ldr	x8, [sp]
	cmp	x0, x8
	b.hs	LBB0_4
; %bb.3:
	ldr	x20, [sp, #8]
	mov	x0, x19
	bl	_AXIS_NEG_GET
	ldr	w0, [x20, x0, lsl #2]
	bl	_CLAMPDOUBLE
	lsl	w8, w0, #15
	sub	w8, w8, w0
	cmp	w8, #0
	csel	w0, w8, wzr, lt
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_AXIS_POS_GET
	ldr	x8, [sp]
	cmp	x0, x8
	b.hs	LBB0_6
; %bb.5:
	ldr	x20, [sp, #8]
	mov	x0, x19
	bl	_AXIS_POS_GET
	ldr	w0, [x20, x0, lsl #2]
	bl	_CLAMPDOUBLE
	lsl	w8, w0, #15
	sub	w8, w8, w0
	cmp	w8, #0
	csel	w0, w8, wzr, gt
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EMSCRIPTEN_RESULT_SUCCESS,8,3  ; @EMSCRIPTEN_RESULT_SUCCESS
	.no_dead_strip	_rwebpad_joypad_axis
.subsections_via_symbols
