	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function PLATFORM_PORT
LCPI0_0:
	.long	240                             ## 0xf0
	.long	240                             ## 0xf0
	.long	240                             ## 0xf0
	.long	240                             ## 0xf0
LCPI0_1:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	4294967295                      ## 0xffffffff
	.long	4294967295                      ## 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_PLATFORM_PORT
	.p2align	4, 0x90
_PLATFORM_PORT:                         ## @PLATFORM_PORT
	.cfi_startproc
## %bb.0:
	movl	$255, %eax
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	retq
LBB0_1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%eax, %eax
	callq	_PadButtons
	movq	_INPUT_STICK_LEFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movq	_INPUT_STICK_RIGHT@GOTPCREL(%rip), %r10
	movq	_INPUT_STICK_FORWARD@GOTPCREL(%rip), %r9
	movq	_INPUT_STICK_BACK@GOTPCREL(%rip), %r8
	movq	_PAD_LEFT@GOTPCREL(%rip), %rdi
	movq	_PAD_RIGHT@GOTPCREL(%rip), %rsi
	movq	_PAD_UP@GOTPCREL(%rip), %rdx
	movq	_PAD_DOWN@GOTPCREL(%rip), %r11
	movd	(%rsi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pinsrd	$1, (%rdi), %xmm0
	pinsrd	$2, (%rdx), %xmm0
	pinsrd	$3, (%r11), %xmm0
	movd	%eax, %xmm1
	pshufd	$0, %xmm1, %xmm1                ## xmm1 = xmm1[0,0,0,0]
	pand	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm1, %xmm0
	movd	(%r10), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	pinsrd	$1, %ecx, %xmm1
	pinsrd	$2, (%r9), %xmm1
	pinsrd	$3, (%r8), %xmm1
	por	LCPI0_0(%rip), %xmm1
	blendvps	%xmm0, LCPI0_1(%rip), %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	pand	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	pand	%xmm0, %xmm1
	movd	%xmm1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAD_LEFT,4,2                   ## @PAD_LEFT
	.comm	_INPUT_STICK_LEFT,4,2           ## @INPUT_STICK_LEFT
	.comm	_PAD_RIGHT,4,2                  ## @PAD_RIGHT
	.comm	_INPUT_STICK_RIGHT,4,2          ## @INPUT_STICK_RIGHT
	.comm	_PAD_UP,4,2                     ## @PAD_UP
	.comm	_INPUT_STICK_FORWARD,4,2        ## @INPUT_STICK_FORWARD
	.comm	_PAD_DOWN,4,2                   ## @PAD_DOWN
	.comm	_INPUT_STICK_BACK,4,2           ## @INPUT_STICK_BACK
.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
	mov	w19, #255
	cbnz	w0, LBB0_2
; %bb.1:
	bl	_PadButtons
Lloh0:
	adrp	x8, _PAD_LEFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAD_LEFT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _INPUT_STICK_LEFT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _INPUT_STICK_LEFT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	mov	w10, #240
	bfxil	w10, w9, #0, #4
	tst	w8, w0
	csel	w8, w19, w10, eq
Lloh6:
	adrp	x9, _PAD_RIGHT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PAD_RIGHT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _INPUT_STICK_RIGHT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _INPUT_STICK_RIGHT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w10, w10, #0xf0
	tst	w9, w0
	csel	w9, w19, w10, eq
	and	w8, w9, w8
Lloh12:
	adrp	x9, _PAD_UP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PAD_UP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _INPUT_STICK_FORWARD@GOTPAGE
Lloh16:
	ldr	x10, [x10, _INPUT_STICK_FORWARD@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w10, w10, #0xf0
	tst	w9, w0
	csinv	w9, w10, wzr, ne
	and	w8, w8, w9
Lloh18:
	adrp	x9, _PAD_DOWN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PAD_DOWN@GOTPAGEOFF]
Lloh20:
	adrp	x10, _INPUT_STICK_BACK@GOTPAGE
Lloh21:
	ldr	x10, [x10, _INPUT_STICK_BACK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	ldr	w10, [x10]
	orr	w10, w10, #0xf0
	tst	w9, w0
	csinv	w9, w10, wzr, ne
	and	w19, w8, w9
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PAD_LEFT,4,2                   ; @PAD_LEFT
	.comm	_INPUT_STICK_LEFT,4,2           ; @INPUT_STICK_LEFT
	.comm	_PAD_RIGHT,4,2                  ; @PAD_RIGHT
	.comm	_INPUT_STICK_RIGHT,4,2          ; @INPUT_STICK_RIGHT
	.comm	_PAD_UP,4,2                     ; @PAD_UP
	.comm	_INPUT_STICK_FORWARD,4,2        ; @INPUT_STICK_FORWARD
	.comm	_PAD_DOWN,4,2                   ; @PAD_DOWN
	.comm	_INPUT_STICK_BACK,4,2           ; @INPUT_STICK_BACK
.subsections_via_symbols
