	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidpad_nesusb_get_axis
_hidpad_nesusb_get_axis:                ## @hidpad_nesusb_get_axis
	.cfi_startproc
## %bb.0:
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	cmpl	$1, %esi
	ja	LBB0_3
## %bb.2:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movl	%esi, %ecx
	movl	16(%rax,%rcx,4), %eax
	shll	$8, %eax
	leal	-32768(%rax), %ecx
	leal	-32768(%rax), %edx
	negl	%edx
	cmpl	$32768, %eax                    ## imm = 0x8000
	cmovgel	%ecx, %edx
	xorl	%eax, %eax
	cmpl	$4097, %edx                     ## imm = 0x1001
	cmovgel	%ecx, %eax
	popq	%rbp
LBB0_3:
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_hidpad_nesusb_get_axis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidpad_nesusb_get_axis
_hidpad_nesusb_get_axis:                ; @hidpad_nesusb_get_axis
	.cfi_startproc
; %bb.0:
	mov	x8, x0
	mov	w0, #0
	cbz	x8, LBB0_3
; %bb.1:
	cmp	w1, #1
	b.hi	LBB0_3
; %bb.2:
	ldr	x8, [x8]
	add	w9, w1, #4
	ldr	w8, [x8, w9, uxtw #2]
	lsl	w8, w8, #8
	mov	w9, #32768
	sub	w9, w9, w8
	subs	w8, w8, #8, lsl #12             ; =32768
	csel	w9, w9, w8, lt
	cmp	w9, #1, lsl #12                 ; =4096
	csel	w0, w8, wzr, gt
LBB0_3:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_hidpad_nesusb_get_axis
.subsections_via_symbols
