	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PLATFORM_PORT                  ## -- Begin function PLATFORM_PORT
	.p2align	4, 0x90
_PLATFORM_PORT:                         ## @PLATFORM_PORT
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_keypad_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$15, %ebx
	testl	%edi, %edi
	je	LBB0_1
## %bb.12:
	cmpl	$3, %eax
	je	LBB0_15
## %bb.13:
	cmpl	$2, %eax
	jne	LBB0_16
## %bb.14:
	movq	_keypad_stick@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_17
LBB0_1:
	cmpl	$1, %eax
	je	LBB0_4
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	_keypad_stick@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_6
LBB0_15:
	movq	_keypad_stick@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_16:
	movl	$15, %r14d
LBB0_17:
	movq	_INPUT_mouse_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_INPUT_MOUSE_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.18:
	movq	_xmouse_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$3, %eax
	je	LBB0_21
## %bb.19:
	cmpl	$2, %eax
	jne	LBB0_23
## %bb.20:
	movl	$2, %edi
	jmp	LBB0_10
LBB0_4:
	movq	_keypad_stick@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movl	$15, %r14d
LBB0_6:
	movq	_INPUT_mouse_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_INPUT_MOUSE_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.7:
	movq	_xmouse_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	je	LBB0_11
## %bb.8:
	testl	%eax, %eax
	jne	LBB0_23
## %bb.9:
	xorl	%edi, %edi
LBB0_10:
	callq	_mouse_joystick
	movq	_mouse_stick@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_23
LBB0_21:
	movl	$3, %edi
	jmp	LBB0_22
LBB0_11:
	movl	$1, %edi
LBB0_22:
	callq	_mouse_joystick
	movq	_mouse_stick@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_23:
	shll	$4, %ebx
	orl	%r14d, %ebx
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_keypad_mode,4,2                ## @keypad_mode
	.comm	_keypad_stick,4,2               ## @keypad_stick
	.comm	_INPUT_mouse_mode,8,3           ## @INPUT_mouse_mode
	.comm	_INPUT_MOUSE_OFF,8,3            ## @INPUT_MOUSE_OFF
	.comm	_xmouse_mode,4,2                ## @xmouse_mode
	.comm	_mouse_stick,4,2                ## @mouse_stick
	.comm	_js0,4,2                        ## @js0
	.comm	_js0_centre_x,4,2               ## @js0_centre_x
	.comm	_js0_centre_y,4,2               ## @js0_centre_y
	.comm	_js0_mode,4,2                   ## @js0_mode
	.comm	_js1,4,2                        ## @js1
	.comm	_js1_centre_x,4,2               ## @js1_centre_x
	.comm	_js1_centre_y,4,2               ## @js1_centre_y
	.comm	_js1_mode,4,2                   ## @js1_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PLATFORM_PORT                  ; -- Begin function PLATFORM_PORT
	.p2align	2
_PLATFORM_PORT:                         ; @PLATFORM_PORT
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _keypad_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _keypad_mode@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w0, LBB0_4
; %bb.1:
	cmp	w8, #3
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #2
	b.ne	LBB0_8
; %bb.3:
Lloh3:
	adrp	x8, _keypad_stick@GOTPAGE
Lloh4:
	ldr	x8, [x8, _keypad_stick@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	b	LBB0_9
LBB0_4:
	cmp	w8, #1
	b.eq	LBB0_14
; %bb.5:
	cbnz	w8, LBB0_15
; %bb.6:
Lloh6:
	adrp	x8, _keypad_stick@GOTPAGE
Lloh7:
	ldr	x8, [x8, _keypad_stick@GOTPAGEOFF]
Lloh8:
	ldr	w19, [x8]
	b	LBB0_16
LBB0_7:
Lloh9:
	adrp	x8, _keypad_stick@GOTPAGE
Lloh10:
	ldr	x8, [x8, _keypad_stick@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	mov	w19, #15
	b	LBB0_10
LBB0_8:
	mov	w19, #15
LBB0_9:
	mov	w20, #15
LBB0_10:
Lloh12:
	adrp	x8, _INPUT_mouse_mode@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INPUT_mouse_mode@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _INPUT_MOUSE_OFF@GOTPAGE
Lloh16:
	ldr	x9, [x9, _INPUT_MOUSE_OFF@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_25
; %bb.11:
Lloh18:
	adrp	x8, _xmouse_mode@GOTPAGE
Lloh19:
	ldr	x8, [x8, _xmouse_mode@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, #3
	b.eq	LBB0_22
; %bb.12:
	cmp	w8, #2
	b.ne	LBB0_25
; %bb.13:
	mov	w0, #2
	b	LBB0_21
LBB0_14:
Lloh21:
	adrp	x8, _keypad_stick@GOTPAGE
Lloh22:
	ldr	x8, [x8, _keypad_stick@GOTPAGEOFF]
Lloh23:
	ldr	w20, [x8]
	mov	w19, #15
	b	LBB0_17
LBB0_15:
	mov	w19, #15
LBB0_16:
	mov	w20, #15
LBB0_17:
Lloh24:
	adrp	x8, _INPUT_mouse_mode@GOTPAGE
Lloh25:
	ldr	x8, [x8, _INPUT_mouse_mode@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _INPUT_MOUSE_OFF@GOTPAGE
Lloh28:
	ldr	x9, [x9, _INPUT_MOUSE_OFF@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_25
; %bb.18:
Lloh30:
	adrp	x8, _xmouse_mode@GOTPAGE
Lloh31:
	ldr	x8, [x8, _xmouse_mode@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w8, #1
	b.eq	LBB0_23
; %bb.19:
	cbnz	w8, LBB0_25
; %bb.20:
	mov	w0, #0
LBB0_21:
	bl	_mouse_joystick
Lloh33:
	adrp	x8, _mouse_stick@GOTPAGE
Lloh34:
	ldr	x8, [x8, _mouse_stick@GOTPAGEOFF]
Lloh35:
	ldr	w19, [x8]
	b	LBB0_25
LBB0_22:
	mov	w0, #3
	b	LBB0_24
LBB0_23:
	mov	w0, #1
LBB0_24:
	bl	_mouse_joystick
Lloh36:
	adrp	x8, _mouse_stick@GOTPAGE
Lloh37:
	ldr	x8, [x8, _mouse_stick@GOTPAGEOFF]
Lloh38:
	ldr	w20, [x8]
LBB0_25:
	orr	w0, w19, w20, lsl #4
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_keypad_mode,4,2                ; @keypad_mode
	.comm	_keypad_stick,4,2               ; @keypad_stick
	.comm	_INPUT_mouse_mode,8,3           ; @INPUT_mouse_mode
	.comm	_INPUT_MOUSE_OFF,8,3            ; @INPUT_MOUSE_OFF
	.comm	_xmouse_mode,4,2                ; @xmouse_mode
	.comm	_mouse_stick,4,2                ; @mouse_stick
	.comm	_js0,4,2                        ; @js0
	.comm	_js0_centre_x,4,2               ; @js0_centre_x
	.comm	_js0_centre_y,4,2               ; @js0_centre_y
	.comm	_js0_mode,4,2                   ; @js0_mode
	.comm	_js1,4,2                        ; @js1
	.comm	_js1_centre_x,4,2               ; @js1_centre_x
	.comm	_js1_centre_y,4,2               ; @js1_centre_y
	.comm	_js1_mode,4,2                   ; @js1_mode
.subsections_via_symbols
