<commit_before>// 
// Copyright 2011-2012 <NAME>
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>

#define OP_SHUFFLE 13
#define OP_FTOI 27
#define OP_ITOF 42
#define OP_GETLANE 26

struct ABOpInfo
{
	int isInfix;		// If 1, the format is R op R, otherwise it is op(R)
	int numArgs;
	int isFloat;
	const char *name;
} abOpcodeTable[] = {
	{ 1, 2, 0, "|" },	// 0
	{ 1, 2, 0, "&" }, 	// 1
	{ 1, 1, 0, "-" }, // 2
	{ 1, 2, 0, "^" },	// 3
	{ 1, 1, 0, "~" },	// 4
	{ 1, 2, 0, "+" }, 	// 5
	{ 1, 2, 0, "-" },	// 6
	{ 1, 2, 0, "*" },	// 7
	{ 1, 2, 0, "/" },	// 8
	{ 1, 2, 0, ">>" },	// 9	(signed)
	{ 1, 2, 0, ">>" },	// 10 	(unsigned) 
	{ 1, 2, 0, "<<" }, 	// 11
	{ 0, 1, 0, "clz" },	// 12
	{ 0, 2, 0, "shuffle" },// 13
	{ 0, 1, 0, "ctz" },// 14
	{ 1, 1, 0, "" },	// 15 (copy)
	{ 1, 2, 0, "==" },	// 16
	{ 1, 2, 0, "<>" },	// 17
	{ 1, 2, 0, ">" },	// 18 (signed)
	{ 1, 2, 0, ">=" },	// 19
	{ 1, 2, 0, "<" },	// 20
	{ 1, 2, 0, "<=" },	// 21
	{ 1, 2, 0, ">" },	// 22  (unsigned)
	{ 1, 2, 0, ">=" },	// 23
	{ 1, 2, 0, "<" },	//24
	{ 1, 2, 0, "<=" },	// 25
	{ 0, 2, 0, "getlane" }, // 26
	{ 0, 1, 1, "ftoi" }, // 27
	{ 0, 1, 1, "reciprocal" }, // 28
	{ 0, 1, 0, "sext8" }, // 29
	{ 0, 1, 0, "sext16" }, // 30
	{ 0, 0, 0, "" }, // 31
	{ 1, 2, 1, "+" },	// 32
	{ 1, 2, 1, "-" },	// 33
	{ 1, 2, 1, "*" },	// 34
	{ 1, 2, 1, "/" },	// 35
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 1, 1, "floor" },// 38
	{ 0, 1, 1, "frac" },// 39
	{ 0, 0, 0, "" },// 40
	{ 0, 1, 1, "abs" },	// 41
	{ 0, 1, 1, "itof" },// 42
	{ 0, 0, 0, "" },
	{ 1, 2, 1, ">" },	// 44
	{ 1, 2, 1, ">=" },	// 45
	{ 1, 2, 1, "<" },	// 46
	{ 1, 2, 1, "<=" },	// 47
	{ 0, 0, 0, "" } // 48
};

struct AFmtInfo
{
	int op1IsScalar;
	int op2IsScalar;
	int masked;
	int invertMask;
} aFormatTab[] = {
	{ 1, 1, 0, 0 },
	{ 0, 1, 0, 0 },
	{ 0, 1, 1, 0 },
	{ 0, 1, 1, 1 },
	{ 0, 0, 0, 0 },
	{ 0, 0, 1, 0 },
	{ 0, 0, 1, 1 },
	{ 0, 0, 0, 0 }
};

struct BFmtInfo
{
	int destIsScalar;<commit_msg>Pad out instruction lookup table so it doesn't crash with invalid instructions<commit_after>// 
// Copyright 2011-2012 <NAME>
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>

#define OP_SHUFFLE 13
#define OP_FTOI 27
#define OP_ITOF 42
#define OP_GETLANE 26

struct ABOpInfo
{
	int isInfix;		// If 1, the format is R op R, otherwise it is op(R)
	int numArgs;
	int isFloat;
	const char *name;
} abOpcodeTable[] = {
	{ 1, 2, 0, "|" },	// 0
	{ 1, 2, 0, "&" }, 	// 1
	{ 1, 1, 0, "-" }, // 2
	{ 1, 2, 0, "^" },	// 3
	{ 1, 1, 0, "~" },	// 4
	{ 1, 2, 0, "+" }, 	// 5
	{ 1, 2, 0, "-" },	// 6
	{ 1, 2, 0, "*" },	// 7
	{ 1, 2, 0, "/" },	// 8
	{ 1, 2, 0, ">>" },	// 9	(signed)
	{ 1, 2, 0, ">>" },	// 10 	(unsigned) 
	{ 1, 2, 0, "<<" }, 	// 11
	{ 0, 1, 0, "clz" },	// 12
	{ 0, 2, 0, "shuffle" },// 13
	{ 0, 1, 0, "ctz" },// 14
	{ 1, 1, 0, "" },	// 15 (copy)
	{ 1, 2, 0, "==" },	// 16
	{ 1, 2, 0, "<>" },	// 17
	{ 1, 2, 0, ">" },	// 18 (signed)
	{ 1, 2, 0, ">=" },	// 19
	{ 1, 2, 0, "<" },	// 20
	{ 1, 2, 0, "<=" },	// 21
	{ 1, 2, 0, ">" },	// 22  (unsigned)
	{ 1, 2, 0, ">=" },	// 23
	{ 1, 2, 0, "<" },	//24
	{ 1, 2, 0, "<=" },	// 25
	{ 0, 2, 0, "getlane" }, // 26
	{ 0, 1, 1, "ftoi" }, // 27
	{ 0, 1, 1, "reciprocal" }, // 28
	{ 0, 1, 0, "sext8" }, // 29
	{ 0, 1, 0, "sext16" }, // 30
	{ 0, 0, 0, "" }, // 31
	{ 1, 2, 1, "+" },	// 32
	{ 1, 2, 1, "-" },	// 33
	{ 1, 2, 1, "*" },	// 34
	{ 1, 2, 1, "/" },	// 35
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 1, 1, "floor" },// 38
	{ 0, 1, 1, "frac" },// 39
	{ 0, 0, 0, "" },// 40
	{ 0, 1, 1, "abs" },	// 41
	{ 0, 1, 1, "itof" },// 42
	{ 0, 0, 0, "" },
	{ 1, 2, 1, ">" },	// 44
	{ 1, 2, 1, ">=" },	// 45
	{ 1, 2, 1, "<" },	// 46
	{ 1, 2, 1, "<=" },	// 47
	{ 0, 0, 0, "" }, // 48
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
	{ 0, 0, 0, "" },
};

struct AFmtInfo
{
	int op1IsScalar;
	int op2IsScalar;
	int masked;
	int invertMask;
} aFormatTab[] = {
	{ 1, 1, 0, 0 },
	{ 0, 1, 0, 0 },
	{ 0, 1, 1, 0 },
	{ 0, 1, 1, 1 },
	{ 0, 0, 0, 0 },
	{ 0, 0, 1, 0 },
	{ 0, 0, 1, 1 },
	{ 0, 0, 0, 0 }
};

struct BFmtInfo
{
	int destIsScalar;
{'fraction_non_alphanumeric': 0.2812152649129307, 'fraction_numerical': 0.1152278621711745, 'mean_word_length': 2.022956326987682, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4130503', 'n_tokens_mistral': 3212, 'n_tokens_neox': 2579, 'n_words': 824}