	.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
	movl	$255, %eax
	testl	%edi, %edi
	je	LBB0_1
## %bb.8:
	popq	%rbp
	retq
LBB0_1:
	movq	_stick0@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_INPUT_STICK_CENTRE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_4
## %bb.2:
	movq	_trig0@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	_joy1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	shll	$4, %eax
	movzbl	%al, %ecx
	jmp	LBB0_6
LBB0_4:
	movq	_joyswap@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.5:
	shll	$4, %ecx
LBB0_6:
	movq	_joy0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	$15, %eax
	orl	%ecx, %eax
	xorl	$15, %eax
	popq	%rbp
	retq
LBB0_7:
	movq	_joy0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	shll	$4, %eax
	movzbl	%al, %eax
	orl	%ecx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stick0,4,2                     ## @stick0
	.comm	_INPUT_STICK_CENTRE,4,2         ## @INPUT_STICK_CENTRE
	.comm	_trig0,4,2                      ## @trig0
	.comm	_joy1,4,2                       ## @joy1
	.comm	_joy0,4,2                       ## @joy0
	.comm	_joyswap,8,3                    ## @joyswap
.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:
	cbz	w0, LBB0_2
; %bb.1:
	mov	w0, #255
	ret
LBB0_2:
Lloh0:
	adrp	x8, _stick0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stick0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _INPUT_STICK_CENTRE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _INPUT_STICK_CENTRE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _trig0@GOTPAGE
Lloh7:
	ldr	x10, [x10, _trig0@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w10, #1, #0, eq
	b.eq	LBB0_5
; %bb.3:
Lloh9:
	adrp	x9, _joyswap@GOTPAGE
Lloh10:
	ldr	x9, [x9, _joyswap@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cbz	x9, LBB0_6
; %bb.4:
Lloh12:
	adrp	x9, _joy0@GOTPAGE
Lloh13:
	ldr	x9, [x9, _joy0@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	bfi	w9, w8, #4, #28
	eor	w0, w9, #0xf
	ret
LBB0_5:
Lloh15:
	adrp	x8, _joy1@GOTPAGE
Lloh16:
	ldr	x8, [x8, _joy1@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	mvn	w8, w8
Lloh18:
	adrp	x9, _joy0@GOTPAGE
Lloh19:
	ldr	x9, [x9, _joy0@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	and	w9, w9, #0xf
	bfi	w9, w8, #4, #4
	eor	w0, w9, #0xf
	ret
LBB0_6:
Lloh21:
	adrp	x9, _joy0@GOTPAGE
Lloh22:
	ldr	x9, [x9, _joy0@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	mvn	w9, w9
	ubfiz	w9, w9, #4, #4
	orr	w0, w9, w8
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_stick0,4,2                     ; @stick0
	.comm	_INPUT_STICK_CENTRE,4,2         ; @INPUT_STICK_CENTRE
	.comm	_trig0,4,2                      ; @trig0
	.comm	_joy1,4,2                       ; @joy1
	.comm	_joy0,4,2                       ; @joy0
	.comm	_joyswap,8,3                    ; @joyswap
.subsections_via_symbols
